Skip to content

A CPU Scheduling Simulator that supports FCFS, SJF, Priority, and Round Robin algorithms, featuring a user-friendly GUI . It includes a live Gantt Chart, displays average waiting and turnaround times, and provides real-time updates on remaining burst times for each process

License

Notifications You must be signed in to change notification settings

Abdulrahman295/CPU-Scheduling-Simulator

Repository files navigation

CPU Scheduling Simulator

CPU Scheduling Simulator GIF

A CPU Scheduling Simulator that supports FCFS, SJF, Priority, and Round Robin algorithms, featuring a user-friendly GUI. It includes a live Gantt Chart, displays average waiting and turnaround times, and provides real-time updates on remaining burst times for each process.

Features

  • Live Scheduling Simulation where each time unit is mapped to 1 second in real time.
  • Gantt Chart displaying the order and time taken by each process.
  • Live updating tables showing the status, progress and other details for each process.
  • Display of average waiting time and average turnaround time after all processes are completed.

Supported Scheduling Algorithms

  1. First-Come, First-Served (FCFS)
  2. Shortest Job First (SJF)
    • Preemptive (PSJF)
    • Non-Preemptive (NPSJF)
  3. Priority Scheduling
    • Preemptive (PP)
    • Non-Preemptive (NPP)
  4. Round Robin (RR)

UI Samples

Preemptive Priority

ex1

Round Robin

ex2

Technologies Used

  • TypeScript
  • Webpack
  • Jest
  • HTML5
  • CSS3

Installation

  1. Clone this repo:
git clone https://github.com/Abdulrahman295/CPU-Scheduling-Simulator.git
  1. Install dependencies:
npm install
  1. Build the app:
npm run build

Testing

The CPU Scheduling Simulator includes a testing section to ensure the correctness and functionality of the implemented scheduling algorithms. To run the tests, use the following command:

npm test

The tests are written using Jest and can be found in the test/ directory, where each scheduling algorithm has its own test file

test_ex

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

A CPU Scheduling Simulator that supports FCFS, SJF, Priority, and Round Robin algorithms, featuring a user-friendly GUI . It includes a live Gantt Chart, displays average waiting and turnaround times, and provides real-time updates on remaining burst times for each process

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published