An interactive Python GUI to animate and compare disk scheduling algorithms- FCFS, SSTF, SCAN, C-SCAN, LOOK, and C-LOOK with real-time seek plots and PDF report export.
Disk Scheduling Visualizer is a desktop application built for students and educators studying Operating Systems. It brings disk scheduling algorithms to life with animated head movement plots, instant seek-time results, side-by-side algorithm comparisons, and exportable PDF reports - all through a clean tkinter GUI.
- 🎬 Live Animation: Watch the disk head sweep across tracks in real time
- 📊 Algorithm Comparison: Run multiple algorithms simultaneously and compare seek times via bar chart
- 🏆 Winner Highlight: Automatically highlights the most efficient algorithm in green
- 📄 PDF Report Export: Save your simulation inputs, results, and sequence to a PDF
- 🔊 Audio Narration: Text-to-speech support via
pyttsx3andgTTS - 🎛️ Configurable Parameters: Set head position, direction, cylinder range, and request queue freely
| Algorithm | Description |
|---|---|
| FCFS | First-Come, First-Served - serves requests in arrival order |
| SSTF | Shortest Seek Time First - always picks the nearest request |
| SCAN | Elevator algorithm - sweeps in one direction, then reverses |
| C-SCAN | Circular SCAN - sweeps one way, jumps back to the start |
| LOOK | Like SCAN but only goes as far as the last request |
| C-LOOK | Circular LOOK - jumps back to the lowest request, not cylinder 0 |
- Python 3.7+
tkinter(bundled with most Python installations)matplotlibnumpypyttsx3gTTSfpdfPillow
1. Clone the repository
git clone https://github.com/MusaIslamFahad/disk-scheduling-visualizer.git
cd disk-scheduling-visualizer2. Install dependencies
pip install matplotlib numpy pyttsx3 gTTS fpdf Pillow3. Run the application
python OS_PROJECT.py- Enter a comma-separated list of disk request points (e.g.,
98, 183, 37, 122, 14) - Set the Initial Head Position (e.g.,
53) - Choose a Direction (
LEFTorRIGHT) for directional algorithms - Select an algorithm from the dropdown
- Click RUN to watch the animation
- Click SAVE to export a PDF report
- Use the same inputs as above
- Check all the algorithms you want to compare
- Click RUN COMPARISON to see a bar chart — the green bar is the winner
| Parameter | Value |
|---|---|
| Request Queue | 98, 183, 37, 122, 14, 124, 65, 67 |
| Head Start | 53 |
| Direction | RIGHT |
| Max Cylinder | 200 |
Expected outcome: SSTF typically produces the lowest total seek time; FCFS the highest. SCAN shows the classic elevator sweep pattern.
disk-scheduling-visualizer/
│
├── -VISUALISATION-OF-DISK-SCHEDULING-ALGORITHM-USING-GUI-PYTHON-main/
│ └── OS_PROJECT.py # Main application entry point
│
└── README.md
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
This project is licensed under the MIT License.
Musa Islam Fahad
- GitHub: @MusaIslamFahad
⭐ If you found this project helpful, please give it a star. It motivates further development!