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
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).
So @Reina , what about cooperative scheduling, is it actually and exactly the same thing? Nothing different?
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.
Okay thanks a lot for this