7 ms·
I always think to priority-based scheduling in this way. Maybe it can help someone else. The scheduler will always schedule the highest priority task among one
by ciarcode 4y ago
I always think to priority-based scheduling in this way. Maybe it can help someone else.
The scheduler will always schedule the highest priority task among ones in the ready queue, but at different times.
- If preemptive, the scheduler will schedule the higher priority task (higher than the currently running one) as soon as it enters the ready queue.
- If non preemptive, the scheduler will schedule the higher priority task only when the running one terminated or explicitly call a yield() (call to yield --> cooperative)
In principle, you can mix both scheduling types, making some tasks "non-preemptable" and other tasks "preemptable".