This lesson explains how to run the simulator with which you'll practice in the next lesson!

This program,, allows you to see how different schedulers perform under scheduling metrics such as response time, turnaround time, and total wait time. Three schedulers are “implemented”: FIFO, SJF, and RR.

There are two steps to running the program.

First, run without the -c flag: this shows you what problem to solve without revealing the answers. For example, if you want to compute the response, turnaround, and wait for three jobs using the FIFO policy, run this in the terminal provided below:

./ -p FIFO -j 3 -s 100

If that doesn’t work, try this:

python ./ -p FIFO -j 3 -s 100

This specifies the FIFO policy with three jobs, and, importantly, a specific random seed of 100. If you want to see the solution for this exact problem, you have to specify this exact same random seed again. Let’s run it and see what happens.

Get hands-on with 1200+ tech skills courses.