Definition
A CPU scheduling technique that hands out a fixed time quantum in turn and preempts a process when its time runs out, so processes share the CPU fairly
Visual IT Encyclopedia › Operating Systems › Process Management
Definition
A CPU scheduling technique that hands out a fixed time quantum in turn and preempts a process when its time runs out, so processes share the CPU fairly
Setup: one CPU, time quantum 2ms. P1–P4 are four programs (processes) to run. Arrival says at how many ms a process joined the line, and run time says how many ms it needs to run on the CPU to finish. If a newly arrived process and a process that used up its quantum join the line at the same moment, the newly arrived one goes in front. The time it takes to switch processes is counted as 0. (ms: a thousandth of a second)
0 / 10
Round Robin (RR) Scheduling
Processes take turns running a little at a time, in the order they lined up in the ready queue. There is a fixed amount of time a process can run at once, called the time quantum (time slice). When that time is up, the OS stops the process even if it is not finished (preemption), and it goes to the back of the line to wait again.
At a bank: the counter serves each customer for only 2 minutes at a time. A customer who isn't done within 2 minutes goes to the back of the line and waits again.