This project implements a scheduler simulator using C++ for process scheduling and Python for Gantt chart visualization. It supports 2 scheduling algorithms such as First-Come-First-Served (FCFS) and Round Robin (RR).
- Scheduling Algorithms:
- First-Come-First-Served (FCFS)
- Round Robin (RR) with configurable time quantum
- Gantt Chart:
- Generates a
gantt_chart.csvfile with process scheduling data. - Visualizes the Gantt chart using Python's
matplotlib.
- Generates a
-
C++ Compiler: Install
g++.- Ubuntu/Debian:
sudo apt update && sudo apt install g++ - macOS:
xcode-select --install
- Windows: Install MinGW.
- Ubuntu/Debian:
-
Python Environment:
- Install Python (version 3.7 or higher).
- Install
matplotlib:pip install matplotlib
- Navigate to the project folder:
cd scheduler_simulator - Compile the C++ program:
g++ -std=c++11 -o scheduler_simulator main.cpp
- Run the program:
./scheduler_simulator
- Input the number of processes, their attributes (arrival time, burst time, and priority), and select the scheduling algorithm.
- The program will generate a
gantt_chart.csvfile with scheduling data.
- Run the Python script to visualize the Gantt chart:
python3 visualize_gantt.py
- The Gantt chart will be displayed in a pop-up window.