Unit content
Scheduling policies for concurrent tasks
When several tasks are ready to run, a scheduler needs a policy for choosing which one receives processor time next.
Different policies optimize different goals: responsiveness, throughput, fairness, predictability or meeting deadlines.
First come, first served runs work in arrival order but can let a long task delay many short ones. Round robin gives runnable tasks bounded turns and rotates among them. Priority scheduling prefers more important work, but low-priority tasks can starve if higher-priority work is always ready.
Fair schedulers try to balance processor service among competing tasks rather than enforce one literal queue discipline. Real-time schedulers may instead prioritize predictable completion before deadlines.
No policy is universally best. A choice that improves interactive response can reduce throughput, while a policy optimized for average fairness may be inappropriate when one task has a strict timing requirement.
Scheduling is therefore an allocation policy over concurrent runnable work, with explicit trade-offs determined by the workload's goals.