RTOS is an operating system that supports real time applications by providing logically correct results within the deadline required. Basic structure is similar to general OS but, in addition, it provides mechanisms to allow real time scheduling of tasks.
Though real time operating systems may or may not increase the speed of execution, they can provide much more precise and predictable timing characteristics than general OS.
General OS:Operating System (OS) is a system program that provides an interface between hardware and application programs. OS is commonly equipped with features like: Multitasking, Synchronization, Interrupt and Event Handling, Input/ Output,\Inter-task Communication, Timers and Clocks and Memory Management to fulfill its primary role of managing the hardware resources to meet the demands of application programs.
RTOS: Generally used for embedded systems
OS: Desktop PCs.etc.
Determinism: The main difference between general os and real time OS is the “Deterministic” timing behavior in the RTOS.OS consume only known and expected amounts of time.
General OS: Non deterministic.
Scheduling in RTOS is Time based
Scheduling in OS is Process based.
RTOS uses priority based preemptive scheduling, which allows high priority threads to meet their deadlines consistently.
In RTOS: All kernel operations are preemptible.