News for hackers. Stuff that matters.
Re:Operating Systems: CPU Scheduling by ciarcode on Saturday April 16, 2022 @06:15PM (#31056552)
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".

There are no comments on this comment yet.