In an RTOS, what is the difference between "preemptive" and "cooperative" multitasking?
Correct! Well done.
Incorrect.
The correct answer is A) In preemptive multitasking, the scheduler can interrupt a running task to switch to another based on priority; in cooperative multitasking, a task must voluntarily yield control for another to run
Correct Answer
In preemptive multitasking, the scheduler can interrupt a running task to switch to another based on priority; in cooperative multitasking, a task must voluntarily yield control for another to run
Preemptive scheduling (common in RTOSes) allows higher-priority tasks to interrupt lower-priority ones, improving responsiveness, but requires careful handling of shared resources; cooperative multitasking relies on tasks yielding voluntarily, which can be simpler but risks one task monopolizing the CPU.