Hard Drive - How a Computer Works (2015)

How a Computer Works (2015)

18. Hard Drive

3d_hd.jpg

box_drives_MB.jpg

The hard disk drive is the primary device used for storing data. Every computer has a hard drive built into the machine. The computer’s hard drive is where the operating system and most installed programs are loaded from. With its high-speed operation programs can be loaded quickly.

When buying a new computer it's a good idea to buy a machine whose hard drive has a large storage capacity and fast access time.

Drive Types

hd_boxa.jpg

A hard drive can typically store many gigabytes of data, a CD-ROM disk is limited to 650 megabytes and a floppy disk just 1.44 megabytes. The access time governs how fast data can be retrieved from the hard drives disks.

Whereas with CD-ROM and floppy drives the storage media is not permanent, with a hard drive the disks are contained in the case.

SCSI Drive

hdisk_scsi2.jpg

Because of their huge storage capacity extra hard drives can be added either internally or externally. Because of its faster transfer rate external drives tend to use the more flexible SCSI (small computer system interface) interface.

Additional internal drives make use of spare E-IDE (Enhanced - Integrated Drive Electronics) connectors inside the computer.

Case

hd_boxa.jpg

hd_read.jpg

The drive is contained in a sealed case to keep out dust and foreign particles, which would otherwise damage the delicate surface of each platter. On the platter surface is a thin magnetic coating. Anything trapped between the surface and read/write heads could damage the coating. An electric motor spins the metal or glass platter at speeds of up to 10'000 rpm.

The number of platters and coating composition determine the amount of data the drive will hold.

Read/Write Heads

hd_actu.jpg

A read/write head is dedicated to each platter and the head is attached to a moving arm. An actuator positions the arm in a precise location across the platter. The head writes data from the disk controller to the platter or reads data from the platter.

Underneath the platters is a printed circuit board which controls the positions of the read/write heads enabling data to be read or written.

E-IDE

HD_Controller.jpg

On a E-IDE (Enhanced - Integrated Drive Electronics) hard disk the disk controller receives commands from the operating system and BIOS. The circuitry translates these into positions for the read/write heads to move to and whether to read in data or write new data onto the platter surface. The circuitry has the job of keeping a constant speed for the drives electric motor.

I/O Controller

mb_sm_io.jpg

The I/O Controller chip contains the E-IDE controllers. Data is routed from the I/O Controller to the Graphics and Memory Controller Hub.

From here the data is placed onto the PCI bus to the CPU.

E-IDE

mb_c2_hdc1.jpg

Data being read from the hard disk.

mb_3d_2_ide.jpg

Data moves to the South Bridge.

mb_NB_SB.jpg

Data moves from North Bridge to South Bridge to CPU.

mb_3d_gmch_mem.jpg

Data moves from the North Bridge into memory.

FAT

hd_fat.jpg

When a file is read or written, the operating system issues a command which orders the hard disk controller to move the read/write heads to the drives file allocation table (FAT, FAT32, VFAT) FAT32 is the version used in Windows XP. The operating system reads in the FAT to determine which cluster holds the beginning section of a file. In a write operation which part of the disk is available to hold the file.

Clusters

Disk_top4.jpg

A file maybe split across many clusters so the o.s keeps a record of the cluster positions used by a file in the drives file allocation table (FAT). This file is usually stored in the first cluster(s) which are free on a hard drives platters. When a file is saved the FAT is checked by the operating system to find the next unwritten free clusters.

When the FAT data has passed through the drives electrics, the operating system instructs the read/write heads to write data to the free clusters.

After this the heads are sent back to the FAT, where it writes to the platter a list of the files clusters.

Formatting

Disk_top_fat.jpg

Before any data can be saved on a hard drive the disks must be formatted. This is usually done, by the makers of your computer, so you don’t need to do it yourself.

A magnetic pattern is written onto the disk surface, this is so the disk controller can keep track of where the read/write heads are in relation to the disk.

This pattern consists of sectors and tracks. When the read/write heads move across the disk it can read these markers so it can tell where it is.

Disk Size

hd_boxa.jpg

At least two or more sectors on a single track make up a cluster or block. The cluster size varies with the size of disk and operating system used. The number of clusters that are on the disk’s surface, determine the disk size.

For Windows XP or higher using FAT32.

Drive Size Cluster Size

256MB - 8GB 4KB

8GB – 16GB 8KB

16GB – 32GB 16KB

Standard

mb_sm_io.jpg

Because there are so many different hard disks available, your computer includes an E-IDE (Enhanced-Integrated Drive Electronics) controller, which communicates between the computers system bus and hard drive.

This standard ensures hard drives that are compatible with E-IDE standard can work with an E-IDE compatible computer.

Virtually all PCs come with an E-IDE controller built into the motherboard.

Connection

mb_c3_connector.jpg

From the motherboard comes a ribbon cable, which connects, to the disk drive. Up to four hard drives can be connected to the motherboard. In practice it is likely that a CD-ROM and floppy drive (where fitted) are connected to the other E-IDE controllers.

If two hard drives are connected on the same cable, signals are sent to both. One drive is called the master the other a slave. The BIOS tells which drive the data is for, although both drives receive the data only one uses the data, the other drive ignores it. The E-IDE controller merely passes the commands and data to the drive in a format it understands.