/SchedulingSimulator

A Scheduling Simulator for Operating system scheduling algorithms such as FCFS, Round Robin, ...

Primary LanguageJupyter Notebook

Scheduling Simulator

Simulator for FCFS, SPN, RR, SRT algorithms

Input to the program

This program gets the .xlsx file name as the timeline of the process' computation or I/O time needed

This timeline should follow the following format
P 1 P 2
0 5
CPU 10 CPU 2
DISK 1 CPU 5
NET 3 NET 2
CPU 8 CPU 20
NET 2
  • Every column starts with P + process id
  • Preceding rows contains the arrival time
  • Next rows represent the timeline of the each process
    • Each rows contains resource label followed by time the resource will be used
    • Supported resources are CPU, DISK, NET

Output

The program then generates a new .xlsx file for every algorithm

Output has the following format
Process id AT WT CT TAT
P1
P2
P3
P4

Average waiting time, Average running time, Average turnaround time, CPU utilization and throughput are prompted in the program as the algorithms runs.

Algorithm implementation

Each algorithm are implemented separately in the algorithm folder

To implement a new algorithm 2 methods from base.py needs to be overloaded

  1. pick_next
  2. init_queue pick_next should return the next process as it called init_queue will initiate the queue that might be needed for various scheduling algorithm, although some algorithm might not require it