Skip to content

Python-based educational tool that simulates scheduling algorithms (FCFS, SJF, RR, SRTF, LJF), generates Gantt Charts, and calculates waiting times to aid operating systems course studies.

License

Notifications You must be signed in to change notification settings

karahanbuhan/process-scheduler-study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Process Scheduler Study

process_scheduler_study is a Python-based educational tool designed to simulate CPU scheduling algorithms (FCFS, SJF Non-Preemptive, RR (Round Robin), LJF Non-Preemptive and SRTF) for operating systems courses. It allows users to input process details (PID, arrival time, burst time), select an algorithm, and specify a quantum for Round Robin. The tool generates a Gantt Chart using Matplotlib and calculates waiting times and average waiting time to aid in studying scheduling concepts.


Screenshots

screenshot1 screenshot2

Features

  • Supports FCFS, SJF (Non-Preemptive), Round Robin, LJF (Non-Preemptive) and SRTF scheduling algorithms.
  • Interactive Tkinter GUI for entering process details and algorithm selection.
  • Random process generation for quick testing.
  • Visualizes results with Gantt Charts and displays waiting times.
  • Calculates average waiting time as a float (e.g., 5.4) and also in fraction format (e.g. 3/10).

Requirements

  • Python 3.6 or higher
  • Matplotlib (pip install matplotlib)

Setup Instructions

Clone the Repository

git clone https://github.com/your-username/process_scheduler_study.git
cd process_scheduler_study

Install Dependencies and Run

Install Dependencies

pip install -r requirements.txt

Run the Application

python3 src/main.py

This launches a Tkinter GUI where you can input processes, select an algorithm, and view the Gantt Chart and results.


Usage

  1. Enter the number of processes (1–10) in the GUI.
  2. Provide PID, arrival time, and burst time for each process, or click "Generate Random" for automatic input.
  3. Select an algorithm (FCFS, SJF, RR or SRTF) from the dropdown menu.
  4. For RR, specify a quantum value.
  5. Click "Run" to simulate and view the Gantt Chart, waiting times, and average waiting time.

License

This project is licensed under the MIT License - see the LICENSE file for details.