Lottery scheduling,
made visible.
Give processes tickets. Draw the next turn. See how a little randomness
becomes a proportional share of the CPU.
MORE “OH, I GET IT.”
Execution timeline
ONE BLOCK = ONE DISPATCHExpected vs. observed
More rounds tell a clearer story.
Every ticket is a chance at the next slice. Your observed share will take shape as the simulation runs.
Decision trace 0 dispatches+
Give each process a weight
50 tickets out of 100 means a 50% chance of getting the next turn. Tickets express a share, not a priority queue.
Draw, run, repeat
A winning ticket selects the next process for one time quantum. Step through the trace to inspect each draw.
Watch the shares emerge
Expected allocation is a probability. A short run can look uneven; more rounds make the comparison more useful.
Explore the algorithms.
Four ways to choose what runs next.
Small examples.
Useful lightbulb moments.
Keep the assumptions visible. Change a weight, arrival, or quantum and follow the consequences.
A model for learning, with its assumptions in view. One CPU, abstract time units, and no I/O or switching cost. Lottery draws don't guarantee short-run fairness or a maximum wait. In finite workloads, burst lengths determine final CPU shares. Methodology & academic sources ↗