Basic Concept: Tickets Represent Your Share

This lesson briefly explains the basic concept of lottery scheduling.

We'll cover the following

Underlying lottery scheduling is one very basic concept: tickets, which are used to represent the share of a resource that a process (or user or whatever) should receive. The percent of tickets that a process has represents its share of the system resource in question.


Let’s look at an example. Imagine two processes, AA and BB, and further that AA has 75 tickets while BB has only 25. Thus, what we would like is for AA to receive 75% of the CPU and BB the remaining 25%.

Lottery scheduling achieves this probabilistically (but not deterministically​) by holding a lottery every so often (say, every time slice). Holding a lottery is straightforward: the scheduler must know how many total tickets there are (in our example, there are 100). The scheduler then picks a winning ticket, which is a number from 0 to 99.

Get hands-on with 1200+ tech skills courses.