Real-time operating systems are a special type of operating system used mainly in embedded systems. Their purpose is to be able to handle time-critical tasks with precision and reliability (not as fast as possible) within strict time constraints (milliseconds, microseconds). There are two types of real-time systems:
- A hard real-time system requires a guarantee that a task completes within a certain amount of time.
- A soft real-time system allows critical processes to have a higher priority and the deadline is met in practice.
Scheduling
One key variation with RTOS is that their scheduling mechanism needs to be predictable. RTOS schedulers often use simpler algorithms because they’re more predictable and performant.
For example, Linux (soft real-time) uses FIFO and RR scheduling for soft real-time processes.