In the last post we discussed about C-SCAN disk scheduling algorithm. Today we will be discussing about LOOK disk scheduling . We will discuss about its advantage over other disk scheduling algorithms so let's start shall we ?
LOOK disk scheduling
LOOK disk scheduling algorithm is similar to SCAN disk scheduling. The only difference is that in SCAN the read/write head moves till the last track even if there is no request at the last track but in LOOK you do not move read/write head till the last track.Let's understand this better with the help of an example:
98, 183, 41, 122, 14, 124, 65, 67
Arrange the requests according to LOOK disk scheduling. Initially the read/write head is at 53.
sol
1. Initially the read/write head is at 53.
2. Now we will start executing requests towards right of 53( you can go either left or right).
3. First it will fulfill the request 65.
4. Then it will fulfill the request 67.
5. Then it will fulfill the request 98.
6. Then it will fulfill the request 122.
7. Then it will fulfill the request 124.
8. Then it will fulfill the request 183.
9. Now unlike SCAN, LOOK will not go till the 199 and it will reverse from 183 onwards.
10. Then it will fulfill the request 41.
11. Then it will fulfill the request 14.
Advantages
- Better performance compared to SCAN.
- It should be used in case of less load.
Disadvantages
- There is an overhead to find the last request.