How round-robin scheduling works
How a computer shares one processor among many programs by giving each a short, equal turn in a circle, and what that simple fairness costs.
Written by Amili, an AI writer, from the sources listed below · 19 October 2026 · 5 min read
Round-robin scheduling gives every waiting task an equal slice of time in a fixed circular order, then pauses it and moves on to the next. It is simple, easy to build and guarantees that no task waits forever, which is why operating systems and network equipment use it.
In short
- Each task gets a fixed time slice, called a quantum, then goes to the back of the line.
- No task is given priority, so none can be starved of time indefinitely.
- The scheduler interrupts tasks that run past their slice, which makes it pre-emptive.
- In networks, each data flow gets its own queue and the flows take turns sending packets.
- Equal turns are only fair when the work units are similar in size.
What problem does round-robin scheduling solve?
A computer with one processor can only run one thing at any instant, yet it appears to run many programs at once. Something has to decide who goes next. That job belongs to the scheduler, and its goals often conflict: finishing as much work as possible per second, keeping waits short, responding quickly to people, and treating every process fairly. Every scheduling rule is a compromise among these.
Round-robin chooses fairness and simplicity. Its name comes from the older round-robin principle found in other walks of life, where people take turns receiving an equal share.
How does it work step by step?
Tasks that are ready to run wait in a queue arranged as a circle. The scheduler picks the first one and lets it use the processor for one quantum, a fixed allowance of time. If the task finishes, or stops to wait for something such as input, during its quantum, the scheduler immediately moves to the next task in the queue. If the quantum runs out first, the scheduler forcibly pauses the task and sends it to the back of the queue, where it will resume from where it stopped on its next turn.
Because the scheduler takes the processor away rather than waiting for the task to give it up, round-robin is called pre-emptive. A circular queue is all the data structure it needs, and it counts among the most basic scheduling algorithms used in operating systems.
What does a worked example look like?
Set the quantum at 100 milliseconds. Job 1 needs 250 milliseconds of processor time in total. It runs for 100 ms and is paused. Every other waiting job gets its own 100 ms. Job 1 then gets a second 100 ms, and after another full round, a third turn, during which it finishes after just 50 ms and leaves the queue. Its total use of the processor is 250 ms, spread over three turns.
The size of the quantum matters. If quanta were large compared with the jobs, or if there were no time-sharing at all, a process producing big jobs would effectively hog the processor and be favoured over everyone else.
How is it used in computer networks?
Routers and switches can schedule packets the same way, as an alternative to plain first-come, first-served queuing. The device keeps a separate queue for each data flow, for instance each pair of source and destination addresses, and lets every active flow send in a repeating order. If one flow has nothing to send, the next takes its place, so the link is not left idle; this property is called work-conserving.
Shared networks have used the same idea through token passing schemes such as Token Ring, or through a central station polling terminals in turn. A wireless base station can also reserve time slots for mobile devices in round-robin fashion.
Where does equal turn-taking go wrong?
Round-robin divides turns equally, not work. When packets vary widely in size, a flow that sends large packets gets more of the link in each turn than one sending small packets. Fair queuing is preferable in that case, and variants such as deficit round-robin, weighted round-robin and weighted fair queuing are used when some traffic must be guaranteed better service.
In wireless networks, equal turns can waste capacity. Some devices have poor connections and take much longer to receive the same amount of data. Waiting for better conditions, or favouring devices with good connections, can raise total throughput. Channel-dependent methods such as proportionally fair scheduling exploit that, though pure maximum-throughput scheduling can starve some users entirely, the very problem round-robin avoids.
What does it teach about thinking?
Round-robin shows that fairness has to be defined before it can be delivered. 'Everyone gets an equal turn' and 'everyone gets an equal share of the work done' are different promises, and they only coincide when the tasks are alike.
It also shows the value of a guarantee. A more clever rule might finish more work on average, yet leave some tasks waiting indefinitely. Round-robin accepts some inefficiency in exchange for a promise that every task keeps moving. Anyone juggling many small commitments faces the same trade between optimising for the urgent and making sure nothing is forgotten.
Questions people ask
Is round-robin scheduling pre-emptive?
Yes. When a task's time quantum expires, the scheduler forces it off the processor and moves it to the back of the ready queue, even if the task has not finished. This differs from cooperative scheduling, where a scheduler cannot pause a running process and must wait for it to give up control on its own.
Can a process starve under round-robin scheduling?
No. Every ready process gets a turn in each cycle through the queue, and no process has priority over another, so none can be postponed forever. Being starvation-free is one of the main reasons round-robin is used, in contrast to schedulers that always favour the most valuable or efficient work and can leave some tasks waiting indefinitely.
What is weighted round-robin?
It is a variant that gives some queues more turns or larger shares than others, instead of treating all of them equally. Network equipment may use it, along with deficit round-robin and weighted fair queuing, when certain traffic needs guaranteed or differentiated quality of service rather than plain best-effort delivery.
The thinking behind it
Its chapter on scheduling compares the rules computers use to divide time and what they suggest about managing a busy day.
Read or listen to Algorithms to Live By
Hear the whole book free: start an Audible trial and your first audiobook — this one, if you like — is on the house.
As an Amazon Associate, ReadGlobe earns from qualifying purchases and Audible trials — at no extra cost to you.
Sources
- Round-robin scheduling — Wikipedia
- Scheduling (computing) — Wikipedia
How this was made: Amili, an AI writer, wrote this article in its own words from the sources above. Every link was checked before publishing. Spotted an error? Tell us and we will correct it.