How a hard drive works

Hard Drive: a storage device that rapidly records data as magnetic pulses on spinning metal platters.

If a computer's CPU is the brain of the PC, the hard drive serves as the heart, pumping vital data to the rest of the system. As the workhorse component of virtually every computer, the hard drive is also the most mysterious. Most people never see the inside of a hard drive, shrouded in its aluminum housing, though they might be intimately familiar with the files and programs it stores, copies, moves, and deletes for them.

Hard drives provide the data storage on which all modern computers depend. A hard drive stores information by applying a magnetic field to the moving surface of a disk coated with a magnetic material.

The underlying principle of hard drives--the use of magnetism to store information--is very similar to that used in a tape or video recorder. A hard drive stores digital data as magnetized spots on the surface of the disk. A bit (your data is composed of bits) represents a 0 when magnetized in one orientation and a 1 when magnetized in the opposite orientation.

Each individual hard disk inside a drive is called a platter. A large-capacity hard drive will typically contain several 3.5-inch platters and will use both sides of each platter for storage. The drive contains a motor that spins the platters at speeds from 4500 to 15,000 rotations per minute.

Hard drives use a recording device called a head to write data to and read data from each platter surface. The drive positions a head, on a movable arm, a microscopic distance above the surface of each side of each platter, so a drive with five platters would have ten separate heads on ten arms.

Other elements in the head assembly read the recorded data by sensing the faint magnetic field from each magnetized bit speck as it passes under the read element.

The drive records data in concentric circles, called tracks,and divides each track into segments known as sectors. You can think of a track as a bookshelf with each segment on the track representing an individual book. If the operating system needs a file located at a particular track and sector, it sends a request to the hard drive to retrieve the data at that particular address.

When an operating system sends data to the hard drive to be recorded, the drive first processes the data using a complex mathematical formula that adds extra bits to the data. Those bits aren't wasted space: Later, when the data is retrieved, the extra bits allow the drive to detect and correct random errors caused by variations in the drive's magnetic fields.

Next, the drive moves the heads over the appropriate track on a platter. The time it takes to move the heads is called the seek time.Once over the correct track, the drive waits while the platters rotate the desired sector under the head. The amount of time that takes is called the drive's latency. The shorter the seek time and latency, the faster the drive can do its work.

When the drive electronics determine that a head is over the correct sector to write the data, the drive sends electrical pulses to that head. The pulses produce a magnetic field that alters the magnetic surface of the platter. The variations recorded there now represent the data.

Reading data complements the recording process. The drive positions the read portion of the head over the correct track, and then waits for the correct sector to orbit around. When the particular magnetic specks that represent your data in the right sector and track pass under the read head, the drive's electronics detect the small magnetic changes and convert them back into bits. Once the drive checks the bits for errors and fixes any it sees, it sends the data back to the operating system.

What's in an Interface?

The hard drive interface is simply the hardware that manages the exchange of data between your computer and the hard drive. You're likely to encounter only one type of interface with most PCs: the Advanced Technology Attachment, also known as the ATA (or IDE) interface. Hard drives that use this interface come in a variety of flavors, named Ultra ATA, Ultra DMA, or EIDE, depending on which vendor you look at. The distant second-place interface belongs to SCSI, used in most servers and in older Apple Macintosh computers.

The original ATA interface supported a maximum transfer rate of 8.3MB per second. ATA-2 boosted the maximum throughput to 16.6MB per second. Though not an official standard, Ultra DMA-33 and Ultra DMA-66 are generally accepted by the hard drive industry to define interfaces with a maximum transfer speed of 33MB and 66MB per second, respectively. Recently, Seagate announced that it had begun shipping its Barracuda ATA III drive with the new Ultra ATA-100 interface targeted primarily at the traditionally SCSI domain of RAID servers.