THE CPU SCHEDULING PLAYGROUND

Lottery scheduling,
made visible.

Give processes tickets. Draw the next turn. See how a little randomness
becomes a proportional share of the CPU.

LESS GUESSING.
MORE “OH, I GET IT.”
SINGLE CPU / V1.0

Your workload

3 PROCESSES
Simulation model

PROCESSTICKETSARRIVEBURST
◈ Saved on this device
Ready when you are0 / 64 decisions
TIME ELAPSED0 units
CPU BUSY0 units
DECISIONS0

Execution timeline

ONE BLOCK = ONE DISPATCH
⌁A schedule starts with a decision.Press Run or take it one step at a time.

Expected vs. observed

More rounds tell a clearer story.

Expected Observed

Every ticket is a chance at the next slice. Your observed share will take shape as the simulation runs.

Decision trace 0 dispatches+
Abstract time units · no context-switch overhead

THE SHORT VERSION

A lottery where
every ticket does work.

Get the full explanation ↗
01 /

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.

02 /

Draw, run, repeat

A winning ticket selects the next process for one time quantum. Step through the trace to inspect each draw.

03 /

Watch the shares emerge

Expected allocation is a probability. A short run can look uneven; more rounds make the comparison more useful.

SAME WORKLOAD. DIFFERENT RULES.

Explore the algorithms.

Four ways to choose what runs next.

LEARN BY CHANGING ONE THING

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 ↗