Correct means on time
In a real time system a result that arrives late is wrong, even if the value is right. Think of an airbag controller or audio engine. Real time scheduling aims to guarantee that tasks meet their deadlines.
Common policies
- Rate monotonic gives shorter period tasks higher fixed priority. It is simple and predictable for periodic workloads.
- Earliest deadline first always runs the task whose deadline is nearest. It can pack the CPU more fully but needs dynamic priority.
Hard versus soft
A hard real time system treats a missed deadline as a failure that must never happen. A soft real time system tolerates occasional misses with degraded quality, such as a dropped video frame.
Why predictability beats speed
Real time scheduling cares about the worst case, not the average. Designers compute whether the task set is schedulable by checking that total demand fits within the available time even at peak. Features that speed up the average case but blow up the worst case, like unbounded caching effects, are often avoided.
Key idea
Real time scheduling guarantees deadlines using policies like rate monotonic or earliest deadline first, optimizing worst case timing and schedulability rather than average throughput.