An open API service indexing awesome lists of open source software.

https://github.com/salma-mamdoh/cpu-schedulers-simulator

Our Project for Operating System Course taken during Winter 2023 semester
https://github.com/salma-mamdoh/cpu-schedulers-simulator

cpu-scheduling-algorithms cpu-simulator java java-swing operating-system

Last synced: 4 days ago
JSON representation

Our Project for Operating System Course taken during Winter 2023 semester

Awesome Lists containing this project

README

        

CPU Schedulers Simulator

Table of Contents


Introduction



Scheduling is a fundamental function of operating systems, and CPU scheduling plays a crucial role in resource utilization and system performance.
The CPU Schedulers Simulator is a Java program that simulates various CPU scheduling algorithms.
This project aims to provide a better understanding of different scheduling algorithms and their impact on process execution.

Implemented Algorithms



The simulator currently implements the following CPU scheduling algorithms:



  1. Non-Preemptive Shortest-Job First (SJF) with context switching

  2. Shortest-Remaining Time First (SRTF) Scheduling with starvation prevention

  3. Non-preemptive Priority Scheduling with starvation prevention


  4. AG Scheduling:

    • Round Robin (RR) Scheduling with AG-Factor

    • AG-Factor calculation based on a combination of priority, arrival time, burst time, and a random function

    • Preemptive and non-preemptive scheduling based on AG-Factor



Graphical User Interface



The simulator features a graphical user interface (GUI) that provides a Simple visual representation of the process execution order.

Project Overview



The CPU Schedulers Simulator allows you to input the necessary parameters for the simulation.
These parameters include the number of processes, time quantum for round-robin scheduling, and context switching time.
For each process, you provide the following details:



  • Process Name

  • Process Color (for graphical representation)

  • Process Arrival Time

  • Process Burst Time

  • Process Priority Number (for priority scheduling)



The simulator outputs the execution order of processes, waiting times, turnaround times, average waiting time, average turnaround time,
and history updates of quantum time for AG Scheduling.
Additionally, it generates a graphical representation of the process execution order.

Usage



  1. Clone the repository: git clone https://github.com/your-username/cpu-schedulers-simulator.git

  2. Compile the Java source files: javac *.java

  3. Run the simulator: java Main

Contributing



Contributions to the CPU Schedulers Simulator project are welcome.
If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the project's GitHub repository.