LOOK algorithm
LOOK is a disk scheduling algorithm used to determine the order in which new disk read and write requests are processed.
Description
The LOOK algorithm is the same as the SCAN algorithm in that it also honors requests on both sweep direction of the disk head, however, this algorithm "Looks" ahead to see if there are any requests pending in the direction of head movement. If no requests are pending in the direction of head movement, then the disk head traversal will be reversed to the opposite direction and requests on the other direction can be served. In LOOK scheduling, the arm goes only as far as final requests in each direction and then reverses direction without going all the way to the end. Consider an example, the work queue be 98, 183, 37, 122, 14, 124, 65, 67 tracks and the disk head starts at number 53. Suppose, there are 200 cylinders from 0-199, then the arm will move in the increasing order first and then will move in decreasing order after reaching the end. So, the order in which it will execute is 65, 67, 98, 122, 124, 183, 37, 14.[1]
Variants
One variant of LOOK is C-LOOK, which fulfills requests in one direction only. That is, C-LOOK starts at the innermost cylinder requested and moves outward fulfilling requests until it reaches the last request. Then it moves directly back to the innermost request and starts fulfilling requests moving outward again.
Performance
LOOK has slightly better average seek times than SCAN. C-LOOK has a slightly lower variance in seek time than LOOK since the worst case seek time is nearly cut in half.
See also
Other variations include:
- SCAN - Elevator algorithm
- FSCAN
- N-Step-SCAN
References
- ^ "Disk scheduling". Archived from the original on 2007-11-28. Retrieved 2008-01-21.