==========================================================================
PROCESS SCHEDULING SIMULATOR | OPERATING SYSTEMS PROJECT
==========================================================================
1. PROJECT DESCRIPTION:
This project implements a simulation of CPU scheduling algorithms with respect to Operating Systems course.
The following algorithms can be executed by both a Graphical User Interface (GUI) and Command Line Interface (CLI):
1. FCFS (First-Come, First-Served) - Non-preemptive
2. SJF (Shortest Job First) - Non-preemptive
3. Priority Scheduling - Non-preemptive (Lower number indicates higher priority)
4. Round Robin (RR) - Preemptive (Configurable Time Quantum)
2. FILE STRUCTURE
- gui.py : The Graphical User Interface version of the project.
- fcfs.py : Source code for the FCFS algorithm.
- sjf.py : Source code for the SJF algorithm.
- rr.py : Source code for the Round Robin algorithm.
- ps.py : Source code for the Priority Scheduling algorithm.
- /inputs : sample input files for testing
- README.txt : This documentation file.
3. REQUIREMENTS
- Python 3.x must be installed.
- The 'tkinter' library is required for the GUI version (It comes standard with Python).
4. EXECUTION INSTRUCTIONS
A) GRAPHICAL USER INTERFACE (RECOMMENDED)
To manage all algorithms from a single screen, view the colorful Gantt chart and analyze statistics:
$ python gui.py
(In the window that opens, select a text file using the "Select Input File" button, choose an algorithm, and click "RUN SIMULATION".)
B) COMMAND LINE INTERFACE
You can run each algorithm individually via the terminal using the following commands:
1. To run FCFS:
$ python fcfs.py input.txt
2. To run SJF:
$ python sjf.py input.txt
3. To run Priority Scheduling:
$ python ps.py input.txt
4. To run Round Robin (Time Quantum must be specified, e.g., 2):
$ python rr.py input.txt 2
5. INPUT FILE FORMAT
Input files must be in text (txt) format and each line must represent a single process.
Columns can be separated by commas or spaces.
Format:
Process_ID, Arrival_Time, Burst_Time, Priority
Example (input.txt):
P1, 0, 8, 3
P2, 1, 4, 1
P3, 2, 9, 4
P4, 3, 5, 2
Note: The "Priority" column is ignored in FCFS, SJF, and RR algorithms but it is recommended to include it to maintain format consistency.
Author: Ekin Karıncalı
Course: CENG 305 - Operating Systems
Date: December 2025