22 lines
367 B
Markdown
22 lines
367 B
Markdown
|
|
## Proportional Share Scheduling
|
|
|
|
Code from OSTEP chapter [Scheduling: Proportional Share](http://pages.cs.wisc.edu/~remzi/OSTEP/cpu-sched-lottery.pdf).
|
|
|
|
Compile with:
|
|
|
|
```
|
|
prompt> gcc -o lottery lottery.c -Wall
|
|
```
|
|
|
|
Run like this:
|
|
|
|
```
|
|
./lottery 1 100
|
|
```
|
|
|
|
which uses random seed '1' to run a little lottery 100 different times.
|
|
|
|
Read the source code for details.
|
|
|