A Python-based simulator for the Multi-Level Feedback Queue (MLFQ) scheduling algorithm, commonly used in operating systems to manage process scheduling.
- Simulates the MLFQ scheduling algorithm.
- Visualizes scheduling behavior using matplotlib.
- Generates GIFs of scheduling processes using imageio.
Ensure you have a Python virtual environment activated:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
Install the required Python packages:
pip install matplotlib imageio
Run the simulator using the following command:
python -m mlfq-simulator.main
📂 mlfq-simulator
├── main.py # Entry point for the simulator
├── scheduler.py # Core logic for MLFQ scheduling
├── visualizer.py # Visualization and GIF generation
└── README.md # Project documentation
The MLFQ simulator models a multi-level feedback queue scheduling system:
- Multiple Queues: Processes are assigned to different priority levels.
- Dynamic Priority Adjustment: Processes move between queues based on their behavior.
- Visualization: The scheduling process is visualized step-by-step.
The simulator generates a graphical representation of process scheduling
A GIF of the scheduling process is saved for further analysis
For detailed information, refer to the implementation in visualizer_service.py
.
Contributions are welcome! Feel free to submit issues or pull requests to improve the simulator.
Ryvel Timothy UESTC, Spring 2025 Course: Operating Systems