What is the LOOK disk scheduling algorithm?

Introduction

The LOOK algorithm is a disk scheduling algorithm that serves requests generated by the memory management unit. It is similar to the SCAN algorithm, as it evaluates the pending requests on both sweep directions of the disk head.

The fundamental difference between the two disk scheduling algorithms is that the LOOK algorithm only moves till the last request instead of until the end of the disk since it “looks” ahead. That’s why we call it the LOOK algorithm.

The traversal direction is reversed if there are no requests insight, eliminating the unnecessary portion traveled during the SCAN Algorithm.

While LOOK’s average seek times are somewhat faster than SCAN’s, the cost of locating the final request is higher.

Example

Let’s consider a disk with a total of 200200 tracks(01990-199), and a request queue containing track numbers [86,103,32,95,24,15,10,153]. The current position of the read-write head is 5757, and we have to find the total number of track movements in cylinders.

To complete these requests, the arm will first travel in an ascending sequence, then in descending order after it reaches the finish. So, the execution order would be 86, 103, 153, 95, 32, 24, 15, 10. We can find the execution direction visualized below.

The total number of the track movements would be (15357)+(15310)(153-57) + (153-10), which will be equal to 239239

Execution order

Free Resources