In the SCAN algorithm, the disk arm starts at one end of the disk and moves toward the other end, servicing requests as it reaches each cylinder, until it gets to the other end of the disk.
At the other end, the direction of head movement is reversed, and servicing continues. The head continuously scans back and
forth across the disk.
The SCAN algorithm is sometimes called the elevator algorithm, since the disk arms behaves just like an elevator in a building, first servicing all the requests going up and then reversing to service requests the other way.
For our example request queue, we need to know the direction of head movement in addition to the head's current position, 53 (see Fig. 12.9);
37, 14, 65, 67, 98, 122, 124, 183
SCAN disk scheduling.
If a request arrives in the queue just in front of the head, it will be serviced almost immediately
If a request arriving just behind the head will have to wait until the arm moves to the end of the disk, reverses direction, and comes back.
Assuming a uniform distribution of requests for cylinders, consider the density of requests when the head reaches one end and reverses direction.
At this point, relatively few requests are immediately in front of the head, since these cylinders have recently been serviced.
The heaviest density of requests is at the other end of the disk.
These requests have also waited the longest, so why not go there first?