Hard Disk Drive Basics
Each disk consists of platters, rings on each side of each platter called
tracks, and sections within each track called sectors. A sector is the smallest
physical storage unit on a disk, almost always 512 bytes in size.
Figure below illustrates a hard disk with two platters. The remainder of this
section describes the terms used on the figure.

The cylinder/head/sector notation scheme described in this section is slowly
being eliminated. All new disks use some kind of translation factor to make
their actual hardware layout appear as something else, mostly to work with
MS-DOS and Windows 95.
Tracks and Cylinders
On hard disks, the data are stored on the disk in thin, concentric bands
called tracks. There can be more than a thousand tracks on a 3½ inch hard disk.
Tracks are a logical rather than physical structure, and are established when
the disk is low-level formatted. Track numbers start at 0, and track 0 is the
outermost track of the disk. The highest numbered track is next to the spindle.
If the disk geometry is being translated, the highest numbered track would
typically be 1023. Next figure shows track 0, a track in the middle of the disk,
and track 1023.
A cylinder consists of the set of tracks that are at the same head position
on the disk. In a figure below, cylinder 0 is the four tracks at the outermost
edge of the sides of the platters. If the disk has 1024 cylinders (which would
be numbered 0-1023), cylinder 1023 consists of all of the tracks at the
innermost edge of each side.

Most disks used in personal computers today rotate at a constant angular
velocity. The tracks near the outside of the disk are less densely populated
with data than the tracks near the center of the disk. Thus, a fixed amount of
data can be read in a constant period of time, even though the speed of the disk
surface is faster on the tracks located further away from the center of the
disk.
Modern disks reserve one side of one platter for track positioning
information, which is written to the disk at the factory during disk assembly.
It is not available to the operating system. The disk controller uses this
information to fine tune the head locations when the heads move to another
location on the disk. When a side contains the track position information, that
side cannot be used for data. Thus, a disk assembly containing two platters has
three sides that are available for data.
Sectors and Clusters
Each track is divided into sections called sectors. A sector is the smallest
physcial storage unit on the disk. The data size of a sector is always a power
of two, and is almost always 512 bytes.
Each track has the same number of sectors, which means that the sectors are
packed much closer together on tracks near the center of the disk. Next figure
shows sectors on a track. You can see that sectors closer to the spindle are
closer together than those on the outside edge of the disk. The disk controller
uses the sector identification information stored in the area immediately before
the data in the sector to determine where the sector itself begins.

As a file is written to the disk, the file system allocates the appropriate
number of clusters to store the file's data. For example, if each cluster is 512
bytes and the file is 800 bytes, two clusters are allocated for the file. Later,
if you update the file to, for example, twice its size (1600 bytes), another two
clusters are allocated.
If contiguous clusters (clusters that are next to each other on the disk) are
not available, the data are written elsewhere on the disk, and the file is
considered to be fragmented. Fragmentation is a problem when the file system
must search several different locations to find all the pieces of the file you
want to read. The search causes a delay before the file is retrieved. A larger
cluster size reduces the potential for fragmentation, but increases the
likelihood that clusters will have unused space.
Using clusters larger than one sector reduces fragmentation, and reduces the
amount of disk space needed to store the information about the used and unused
areas on the disk.
|