Process scheduling simulator
schedsim
is a simulator for process scheduling. I developed it as a small project at university.
Currently it only supports one CPU.
- Shortest Job First (SJF)
- Longest Job First (LJF)
- Earliest Deadline First (EDF)
- Least Laxity First (LLF)
- First Come First Serve (FCFS)
- Round Robin
Download schedsim
to your computer:
git clone https://github.com/BaumGuard/schedsim
Compile:
make
./schedsim <File> -<Scheduling algorithm> [<Time slice>]
Option | Meaning |
---|---|
-sjf |
Shortest Job First |
-sjf_np |
Shortest Job First (non-preemptive) |
-ljf |
Longest Job First |
-edf |
Earliest Deadline First |
-llf |
Least Laxity First |
-fcfs |
First Come First Serve |
-rr <time slice> |
Round Robin (Expects the length of the time slice) |
schedsim
expects a file with the information about the processes as the first command line argument.
The information should be presented in the file in the following order:
<Process number> <Ready Time> <Execution Time> <Deadline>
All values must be integers!
Example file
1 2 5 8
2 0 8 9
3 4 3 6
4 5 6 10
5 1 4 12
Under the heading (current scheduling algorithm) the output is divided into three parts:
- Graphical representation of the execution process
- Response time for each process and the medium response time for all processes
- Waiting time for each process and the medium waiting time for all processes
Run schedsim
without arguments:
./schedsim