A Python implementation of the LOOK Disk Scheduling Algorithm with seek path generation and total cylinder movement calculation.
This project demonstrates the implementation of the LOOK (Look Ahead) Disk Scheduling Algorithm, a commonly used disk scheduling technique in Operating Systems.
Unlike the SCAN algorithm, LOOK does not move the disk head all the way to the disk boundary. Instead, it moves only as far as the last pending request in the current direction before reversing.
In this implementation, the disk head moves right first, services all requests on the right side, then reverses direction and services the remaining requests on the left side.
The simulator calculates:
- Disk head movement path
- Seek sequence
- Total cylinder movement
- Final servicing order
The project was developed and tested using Google Colaboratory (Google Colab).
- LOOK Disk Scheduling Simulation
- Right-First Head Movement Strategy
- Seek Path Generation
- Total Cylinder Movement Calculation
- Efficient Disk Head Traversal
- Google Colab Notebook Included
- Python Source Code Included
LOOK is an improved version of the SCAN Disk Scheduling Algorithm.
Instead of moving the disk head to the extreme end of the disk, LOOK only travels up to the last request in the current direction and then reverses.
- Less head movement than SCAN
- Improved seek performance
- Reduced unnecessary traversal
- Efficient request servicing
- Requires sorting of requests
- Performance depends on request distribution
- Requests in the opposite direction may experience longer waits
- Start from the current disk head position.
- Divide requests into:
- Right-side requests
- Left-side requests
- Sort right-side requests in ascending order.
- Sort left-side requests in descending order.
- Service all right-side requests first.
- Reverse direction.
- Service all left-side requests.
- Calculate total cylinder movement.
- Return the final seek path.
queue = [98, 183, 37, 122, 14, 124, 65, 67]
start = 53Path: [53, 65, 67, 98, 122, 124, 183, 37, 14]
Total cylinder movement: 299
53 โ 65 โ 67 โ 98 โ 122 โ 124 โ 183 โ 37 โ 14
| From | To | Distance |
|---|---|---|
| 53 | 65 | 12 |
| 65 | 67 | 2 |
| 67 | 98 | 31 |
| 98 | 122 | 24 |
| 122 | 124 | 2 |
| 124 | 183 | 59 |
| 183 | 37 | 146 |
| 37 | 14 | 23 |
12 + 2 + 31 + 24 + 2 + 59 + 146 + 23
= 299
The project was implemented and tested using Google Colaboratory.
LOOK-Disk-Scheduling-Simulator/
โ
โโโ LOOK_Disk_Scheduling.ipynb
โโโ look.py
โโโ README.md
โโโ LICENSE
โโโ .gitignore
โ
โโโ screenshots/
โโโ colab-workspace.png
โโโ output.png
git clone https://github.com/tausif112/LOOK-Disk-Scheduling-Simulator.gitcd LOOK-Disk-Scheduling-Simulatorpython look.py| Technology | Purpose |
|---|---|
| Python | Core Implementation |
| Google Colab | Development Environment |
| GitHub | Version Control |
| Operating Systems | Disk Scheduling Concepts |
- C-LOOK Disk Scheduling
- SCAN Disk Scheduling Comparison
- C-SCAN Disk Scheduling Comparison
- SSTF Disk Scheduling Comparison
- Graphical Seek Path Visualization
- Interactive User Input
- Dynamic Disk Request Input
- Comparison Between Disk Scheduling Algorithms
Department of Computer Science & Engineering (CSE)
University of Asia Pacific (UAP)
GitHub: https://github.com/tausif112
โญ If you found this project useful, consider giving it a star!

