How does a round robin scheduler handle a process that requires more time than the allocated time quantum?
Last updated
When a process doesn't finish within its time quantum, Round Robin preempts it via a timer interrupt, saves its state, and moves it to the tail of the ready queue so the next process can run; the preempted process resumes on a later turn.
Preemption by timer: A timer interrupt fires at the end of the quantum, forcing a context switch.
Requeue at the tail: The unfinished process goes to the back of the ready queue, keeping the scheduling fair and cyclic.
Repeats until completion: A long job simply takes multiple quanta, interleaved with other processes.
Quantum size tradeoff: Too large behaves like FCFS; too small causes excessive context-switch overhead. A good rule: the quantum should exceed most CPU bursts but stay short enough for responsiveness.