Skip to content

SundusQasrawi/CPU-scheduling-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CPU Scheduling Algorithms Simulator

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.


πŸš€ Features

The system supports the following scheduling algorithms:

  1. First Come First Served (FCFS)
  2. Shortest Job First (SJF) β€” Non-preemptive
  3. Shortest Remaining Time First (SRTF) β€” Preemptive
  4. Round Robin (RR) with quantum = 5
  5. Preemptive Priority Scheduling with aging
  6. Non-preemptive Priority Scheduling with aging

🧩 Process Model

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.


πŸ“Š Output

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages