Loading repository data…
Loading repository data…
KhaledAshrafH / repository
This project is a Java program with a graphical user interface (GUI) designed to simulate different CPU scheduling algorithms. The goal of this project is to provide a hands-on experience and visual representation of various CPU scheduling algorithms, including Non-Preemptive Priority Scheduling, Non-Preemptive Shortest Job First (SJF), Shortest-Re
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This project is a Java program with a graphical user interface (GUI) designed to simulate different CPU scheduling algorithms. The goal of this project is to provide a hands-on experience and visual representation of various CPU scheduling algorithms, including Non-Preemptive Priority Scheduling, Non-Preemptive Shortest Job First (SJF), Shortest-Remaining Time First (SRTF), and a custom algorithm called AGAT Scheduling.
Scheduling is a fundamental function of operating systems, and CPU scheduling plays a vital role in determining which processes run when there are multiple runnable processes. This program aims to demonstrate the impact of different CPU scheduling algorithms on resource utilization and overall system performance. Additionally, it addresses the issue of process starvation for Non-Preemptive Priority Scheduling, Non-Preemptive SJF, and SRTF.
The CPU Scheduling Simulator provides the following features:
The program expects the following input:
For each process, the user needs to provide the following parameters:
For each scheduler, the program provides the following output:
To run the CPU Scheduling Simulator, follow these steps:
git clone https://github.com/KhaledAshrafH/CPU-Scheduler-Simulator
We welcome contributions to the CPU Scheduling Simulator project. If you find any bugs, issues, or have suggestions for improvement, please open an issue on the GitHub repository.
If you would like to contribute code to the project, please follow these steps:
The CPU Scheduling Simulator includes a testing section toensure the correctness and functionality of the implemented scheduling algorithms. The following sample test case provides an example of how the program can be tested:
- Number of processes: 4
- Round Robin Time Quantum: 4
- Context switching: 2
For each process:
- Process Name: P1
- Process Color: Red
- Process Arrival Time: 0
- Process Burst Time: 8
- Process Priority Number: 3
- Process Name: P2
- Process Color: Blue
- Process Arrival Time: 2
- Process Burst Time: 4
- Process Priority Number: 1
- Process Name: P3
- Process Color: Green
- Process Arrival Time: 4
- Process Burst Time: 6
- Process Priority Number: 2
- Process Name: P4
- Process Color: Yellow
- Process Arrival Time: 6
- Process Burst Time: 2
- Process Priority Number: 4
- Processes execution order: P2 -> P3 -> P1 -> P4
- Waiting Time for each process: P2: 0, P3: 4, P1: 10, P4: 18
- Turnaround Time for each process: P2: 4, P3: 10, P1: 18, P4: 20
- Average Waiting Time: 8
- Average Turnaround Time: 13
- Processes execution order: P1 -> P2 -> P3 -> P4
- Waiting Time for each process: P1: 0, P2: 8, P3: 12, P4: 18
- Turnaround Time for each process: P1: 8, P2: 12, P3: 18, P4: 20
- Average Waiting Time: 9.5
- Average Turnaround Time: 14.5
- Processes execution order: P2 -> P3 -> P4 -> P1
- Waiting Time for each process: P2: 0, P3: 2, P4: 8, P1: 16
- Turnaround Time for each process: P2: 4, P3: 8, P4: 10, P1: 24
- Average Waiting Time: 6.5
- Average Turnaround Time: 11.5
- Processes execution order: P2 -> P3 -> P4 -> P1
- Waiting Time for each process: P2: 0, P3: 4, P4: 8, P1: 14
- Turnaround Time for each process: P2: 4, P3: 10, P4: 10, P1: 22
- Average Waiting Time: 6.5
- Average Turnaround Time: 11.5
- History of all quantum time updates for each process:
- P2: [4, 6, 8]
- P3: [4, 6, 6]
- P4: [4, 4, 4]
- P1: [4, 2, 0]
- History of all AGAT factor updates for each process:
- P2: [6, 6, 6]
- P3: [5, 5, 5]
- P4: [4, 4, 4]
- P1: [7, 7, 7]
The CPU Scheduling Simulator is licensed under the MIT License. See the LICENSE file for more details.