|
If you were to take some form of martial arts, the instructor would show you how to
do some basic punches and kicks before teaching you to spar or compete. The
instructor would be well aware that jumping into combat without the basics could
do you more damage than good. PC repair works the same way: before discussing
the installation and configuration of IDE and SCSI devices, it is important to cover
some basics.
Disk geometry
This article will introduce you to disk geometry. You will learn some of the terminology
that is required in order to understand the internal construction of a disk.
Platters
A platter is a physical object (actually, a plate) that resides inside the hard disk and
is responsible for storing the data. A platter is similar to a record on an old record
player—the main difference being that a hard disk has many platters, while a
record player only holds one record at a time.
The platters are very much like records on a record player in the sense that they
spin around in a circle on a spindle that runs through the center of all the platters.
Each platter has two sides for storing information, and each side of the platter has
a unique ID. The ID for the first side of the first platter is 0, and each side increases
by 1. For example, if there were two platters in the disk, the first platter would have
Side 0 and Side 1, while the second platter would have Side 2 and Side 3.
Since there will be a writing mechanism—a head—for each side of the platter,
many people use the terms “head” and “side” interchangeably. The head is more
accurately called the read/write head, because it will move over the disk surface
and read or write to the disk. Like a needle on a record player, the read/write head
moves over the surface of the disk with the help of an arm, called the actuator arm
(also known as the head positioning mechanism).
There is a read/write head for each platter surface on the disk. When information
is written to the disk, the read/write head will move to the same track on all platters
in a single movement and then write to the same track on all platters. The
actuator arm has multiple read/write heads on it.
Tracks
Just as there are grooves, or tracks, on a record or music CD, there are also tracks
on each platter. These tracks are evenly spaced across the platter’s surface.
Sectors
The platter is divided into pie slices, thus dividing the tracks into 512-byte sectors.
Sectors are the actual storage areas for data, and each has an address that is made
up of the platter side number, the track number, and the sector number on that
track.
For the Core Hardware exam, know that a low-level format is performed by the
manufacturer and is responsible for preparing the disk for data storage by creating
the tracks and sectors.
Clusters
A group of any number of sectors can make up a cluster. When a partition is formatted,
the file system will determine the cluster size based off the partition size. For
example, a partition that is 2GB in size formatted as FAT will use a 32K-cluster size.
That same 2GB partition formatted as FAT32 will use only a 4K-cluster size.
Having a partition use a 4K-cluster size means there will be 8 sectors that make up a
cluster. Keep in mind that once a file has been saved to the cluster, no other file can
occupy that cluster. For example, if you had a 32K-cluster size and you saved a 3K
file to the hard disk, the file would be saved to an empty cluster—but only 3K of it
would be used, and the remaining 29K would be left unused. The remaining 29K is
now considered unusable space; no other file can be saved to that unused 29 K.
Cylinders
Each platter in the disk contains the same number of tracks; these tracks are numbered
from the outside in, starting with zero. For example, if there were ten tracks
on a platter, the track closest to the edge of the platter would be Track 0, while the
track closest to the center would be Track 9.
A cylinder consists of the same track on both sides of all the platters. In other
words, when you reference Track 0, you reference a particular track on a particular
platter, but when you reference Cylinder 0, you reference Track 0 on all platters.
If you know the number of cylinders, heads, and sectors per track, you can calculate
the size of a disk. For example, if you have a drive that has 4,092 cylinders, 16
heads, and 63 sectors per track, the size of the disk would be 2,111,864,832 bytes
(2.1GB). The formula to calculate the size of the disk is Cylinders × Heads × Sectors
× 512 bytes per sector.
Read/write process
Platters are divided into 512 byte sectors. These sectors are the area on the platter
that data is written to. The platters have a magnetic coating applied to them that is
extremely sensitive to magnetism.
While the platters are rotating in a circle, the read/write heads are moved over the
disk surface to the location where they need to write (or save) information. The
read/write heads do not actually touch the surface of the disk platters; instead,
they “hover” about ten micro-inches (or millionths of an inch) above—that’s not
even enough space to place a hair between the read/write head and the platter’s
surface. This design helps improve disk performance, because a read/write head
that made contact with the platter would cause friction, slowing down the rotation
speed of the disk.
While the platters spin around in circles, the read/write head moves from track to
track until it reaches the desired one. Then it waits for the appropriate sector to
move underneath it, at which time the read/write head is energized to apply a magnetic
charge to the particles in the disk coating. This changes the particle binary
state from zero to one, thus creating data.
Performance
Disk performance can be measured in terms of several important characteristics:
seek time, latency, access time, and the spin speed of the disk.
Measuring Hard Disk Performance
Seek time is the time it takes to move the read/write heads to the
desired track. Seek time is a calculated average, since the time it takes
to move to the desired track will differ from one instance to another.
For example, if the read/write heads are on Track 1, they will take a
longer amount of time moving to Track 12 than to Track 3 (because the
distance is greater between Track 1 and Track 12). Seek time is
measured in milliseconds, or millionths of a second.
Latency is the time it takes for the appropriate sector to move under
the read/write head. Latency is measured in milliseconds.
Access time Access time is a term used to describe the overall speed of the disk. It is
a combination of seek time and latency. The lower the access time, the
better.
Spin speed is the speed at which the platters spin in a circle, measured
in revolutions (rotations) per minute, or rpm. The larger the rpm value
the faster the disk, which means less latency.
Master boot record
While I’m discussing disk geometry, I should make a brief comment about the
Master Boot Record. The Master Boot Record (MBR) is the first sector on the first
track of the first side of the first platter; it holds the operating system boot code
that controls the loading of the operating system.
The MBR also holds drive characteristics—such as the partition table. During the
boot process the system has to find a primary partition that is active and it will do
this by looking in the boot record.
In general, if anything goes wrong with the MBR, you will be unable to boot the system.
Since this boot record is always found in the same location on every disk, it
becomes very easy for developers to write viruses that will modify or corrupt it.
This is one reason you should always run virus detection software.
|