The ticket line for this draw
Currencies
Tickets held and CPU won
| job | tickets | share | won |
|---|
One column per 10 ms slice: the job that held the winning ticket.
Keys: → next, ← back, space play or pause, 1–5 switch scenario.
Instead of working out who deserves the CPU, hold a raffle for it. Every job holds tickets, a random number is drawn each time slice, and whoever holds the winning ticket runs, following the Scheduling: Proportional Share chapter of OSTEP (Chapter 9). Each column is one 10 ms slice.
| job | tickets | share | won |
|---|
One column per 10 ms slice: the job that held the winning ticket.
Keys: → next, ← back, space play or pause, 1–5 switch scenario.
There is no queue to keep sorted and no history to maintain. Draw a number, then walk the list of jobs adding up tickets until the total passes it.
Two jobs with the same number of tickets and the same amount of work should finish together. Unfairness F is the completion time of the first job divided by the completion time of the second, so F = 1 is perfectly fair and smaller is worse.
— F for the run above