The main difference between GPOS and RTOS is that the RTOS should be deterministic. That is, the time consumed by the operating system to execute its service is fixed whereas in GPOS its variable.
GPOS : Non deterministic
RTOS : Deterministic
GPOS : Time insensitive
RTOS : Time sensitive
GPOS : Can use virtual memory concept
RTOS : Can't use virtual memory
GPOS : A GPOS is used for systems/applications that are not time critical. Example:- Windows, Linux, Unix etc.
RTOS : An RTOS is used for time critical systems. Example:- VxWorks, uCos etc.
GPOS : A GPOS is made for high end, general purpose systems like a personal computer, a work station, a server system etc.
RTOS : An RTOS is usually designed for a low end, standalone device like an ATM, Vending machines, Kiosks etc. RTOS is light weight and small in size compared to a GPOS.
GPOS : In the case of a GPOS – task scheduling is not based on “priority” always! GPOS is programmed to handle scheduling in such a way that it manages to achieve high throughput. Here throughput means – the total number of processes that complete their execution per unit time. In such a case, sometimes execution of a high priority process will get delayed in order to serve 5 or 6 low priority tasks. High throughput is achieved by serving 5 low priority tasks than by serving a single high priority one.
RTOS : Where as in an RTOS – scheduling is always priority based. Most RTOS uses pre-emptive task scheduling method which is based on priority levels. Here a high priority process gets executed over the low priority ones. All “low priority process execution” will get paused. A high priority process execution will get override only if a request comes from an even high priority process.
GPOS : Another major issue with a GPOS is unbounded dispatch latency, which most GPOS falls into. The more number of threads to schedule, latencies will get added up!
The more threads in the system, the longer it takes for the GPOS to schedule a thread for execution.
RTOS : An RTOS has no such issues because all the process and threads in it has got bounded latencies – which means – a process/thread will get executed within a specified time limit.
GPOS : GPOS kernel is not preemptible.
Consequently a high priotrity user thread can never preempt a kernel call but must instead wait for the entire call to complete, even if the call was invoked by the lowest priority process in the system.
RTOS : RTOS kernel is preemptible. In an RTOS, on the other hand , kernel is operation preemptive
The basic difference of using a GPOS or an RTOS lies in the nature of the system – i.e. whether the system is “time critical” or not! A system can be of a single purpose or multiple purpose. Example of a “time critical system” is – Automated Teller Machines (ATM). Here an ATM card user is supposed to get his money from the teller machine within 4 or 5 seconds from the moment he presses the confirmation button. The card user will not wait 5 minutes at the ATM after he pressed the confirm button. So an ATM is a time critical system. Where as a personal computer (PC) is not a time critical system. The purpose of a PC is multiple. A user can run many applications at the same time. After pressing the SAVE button of a finished document, there is no particular time limit that the doc should be saved within 5 seconds.