LOOK disk scheduling algorithm - operating system tutorial


If you are new to disk scheduling then please read about basics of disk scheduling first and then read this post on LOOK disk scheduling algorithm.
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

LOOK disk scheduling algorithm - operating system tutorial


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

  1. Better performance compared to SCAN.
  2. It should be used in case of less load.

Disadvantages

  1. There is an overhead to find the last request.

Post a Comment (0)
Previous Post Next Post