A lottery scheduling code for xv6 system
Usage:
-
Download the xv6-3.tar file.
-
Unzip the .tar file.
-
Use the following commands to compile the xv6 system and run it.
$ make
$ make qemu-nox
-
In xv6 system.
4.1. Use the following code to set tickets to a program.
tickets <num_of_tickets> <program_name>
For example,
tickets 10 spin &
, where spin is simply a program that runs an infinite loop.
4.2. Use the following command to check how many ticks each process has been assigned and dump the information to stdout.
ps
Also, use the following command to get this information for every 100 xv6 ticks.
ps -r