Hard disk scheduler

from Wikipedia, the free encyclopedia
Hard disk : where should the head go first?

The hard disk scheduler is part of operating systems and regulates the time sequence ( scheduling ) of read and write jobs on hard disks and other storage devices.

The following techniques are used to ensure the best possible utilization of the hard disk:

First come, first served ( FCFS )
With this algorithm, the read and write jobs are passed on to the storage device in the order in which they are received. It can be used with storage devices such as flash memories, where any position can be accessed without wasting too much time (e.g. repositioning a read / write head).
Shortest seek first
This algorithm is a direct improvement on FCFS. From a set of read / write jobs, the one that is closest to the hard disk's read / write head is selected. One advantage of this approach is its simplicity; a serious disadvantage is that data on the edge of the hard disk may have to wait a very long time before being read or written.
Elevator algorithm
The elevator algorithm is so named because it behaves similarly to an elevator . The current position of the hard drive arm and its direction of movement are known. After each completed read / write job, it moves on to the next job in this direction until there is no more job to do in that direction. Then the direction of movement is reversed.
Sawtooth algorithm
This algorithm is similar to the elevator algorithm, but the data is only searched in ascending order. The hard disk head then moves back in one long movement to the beginning of the disk (or to the lowest pending read / write job). The advantage of this approach is that the cache memory, which is built into every modern hard disk, and the read-ahead of data provided by many hard disks are better utilized than is the case with the descending search movement of the elevator Algorithm is the case.

A hard disk scheduler can also handle write and read jobs with different priorities. The latter are urgently needed because the program that requested the data is usually waiting for them. Data to be written on the other hand may optionally cached are, before they are actually written to the storage medium.

See also