Hard disks are still the most popular form of persistent data storage.
Inside a HDD is a series of round platters (disks) that spin. This is a magnetic surface which is read and written to. Most modern HDDs spin in the 7200RPM range or higher.
Each platter is made up of a series of tracks, which are concentric rings on the surface of the disk. To access a track, the HDD move a head attached to an arm so it can move between tracks. The pivot point is the center of the disks.
Tracks are broken down into smaller sections called sectors. A sector is the smallest unit of the disk that can be read or written to at a single time.
The speed of a disk is made up of three components.
- The seek time is the time to move the r/w head from the current position to the track containing the desired data.
- The rotational delay (rotational latency) is the time to wait for the desired data item to pass under the r/w head. On average, the rotational delay is one half of the time of one disk revolution. The faster the disk is spinning, the lower the rotational delay, faster (data transfer) disks spin faster. Old HD used to spin in the 5000 RPM range, typically 7200 – 10000 is common now, although some spin faster.
- The data transfer time is the time to transfer the desired number of bits to or from the disk, and is directly proportional to the disk’s rotational speed. (Another reason to find a faster spinning disk.)
Peak transfer rate how fast the data is streamed once the read/write head is at the beginning of the sector to be transferred. The peak transfer rate depends directly on the rotational speed of the disk and the number of sectors per track.
Sustained data rate is how fast the disk can transfer data continuously. The sustained data rate includes the seek times over multiple tracks and other overhead in accessing the data over time. This will be slower than the peak rate as it accounts for the head having to move which adds in the seek time.
Disk Scheduling Algorithms
Given that seek time is one of the slowest processes – optimizing that action can potentially improve disk performance significantly. The main objective is to minimize the movement of the r/w head while also guaranteeing the ability to service all requests in a reasonable time.
The shortest seek time first (SSTF) scheduling algorithm considers all of pending requests and always selects the request that requires the shortest travel distance from the current position.
The scan scheduling algorithm mimics the behavior of an elevator in a building. It keeps the movement of the head in the same direction, until there are no more requests in that direction. This potentially moves the head from track 0 to track n-1, and back each time. But since the head doesn’t have to stop and change direction, it provides potentially less stress and ensures all requests are met.
The C-Scan scheduling algorithm is a variant of the scan algorithm but only services requests in one direction. When the end is reached, it returns to the beginning and then starts to move again. This means it takes the same time to access a track, regardless of where the head was.
Disk Scheduling and Organization was originally found on Access 2 Learn