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

https://github.com/duaa-a/cpu_schedulers_simulator

A Java-based project implementing various CPU scheduling algorithms.
https://github.com/duaa-a/cpu_schedulers_simulator

cpu-scheduling cpu-scheduling-algorithms java

Last synced: 8 months ago
JSON representation

A Java-based project implementing various CPU scheduling algorithms.

Awesome Lists containing this project

README

          




CPU Scheduler Simulator


A Java-based project implementing various CPU scheduling algorithms.




Overview


This repository contains implementations of various CPU scheduling algorithms, including:



  • First-Come-First-Serve (FCFS)

  • Shortest Job First (SJF)

  • Shortest Remaining Time First (SRTF)

  • Priority Scheduling


Files in the Repository




  • FCAI.java: Handles First-Come-First-Serve scheduling.


  • GanttChartFCAI.java: Generates Gantt chart for FCFS scheduling.


  • GanttChartPriority.java: Generates Gantt chart for Priority Scheduling.


  • GanttChartSJF.java: Generates Gantt chart for SJF scheduling.


  • GanttChartSRTF.java: Generates Gantt chart for SRTF scheduling.


  • Main.java: Entry point of the project.


  • PriorityScheduling.java: Handles Priority Scheduling logic.


  • Process.java: Represents a process with attributes like arrival time, burst time, and priority.


  • SJF.java: Implements Shortest Job First scheduling.


  • SRTF.java: Implements Shortest Remaining Time First scheduling.


  • displayResults.java: Displays the results of scheduling algorithms.


  • input.txt: Input file containing process data for testing.


  • inputFCAI.txt: Alternative input file for FCFS scheduling.


How to Use



  1. Compile the Java files using javac.

  2. Run the Main.java file to execute the program.

  3. Edit the input.txt file to test with custom process data.


Gantt Chart Generation


The project includes Gantt chart visualizations for each scheduling algorithm to better understand the process flow.


Dependencies


No external libraries are required. The project is built using core Java.


Contributors


Developed by:



  • Duaa

  • Yousif

  • Helana

  • AbdelRahman


License


This project is open-source. Feel free to use and modify it as needed.

© 2025 CPU Scheduling Project