This project simulates process scheduling using the Round Robin algorithm. The simulation includes process creation, execution, and visualization.
| Directory | Content |
|---|---|
docs/ |
📄 Project documentation |
src/ |
📂 Source code files |
input/ |
📑 Input files for the simulation |
.gitignore |
🚫 Specifies files to ignore in the repository |
LICENSE |
⚖️ Project license |
README.md |
📜 Project overview and instructions |
This project simulates process scheduling using the Round Robin algorithm. The simulation manages multiple processes, each with specified CPU and I/O times. The processes are executed and visualized using a graphical user interface.
| Feature | Description |
|---|---|
| 🕹️ Process Scheduling | Implements the Round Robin scheduling algorithm for process management. |
| 📊 Graphical Visualization | Real-time graphical interface to visualize process states and execution. |
| 📈 Detailed Metrics | Reports process metrics such as waiting time, response time, and turnaround time. |
-
Clone the repository:
git clone https://github.com/rxElectron/RoundRobin_Scheduler.git cd RoundRobin_Scheduler -
Install the required dependencies:
pip install -r requirements.txt pip install -r requirements.txt --break-system-packages
You cannot install tkinter using pip because it is not available as a standalone package. Instead, it comes bundled with Python installations. Here’s how you can ensure you have it:
-
Windows: Tkinter is included with the standard Python installation. If you installed Python from the official installer, you should already have it.
-
Ubuntu/Debian: You can install Tkinter with:
sudo apt-get install python3-tk
-
Fedora: Use the following command:
sudo dnf install python3-tkinter
-
macOS: Tkinter is usually included with the Python installation from python.org. If you installed Python via Homebrew, you might need to install it separately:
brew install python-tk
To check if Tkinter is installed correctly, run:
import tkinter
tkinter._test()If a small window appears, Tkinter is working.
-
Run the simulation:
Navigate to the
srcdirectory and execute theMain.pyscript.cd src python Main.py -
Input File:
The
input/Input.txtfile contains the initial processes with their respective CPU and I/O times. -
Graphical User Interface:
The GUI allows you to start, add, and retry processes. It also displays the Gantt chart for process execution.
| File | Description |
|---|---|
src/__SRCs.py |
📚 Contains auxiliary functions and standard libraries. |
src/__PROCESS.py |
🏭 Defines the PROCESS class, which simulates each process with attributes like ID, priority, and execution behavior. |
src/__IO.py |
📥 Handles reading process input from a text file and includes the TextRedirector class to manage output redirection. |
src/__OS.py |
🖥️ Implements the OS class for process management, including adding, removing, and running processes using Round Robin scheduling. |
src/__GUI.py |
🖼️ Provides a graphical user interface for the simulation, utilizing tkinter and threading for real-time updates. |
src/Main.py |
🚪 The main entry point of the program, which initializes and runs the application. |
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or inquiries, please contact Reza Khodarahimi at kh.reza10@gmail.com.
- Thank you to all contributors and open-source projects that made this project possible.