Introduction to RTOS - Real-Time Operating Systems
A RTOS or Real-Time Operating System is an OS that can perform time-sensitive tasks with exact timing to guarantee predictability and stability.
Unlike an RTOS, general purpose operating systems (Windows, MacOS, and Linux) are meant to perform a variety of tasks without adhering to any strict timing requirements. A general purpose operating system prioritizes system usability and multitasking capabilities, instead of task prioritization using a deterministic scheduler.
The task scheduler in an RTOS is based on priority levels set by the user. As the RTOS runs, the scheduler will check these priority levels and performs tasks with the highest priority first. Some tasks in an RTOS may depend on the completion of others and require synchronization mechanisms. A simple way to think of an RTOS is like a chore list. You may assign the most prioritity to cleaning a space first, then throwing away the trash second, and lastly you could wash the dishes. If we look at task one and task two, the priority makes sense from the standpoint you might trash things as you clean, making these tasks dependent of each other.
Tasks appear to be executing simultaneously because of a process called time slicing or preemptive scheduling, this creates the illusion of multitasking. An RTOS is built to be light weight and work on small embedded microcontrollers in projects that range from medical devices to autonomous systems to flight systems.