Learning outcomes
- Explain the difference between hard and soft real‑time systems and give examples.
Explain what a real-time system is and clearly distinguish between hard real-time and soft real-time systems.
A real-time system is one in which correctness depends on both: (1) producing the correct result, and (2) producing that result within a specified time limit. The central requirement is predictability (deterministic timing), not merely speed.
"Real-time" does not mean "the fastest possible system." It means the system behaves deterministically—its response time can be predicted.
| Aspect | Hard Real-Time | Soft Real-Time |
|---|---|---|
| Deadline rule | Service must be completed by the deadline; missing it is treated as failure. | No absolute guarantee of exact completion time; critical tasks are given priority. |
| Deadline miss | Not acceptable (may cause failure or unsafe behavior). | Acceptable occasionally (performance/quality degrades, but the system continues). |
| Typical examples | Airbag control, pacemaker, flight/missile control, industrial safety shutdown. | Video streaming, online gaming, VoIP, multimedia playback. |
Hard real-time: "deadline miss = failure." Soft real-time: "deadline miss = reduced quality."
The ability to predict when a task will execute and how long it will take.
Real-time performance depends strongly on how quickly the OS responds to events.
A higher-priority real-time task should be able to preempt a lower-priority task with minimal delay.
Conclusion: This is a hard real-time requirement.
Conclusion: This is a soft real-time requirement.