← Back to the playground
COMPARE THE POLICIES

A probability, or a place in the queue?

Lottery allocates a chance at the next slice. Round robin allocates the next turn in a repeating order.

What changes the next decision?

PropertyLotteryRound robin
SelectionWeighted random ticketFIFO queue
Ticket weightsChange selection probabilityIgnored
Continuous targetProportional to weightsEqual turns
Short-run sequenceCan repeatedly select one processCycles through ready processes

Try the same two processes

With A holding 75 tickets and B 25, continuous lottery scheduling targets a 75/25 split in expectation. Plain round robin still alternates A, B, A, B. Over complete cycles with equal quanta, its split is 50/50. A weighted round-robin variant is a different algorithm and is not modeled here.

For finite workloads

Both policies must complete the same burst totals. Their dispatch order, response times, waiting times, and completion times can differ. Arriving or finishing jobs change the ready set. Compare the trace under the same model, input workload, and quantum rather than comparing unlike settings.

Which should you choose?

For coursework, choose the policy that matches the question's assumptions. For real systems, these simplified calculations do not include blocking, priorities, cache effects, deadlines, or context-switch costs. They explain policy behavior rather than prescribe a production scheduler.

Run the weighted lottery example →   Open round robin →

KEEP EXPLORINGUnderstand lottery scheduling ↗Lottery vs. round robin ↗Work through arrival times ↗