A simple discrete discrete-time event simulator for a number of CPU schedulers on a single CPU system.
- Python 3
- Pandas
- Matplotlib
- Others, see
requirements.txt
The dependencies take a while to install, (especially Pandas) so just be patient during first time setup.
Run with default configuration:
$ source run.sh
Sim running, please be patient
Sim done, execution time: 168.723174
Plot is at data/1541391135/plots/plot.png
$ open data/1541391135/plots/plot.png
Advanced usage:
$ python3 -m venv env
$ source env/bin/activate
$ pip install -r requirements.txt
$ python main.py <LENGTH> <MAX_RATE> <BASE_SEED>
Sim running, please be patient
Sim done, execution time: 168.723174
Plot is at data/1541391135/plots/plot.png
$ deactivate
$ open data/1541391135/plots/plot.png
Where:
LENGTH
: The number of processes to simulateMAX_RATE
: From 1 toMAX_RATE
processes per second arrival will be simulated, so ifMAX_RATE
equals 30, 30 different simulations will be run for each schedule typeBASE_SEED
: The base seed for the pseudo-random number generator. Simulations of the same rate will have the same base seed for comparision purposes