Note
Preemptive vs. Non-Preemptive Scheduler
Topics: Embedded Systems
Preemptive
A preemptive scheduler may interrupt the current task to dispatch another task that typically requires a higher priority.
Advantages
- Distributes resources better, so one processes cannot hog CPU
- Can help meet deadlines better in hard real-time
Disadvantages
- More complex to implement
- Higher context switching overhead
- High priority tasks might utilize most of CPU
- Concurrency issues when using mutexes and semaphores
Non-Preemptive
In a non-preemptive scheduler, the current task runs until it finishes before another task is dispatched.
Advantages
- Simpler to implement
- Low scheduling and context switching delay
Disadvantages
- One long-running task can occupy all CPU
- Average response time is higher
References
Backlinks
Notes that reference this page.
Connections
Direct relationships to this note.