What is a hard disk?

Nearly every 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 disks were invented back in the 1950s. They started as large disks up to 20 inches in diameter holding just few megabytes. They were originally called "fixed disks" or "Winchesters" (a code name used for a popular IBM product). They later became known as "hard disks" to distinguish them from "floppy disks".

Hard disks have a hard platter that holds the magnetic medium, as opposed to the flexible plastic film found in tapes and floppies.

Hard disks use magnetic storage for recording which can be easily erased and rewritten, and it will "remember" the magnetic flux patterns stored onto the medium for many years. The magnetic recording material in a hard disk is layered onto a high-precision aluminum or glass disk. The hard-disk platter is then polished to mirror-type smoothness. On a hard disk, you can move to any point on the surface of the disk almost instantly with the read/write head which "flies" over the disk, never actually touching it.

A hard-disk platter can spin underneath its head at speeds up to 3000 inches per second (about 170 mph or 272 kph)! The information on a hard disk is stored in extremely small magnetic domains. The size of these domains is made possible by the precision of the platter and the speed of the medium.

Capacity and Performance

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 database, or they could be the pixel colors for a photo.

No matter what it contains, 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:

  • Data rate: the number of bytes per second that the drive can deliver to the CPU.
  • Seek time: the amount of time between when the CPU requests a file and when the first byte of the file is sent to the CPU.

The other important parameter is the capacity of the drive, which is the number of bytes it can hold.

The best way to understand how a hard disk works is to take a look inside. (Note that OPENING A HARD DISK RUINS IT, so this is not something to try at home unless you have a defunct drive).

Storing the Data

Data is stored on the surface of a platter in sectors and tracks. Tracks are concentric circles, and sectors are pie-shaped wedges on a track, like this:

A typical track is shown in yellow; 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.