|
How Hard Disks Work |
|
|
Nearly every desktop
computer and server in use today contains one or more hard disk drives.
Every mainframe and supercomputer is normally connected to hundreds of
them. You can even find VCR-type devices and camcorders that use hard
disks instead of tape. These billions of hard disks do one thing well -
they store changing digital information in a relatively permanent form.
They give computers the ability to remember things when the power goes
out. Hard Disk
Basics At the simplest level, a hard disk is
not that different from a cassette tape. Both hard disks and cassette
tapes use the same magnetic recording techniques described in the HSW
article titled How Tape Recorders Work. Hard disks and cassette tapes also
share the major benefits of magnetic storage - the magnetic medium can be
easily erased and rewritten, and it will "remember" the magnetic
flux patterns stored onto the medium for many years. Let's look at the big differences
between the cassette tapes and hard disks so you can see how they differ:
Because of these
differences, a modern hard disk is able to store an amazing amount of
information in a small space. A hard disk can also access any of its
information in a fraction of a second. A typical desktop machine will have a
hard disk with a capacity of between 10 and 40 gigabytes. Data is stored
onto the disk in the form of files. A file is simply a named
collection of bytes. The bytes might be the ASCII codes for the characters
of a text file, or they could be the instructions of a software
application for the computer to execute, or they could be the records of a
data base, or they could be the pixel colors for a GIF image. No matter
what it contains, however, a file is simply a string of bytes. When a
program running on the computer requests a file, the hard disk retrieves
its bytes and sends them to the CPU one at a time. There are two ways to measure the
performance of a hard disk:
The other important
parameter is the capacity of the drive - the number of bytes it can hold. Inside a
Hard Disk Here is a typical hard disk drive:
It is a sealed aluminum box with
controller electronics attached to one side. The electronics control the
read/write mechanism and the motor that spins the platters. The
electronics also assemble the magnetic domains on the drive into bytes
(reading) and turn bytes into magnetic domains (writing). The electronics
are all contained on a small board that detaches from the rest of the
drive:
Underneath the board are the
connections for the motor that spins the platters, as well as a
highly-filtered vent hole that lets internal and external air pressures
equalize:
Removing the cover from the drive
reveals an extremely simple but very precise interior:
In this picture you can see:
In order to increase
the amount of information the drive can store, most hard disks have
multiple platters. This drive has three platters and six read-write heads:
The mechanism that moves the arms on a
hard disk has to be incredibly fast and precise. It can be constructed
using a high-speed linear motor.
Many drives use a "voice
coil" approach - the same technique used to move the cone of a
speaker on your stereo moves the arm. Storing the
Data
A typical track is shown in yellow,
while a typical sector is shown in blue. A sector contains a fixed number
of bytes - for example, 256 or 512. Either at the drive or the operating
system level, sectors are often grouped together into clusters. The process of low-level formatting
a drive establishes the tracks and sectors on the platter. The starting
and ending points of each sector are written onto the platter. This
process prepares the drive to hold blocks of bytes. High-level
formatting then writes the file-storage structures like the file
allocation table into the sectors. This process prepares the drive to hold
files. |
|