Skip to content
mohd-nasir
Operating Systems

Round Robin (RR) scheduling, explained

8 November 2026 · 1 min read

  • Operating Systems
  • CPU scheduling

Round Robin is built for fairness. Each process gets the CPU for at most a fixed amount of time, called the time quantum. If it is not finished when the time is up, it goes to the back of the queue and the next process gets a turn.

It is the idea behind many time-sharing systems, where everyone should get a quick response.

How it works

  • Keep a queue of waiting processes.
  • Take the process at the front and let it run for at most one quantum.
  • If it finishes, it leaves. If not, it goes to the back of the queue. Processes that arrive during the turn join the queue before it.
  • If nobody else is waiting, the process simply keeps the CPU.

A small example

Four processes, A to D, with a time quantum of 2:

Arrival times: 0 2 4 5
Burst times:   7 4 1 4

The average waiting time is:

5.0 time units

The average is higher than SRTF, but every process gets the CPU regularly and nobody waits for a long stretch with no turn.

What to know about its cost

  • It is preemptive, and it never causes starvation.
  • A very large quantum makes it behave like FCFS.
  • A very small quantum makes it fair but wastes time switching between processes.

Where it works well

  • Fair to every process.
  • Good response time for interactive use.

Where it struggles

  • The average waiting time is often higher than with SJF or SRTF.
  • Performance depends on choosing a sensible quantum.

Try it yourself

Open the CPU Scheduling experiment, enter the processes from this post, choose Round Robin and step through the Gantt chart. Try a quantum of 1, 2 and 5 to see how the order changes. Then try the other algorithms on the same processes and compare the averages.

Open the CPU Scheduling experiment

$ book --call