Operating Systems · Problem type

Round robin

Use this for “Jobs A, B and C of 5, 3 and 1 ms share the processor with a 2 ms quantum. Find the average wait.”

Diagram

Round robin, q = 2 msABCABA0245789A waits 4B waits 5C waits 4
Round robin: waits 4, 5, 4, average 4.333 ms; average turnaround 7.333 ms.
Every job arrives at 0; a job’s wait is the time it spends not running before it ends.
This is an example. Type your own values to start a new problem.
bA
Burst of job A
example
bB
Burst of job B
example
bC
Burst of job C
example
q
Quantum
example
W
Average wait
worked out (not typed)

Formulas

W
=
the
round-robin
average
wait
of
bA,
bB,
bC
with
quantum
q
4.3333 = the round-robin average wait of 5, 3, 1 with quantum 2

Assumptions

•
All three jobs arrive at time 0 in the order A, B, C, and none of them waits for I/O.
•
Each job runs for at most one quantum, then goes to the back of the queue.
•
A job’s wait is its finish time less its own burst; switching takes no time.

Step-by-step

WE KNOW
bA = 5 ms, bB = 3 ms, bC = 1 ms, q = 2 ms
FIND
average wait (W)
Step 1 · Find average wait (W)
Use W = the round-robin average wait of bA, bB, bC with quantum q
Run the queue one quantum at a time; each wait is the finish time less the burst.
W
=
the
round-robin
average
wait
of
5,
3,
1
with
quantum
2
Slices: A 0–2, B 2–4, C 4–5, A 5–7, B 7–8, A 8–9
Waits: A 9 − 5 = 4, B 8 − 3 = 5, C 5 − 1 = 4
W
=
4 + 5 + 4
3
=
13
3
W
=
4.3333
ms
Check
Put the numbers back in. Both sides should match.
4.3333 = the round-robin average wait of 5, 3, 1 with quantum 2 ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

Related lessons

© 2026 SME. All rights reserved.