Read the project description below carefully. Also, watch this video. (You can skip the
first 10 minutes of the video as some parts may not be relevant and some parts you may
already know.)
You can do this project individually or with a partner. You cannot share your work with
anyone other than your project partner.
This project can be done only in csjaws.
Add a lottery scheduler to xv6
In this project, you will replace the current round robin scheduler in xv6 with a lottery
scheduler, which we discussed in the class and is also described in OSTEP book. The
basic idea is simple: assign each running process a slice of the processor in proportion
to the number of tickets it has. The more tickets a process has, the more it runs. Each
time slice, a randomized lottery determines the winner of the lottery; that winning
process is the one that runs for that time slice.
The objectives for this project:
To gain further knowledge of a real kernel, xv6.
To familiarize yourself with a scheduler.
To change that scheduler to a new algorithm.
To make a graph to show your project behaves appropriately.
Setting Tickets
You need to implement a new system call to set the number of tickets. The prototype of
the system call is:
int settickets(int)
This call sets the number of tickets of the calling process. By default, each process
should get one ticket; calling this routine makes it such that a process can raise the
number of tickets it receives, and thus receive a higher proportion of CPU cycles.
Get Free Quote!
365 Experts Online