Desktop cross-platform application that demonstrates the most popular CPU scheduling algorithms used in many operating systems.
The app's main function is to show how processes are being scheduled and their average and turnaround time on the CPU using many different scheduling algorithms which are:
- FCFS (First Come First Serve).
- Non-Preemptive SJF (non-preemptive Shortest Job first).
- Preemptive SJF (preemptive Shortest Job first).
- Non-Preemptive Priority Scheduling.
- Preemptive Priority Scheduling.
- Round Robin.
All of those algorithms are used widely in many different systems.
Note: before following the instruction make sure that Node.js 18 or above installed on your machine.
- Open your terminal
- Clone the repo:
git clone https://github.com/Ahmed-Khaled24/Process-Schedular
- Enter the directory:
cd Process-Scheduler
- Install the needed node packages:
npm install
- Open the application:
npm start
The interface of the program has a main page which you will see directly after opening it. From this interface you should choose the option of the scheduler you want to visualize and press next to start some processes.
When next is pressed you will see the processes interface from which you will add any processes you want and their properties: arrival time, burst time, priority time(in priority scheduling only), also the quantum time in the round robin scheduling.
There is a check mark in the top right if this interface which is empty by default which will make you add as many processes as you want and only see the result of scheduling them after pressing start, i.e. no live addition can happen.
If the Live Result option was checked then you will have the ability to add some processes first and then start, after that when the program is running you will be able to add the processes dynamically while they're running. Also, you can't add the arrival time while it's running, you can only the burst time of the algorithm and it will be added with arrival time = the time it has been added.
All other Algorithms are working in the same way like those examples in images above with small changes:
- priority schedulers have additional entry to add the priority.
- round robin scheduler has additional field to add the quantum time.
Caution: Take care the program will terminate if it stayed 10 seconds without any process running on it (as timeout to save resources).