I'm confused about the difference between cooperative and non-preemptive scheduling.

Hi guys !! I'm confused about the difference between cooperative and non-preemptive scheduling. Some sources say they're the same, while others mention that in non-preemptive scheduling, higher priority tasks can interrupt lower priority tasks only at system ticks. Can anyone clarify this? Anyone? @Middleware & OS
4 Replies
Reina
Reina5w ago
In non-preemptive scheduling, the scheduler can't preempt the task that is running, and the running task yields the kernel only when it exhausts its time slot (or yields the kernel for other reasons such as exiting or finishing).
Marvee Amasi
Marvee Amasi5w ago
So @Reina , what about cooperative scheduling, is it actually and exactly the same thing? Nothing different?
Reina
Reina5w ago
As far as I understand, cooperative scheduling is a type of non-preemptive scheduling as the latter is a general term for scheduling algorithms which do not use preemption. You said that you found some sources saying that non-preemptive schedulers allow preempting lower priority tasks at system ticks and I think that's wrong by definition, I suggest you check the credibility of this source since some articles on the internet mention wrong stuff sometimes.
Marvee Amasi
Marvee Amasi5w ago
Okay thanks a lot for this
Want results from more Discord servers?
Add your server
More Posts