What is a hard drive and how does it work?

What is a hard drive and how does it work?

The hard drive is the component used to permanently store data instead of RAM, which is erased whenever the computer is restarted. This is why the term mass storage device is sometimes used to refer to hard drives. The hard drive is connected to the motherboard using a hard drive controller that acts as an interface between the processor and the hard drive. The hard drive controller manages the drives linked to it, interprets commands sent by the processor, and routes them to the drive.

Which are the types of hard drives?

Hard drives are generally grouped by interface as follows:

  • IDE
  • SCSI
  • Serial ATA

When the USB standard appeared, external cases that could connect a hard drive using a USB port were released, making hard drives easy to install and increasing storage capacity for backups. These are called external hard drives instead of internal hard drives plugged directly into the motherboard. They are the same disks, even though they are connected to the computer using a case plugged into a USB port.

What is the structure of a hard drive?

A hard drive comprises several rigid metal/glass/ceramic disks stacked very close to one another and called platters.

Hard drive

The disks quickly turn around an axle (currently several thousand revolutions per minute) in a counter-clockwise direction. A computer works in a binary mode. The data is stored as 0s and 1s (called bits). Hard drives hold millions of these bits, stored very close to one another on a fine magnetic layer a few microns thick and covered by a protective film.

They are read and written using read heads located on both sides of the platters. These heads are electromagnets that raise and lower themselves to read or write data. The read heads are only a few microns from the surface, separated by a layer of air created by the rotation of the disks, which generates a wind of about 250km/h (150 mph)! Moreover, these disks are laterally mobile, so the heads can sweep across their entire surface.

Structure of a hard drive (read heads)

However, the heads are linked to one another, and only one of them can read or write at a given moment. The term cylinder refers to all the data stored vertically on each of the disks.

This entire precision mechanism is contained within a fully airtight case, as the smallest particle can degrade the disk's surface. This is why hard drives are closed shut with seals, and the warning "Warranty void if removed", as only hard drive manufacturers can open them (in particle-free cleanrooms).

How does it work?

The read/write heads are inductive, meaning they can generate a magnetic field. This is especially important in writing: The heads, by creating positive or negative fields, polarise the disk surface in a very tiny area so that when they are read afterwards, the polarity reversal completes a circuit with the read head, which is then transformed by an analog-digital converter (ADC) into a 0 or 1 which the computer can understand.

Tracks on a hard drive

The heads start writing data from the edge of the disk (track 0), then move onward towards the center. The data is organized in concentric circles called tracks, created by low-level formatting.

The tracks are separated into areas (between two radii) called sectors, containing data (generally at least 512 octets per sector).

Hard drive sectors

The term cylinder refers to all data found on the same track of different platters (i.e., above and below one another), forming a "cylinder" of data.

hard drive cylinders

Finally, the term clusters (also called allocation units) refers to the minimum area a file can take up on the hard drive. An operating system uses blocks. Blocks are groups of sectors (between 1 and 16 sectors). A small file may occupy multiple sectors (a cluster).

What is block mode?

Block mode and 32-bit transfer are used to get the best performance out of your hard drive. Block mode involves transferring data in blocks, usually in 512-byte packets. This keeps the processor from processing a large number of tiny one-bit packets. This way, the processor has the time to perform other operations. Unfortunately, this data transfer mode is only valid for older operating systems (such as MS-DOS), as recent operating systems use their hard drive manager, which makes this management system obsolete.

A BIOS option (IDE HDD block mode or Multi-Sector Transfer) can sometimes determine how many blocks can be managed simultaneously. It is a number between 2 and 32.

What is a 32-bit mode?

32-bit mode (as opposed to 16-bit mode) is characterized by 32-bit data transfers. A 32-bit transfer is comparable to 32 doors opening and closing simultaneously. In 32-bit mode, two 16-bit words (groups of bits) are transmitted one after another, then assembled.

The performance improvements when switching from 16-bit to 32-bit mode are generally insignificant. In any event, it is no longer normally possible to select the mode, as the motherboard automatically determines which mode to use depending on the type of hard drive.

What are the technical specifications?

  • Capacity: Amount of data that can be stored on a hard drive.
  • Transfer rate: Quantity of data that can be read or written from the disk per unit of time. It is expressed in bits per second.
  • Rotational speed: The speed at the platters turn, expressed in rotations per minute (rpm for short). Hard drive speeds are on the order of 7200 to 15000 rpm. The faster a drive rotates, the higher its transfer rate. However, a hard drive that rotates quickly becomes louder and heats up more easily.
  • Latency (also called rotational delay): The length of time that passes between the moment when the disk finds the track and the moment it finds the data.
  • Average access time: Average amount of time it takes the read head to find the right track and access the data.
  • Radial density: number of tracks per inch (tpi).
  • Linear density: number of bits per inch (bpi) on a given track.
  • Surface density: the ratio between linear and radial density (expressed in bits per square inch).
  • Cache memory (or buffer memory): Amount of memory located on the hard drive, used to store the drive's most frequently-accessed data.
  • Interface: This refers to the connections used by the hard drive. The main hard drive interfaces are:
    • IDE/ATA
    • Serial ATA
    • SCSI

However, external cases connect hard drives with USB or FireWire ports.

do you have more questions about the hard drive? check out our forum!
Around the same subject

Storage