simulating scheduling algorithms of operating system for processes e.g. Priority Scheduling, Multi Level Scheduling, ...
simulating scheduling algorithms of operating system for processes e.g. Priority Scheduling, Multi Level Scheduling, …
*
This repository exposed here, is actually a university project of the course operating system
And implemented with Java
language.
The hierarchy display of the classes is demonstrated here:
——cpuscheduler
—————-|
—————-src
—————————|
—————————Process //data of each process e.g. start time, burst time, …
—————————CPU //cpu for simulating schedule
—————————Scheduler //abstract class for primitive methods and fields
—————————Sch_FCFS //First Come First Serve Scheduler
—————————Sch_SJF //Shortest Job First Scheduler (can be preemptive)
—————————Sch_Priority //Priority Scheduler (can be preemptive)
—————————Sch_RR //Round Robin Scheduler
—————————Sch_Lottery //Lottery Scheduler
—————————Sch_Multilevel //Multi Level Scheduler (can be preemptive)
—————————FXMLDocumentController //controller for main gui
—————————SimulationController //controller for simulation gui
——/
Process: either a process is executing or waiting these 2 states are handled in:
CPU:
Scheduler:
NOTES
Note that simulation time unit is 0.1 so burst time or delay time must be multiple of 0.1
Note that order of each line specifies order of process arrival
Note that input format is like this for each line (Burst Time, Delay Time, Priority, Level)
Note that minimum duration of context switch in this simulation is 0.4
Note that minimum duration of quantum for round robbin scheduler in this simulation is 0.2 because time unit is 0.1 and quantum can’t be less than time unit
Input Tabel:
Process Name | Arrival Time | Execute Time | Level |
---|---|---|---|
1 | 0 | 5 | 1 |
2 | 1 | 8 | 2 |
3 | 3 | 7 | 2 |
4 | 4 | 3 | 1 |
5 | 5 | 3 | 1 |
6 | 8 | 11 | 2 |
7 | 15 | 3 | 1 |
8 | 25 | 4 | 1 |
For Example we are Scheduling process in Multi Level non-preemptive(l1:FCFS, l2 FCFS) below (input.txt file)
First we enter process information and choose scheduling alghorithm then press Run button
Wait for simulation to end
Now you can see the results
This project is licensed under the MIT License - see the LICENSE file for details