Implementation

This lesson describes​ the simple implementation of lottery scheduling.

Probably the most amazing thing about lottery scheduling is the simplicity of its implementation. All you need is a good random number generator to pick the winning ticket, a data structure to track the processes​ of the system (e.g., a list), and the total number of tickets.

Let’s assume we keep the processes in a list. Here is an example of three processes, A, B, and C, each with some number of tickets.

Get hands-on with 1200+ tech skills courses.