L.O.O.K
Theory :
The LOOK algorithm services request similarly as SCAN algorithm meanwhile it also
“looks” ahead as if there are more tracks that are needed to be serviced in the same direction. If
there are no pending requests in the moving direction the head reverses the direction and start
servicing requests in the opposite direction.
The main reason behind the better performance of LOOK algorithm in comparison to SCAN is because in
this algorithm the head is not allowed to move till the end of the disk.
Total head movements incurred while servicing these requests = (60-50)+(79-60)+(92-79) +(114-92)+(176-114) +(176-41)+(41-34)+(34-11) = 291
Advantages:
- If there are no requests left to be services the Head will not move to the end of the disk unlike SCAN algorithm.
- Better performance is provided compared to SCAN Algorithm.
- Starvation is avoided in LOOK scheduling algorithm.
- Low variance is provided in waiting time and response time.
Disadvantages:
- Overhead of finding the end requests is present.
- ylinders which are just visited by Head have to wait for long time.
Example:
Consider a disk queue with requests for I/O to blocks on cylinders (176, 79, 34, 60, 92, 11, 41, 114) The LOOK scheduling algorithm is used. The head position is 50.Total head movements incurred while servicing these requests = (60-50)+(79-60)+(92-79) +(114-92)+(176-114) +(176-41)+(41-34)+(34-11) = 291