This project implements a simulation of multiple CPU scheduling algorithms and compares their performance over a fixed duration of 200 time units. The simulator models real execution behavior including process arrivals, CPU bursts, waiting states, and return times.
The system supports the following scheduling algorithms:
- First Come First Served (FCFS)
- Shortest Job First (SJF) β Non-preemptive
- Shortest Remaining Time First (SRTF) β Preemptive
- Round Robin (RR) with quantum = 5
- Preemptive Priority Scheduling with aging
- Non-preemptive Priority Scheduling with aging
Each process is represented by:
| Property | Description |
|---|---|
| Arrival Time | When the process enters the ready queue |
| Burst Time | CPU time required for completion |
| Comes Back After | Time before re-entering ready queue following I/O wait |
| Priority | Used in priority-based scheduling |
Processes return to the ready queue after completing a burst, simulating I/O events.
For each scheduling algorithm, the program produces:
- Gantt Chart (visual timeline of CPU allocation)
- Average Waiting Time
- Average Turnaround Time
This allows performance comparison across algorithms.