Hard disk drives are called by that name because they are not floppy (as in floppy disk drives). They are organized as a concentric stack of disks or "platters":
Each platter has two surfaces (although in practice the outer surfaces on the top and bottom of the stack are often unused because of physical space considerations), and each has its own read/write head (which reads and writes data magnetically on the surface). The data is stored on concentric circles on the surfaces known as tracks:
Corresponding tracks on all surfaces on a drive, when taken together, make up a cylinder:
The time it takes to move the read/write head to the desired cylinder is called the seek time.
Since an individual data block is one sector of a track:
The following applet allows you to simulate these algorithms under a
variety of load conditions:
It is interesting to note that most IDE (Integrated Drive Electronics),
SCSI (Small Computer System Interface) and SATA (Serial ATA, or "Advanced Technology Attachment") disk drives pretend to
have a far different geometry than they
actually have physically. For instance, a typical hard drive might tell the operating system that
it has 16,384 cylinders, 80 heads and 63 sectors per track; since 80 heads implies at least 40
platters, each with 2 surfaces, we see immediately that this cannot represent the physical contents
of a hard drive which is just 3/4 of an inch thick! In fact, most hard drives have only one or two platters,
and the geometry they pretend to have is there for the software's sake, as we shall see below.
IDE, SCSI and SATA disk drives can address blocks logically, treating the disk drive as a series of blocks
numbered from 0 to n.
It might seem, then, that organizing the drive in this geometrical fashion is unnecessary.
There are still two reasons why disk geometry is relevant:
If the requests were serviced on a first come
first served basis (FCFS, or first in first out - FIFO), the head would in general have to move
randomly back and forth over the surfaces. This can make seek times unnecessarily large, since
it takes extra time for the head to change direction. The seek scheduling algorithm
SCAN attempts to make the head move smoothly across the surface, reading and writing
data as the appropriate tracks appear under the heads. It is also possible to schedule based on serving the
shortest seek time first (SEEK).
Start the simulation using the Start button. After it has finished,
you may change any parameters (or not) and start a new simulation using the Start button again.
The display indicates in red when and where a request is made and in black the path followed by the disk head.
The message window displays a summary of each simulation. The message window can be cleared using the Clear button.
Consider our disk drive which has 16,384 cylinders, 80 heads and 63 sectors per track. For historical reasons, a sector has 512 bytes (which suggests that early operating systems allocated just 9 bits for the sector part of a disk address; 512 = 29). What is the capacity of such a disk? We can use units to calculate how much storage is available. Our basic equation is
The following applet allows you to simulate these algorithms under a variety of load conditions:
? bytes = 1 diskThe conversion factors appropriate to this hard disk are
Notice that the traditional nomenclature is "heads per cylinder" and "sectors per track". Since there is only one head able to access any given track (on any given surface), we have an implicit conversion factor available to us:
1 track / headNote too that two of these conversion factors correspond to powers of 2:
16,384 = 214This suggests that these values are intimately related to the number of bits which are used to store the cylinder and sector numbers, respectively.
63 = 26 - 1
The computation of the hard drive capacity then proceeds as follows:
? bytes = 1 disk * (16,384 cylinders / disk) * (80 heads / cylinder) * (1 track / head) *This is a large and rather inconvenient number. We adopt the following "metric" prefixes when discussing storage space:
(63 sectors / track) * (512 bytes / sector)
= 42,278,584,320 bytes
Using these definitions, our result would be expressed in GB as :
42,278,584,320 bytes / (1,073,741,824 bytes / GB) = 39.375 GBThese definitions represent common usage among memory manufacturers and operating systems programmers, in contradiction to the strict powers of ten used by scientists throughout the world, as well as by hard drive manufacturers:
It is important to realize that the manufacturers of most disk drives quote capacities which are considerably larger than the actual usable amount of space available on the drive. This is because some space is unavoidably lost when the "raw" tracks are separated into sectors: sectors have gaps between them which are needed for timing reasons, and they also have addresses and checksums for error checking. So our 39.375 GB would be described by a manufacturer as something noticably larger than the 42.279 GB which strict powers of ten would imply.
We turn next to the computation of speed, throughput and utilization.
©2012, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.