How Computers Work – Course Information



EMMA HS1 Outline Week #9

How Hard Disks Work

Video - Hard Drive Activity

Parts of a Hard Drive – Show and Tell

Aluminum Box – Holds the contents in vacuum seal

Platters – Hold the magnetic data

Spindle/Motor – Platters spin on the Spindle/ Spins the Platters at 7200 RPM or 10000 RPM

Heads – Read and Write data to the Platters

Actuator Arm – Moves the heads around the platter

Circuit Board – Controls Speed of Motor, movement of Heads via Arm

Hard Drive Organization

Low-Level Formatting – Divides surfaces of disk into tracks and sectors

High-Level Formatting – Creates File Allocation Table (FAT)

Cylinders – Entire set of Tracks moving under all the Heads when they are stationary

Tracks – Area spinning directly under the head

Sectors – 512 byte blocks

Clusters – A defined number of sectors

Zone Bit Recording – Number of sectors per track decreases as you reach center of disk

Hard Drive Capacity

Calculating Drive Capacity – Cylinders x Heads x Sectors x 512 = number of bytes

Binary vs. Decimal Capacity Measurements

A megabyte is a unit of information or computer storage equal to either 106 (1,000,000) bytes or 220 (1,048,576) bytes, depending on context.

Homework – Hard Drive Online Quiz

Handouts – How Hard Disks Work

How Hard Drives Work (Graphic)

How Hard Disks Work

by Marshall Brain

Introduction to 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.

In this article, we'll take apart a hard disk so that you can see what's inside, and also discuss how they organize the gigabytes of information they hold in files!

Hard Disk Basics

Hard disks were invented in the 1950s. They started as large disks up to 20 inches in diameter holding just a 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.

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 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.

In the next section, we'll talk about the main differences between casette tapes and hard disks.

Cassette Tape vs. Hard Disk

Let's look at the big differences between cassette tapes and hard disks:

• The magnetic recording material on a cassette tape is coated onto a thin plastic strip. In a hard disk, the magnetic recording material is layered onto a high-precision aluminum or glass disk. The hard-disk platter is then polished to mirror-type smoothness.

• With a tape, you have to fast-forward or reverse to get to any particular point on the tape. This can take several minutes with a long tape. On a hard disk, you can move to any point on the surface of the disk almost instantly.

• In a cassette-tape deck, the read/write head touches the tape directly. In a hard disk, the read/write head "flies" over the disk, never actually touching it.

• The tape in a cassette-tape deck moves over the head at about 2 inches (about 5.08 cm) per second. A hard-disk platter can spin underneath its head at speeds up to 3,000 inches per second (about 170 mph or 272 kph)!

• The information on a hard disk is stored in extremely small magnetic domains compared to a cassette tape's. The size of these domains is made possible by the precision of the platter and the speed of the medium.

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.

Capacity and Performance

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:

• Data rate - The data rate is the number of bytes per second that the drive can deliver to the CPU. Rates between 5 and 40 megabytes per second are common.

• Seek time - The seek time is the amount of time between when the CPU requests a file and when the first byte of the file is sent to the CPU. Times between 10 and 20 milliseconds are common.

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

Five Main Components

Platters - The aluminum alloy disks upon which data is stored. It's a magnetic media, somewhat akin to the surface preparation on a cassette tape. However, the surface of the platter is magnetically formatted (on both sides) into sectors and tracks where digital information is written.

Spindle - the platters or disks spin on the spindle, which is run by a motor on the drive. I guess you could say it's kind of like the axle on a wheel.

Read/Write Heads - The heads move across the platters to write data to, and read data from the platters. There's a read/write head for each side of each platter. Access is random, meaning that the heads can jump straight to the information they want without having to fast-forward or rewind past unneeded information.

Head Actuator (Arm) - Controls the read/write heads. The heads are at the end of an actuator arm which is attached to the actuator.

Circuit board - Receives commands from the hard drive controller and translates them in order to move the head actuator, which moves the read/write head across the platters to the required position.

|[pic] |

Inside: Circuit Board

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.)

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:

|[pic] |

Inside: Beneath the Board

|[pic] |

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:

|[pic] |

In this picture you can see:

• The platters - These typically spin at 3,600 or 7,200 rpm when the drive is operating. These platters are manufactured to amazing tolerances and are mirror-smooth (as you can see in this interesting self-portrait of the author... no easy way to avoid that!).

• The arm - This holds the read/write heads and is controlled by the mechanism in the upper-left corner. The arm is able to move the heads from the hub to the edge of the drive. The arm and its movement mechanism are extremely light and fast. The arm on a typical hard-disk drive can move from hub to edge and back up to 50 times per second -- it is an amazing thing to watch!

|[pic] |

Inside: Platters and Heads

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

|[pic] |

|[pic] |

linear motor.

Many drives use a "voice coil" approach -- the same technique used to move the cone of a speaker on your stereo is used to move the arm.

Storing the Data - Hard Drive Organization

Low Level Formatting - The process of low-level formatting divides the surface of the disk into tracks and sectors. The starting and ending points of each sector are written onto the platter. This process prepares the drive to hold blocks of bytes. Low-level formatting. This sets up a kind of a grid so that the controller knows how to access each individual sector. For instance, it might store part of a file at 'head #2, track 40, sector 16'. It's almost like a 3D game of battleships.

High-level formatting - writes the file-storage structures, like the file-allocation table, into the sectors. This process prepares the drive to hold files.

Cylinders - The read/write heads all move on the actuator arm together. So they're all positioned over the same track, on each side of each disk, simultaneously. The entire set of tracks moving under all the heads when they're stationary makes up a cylinder. If the platters in a drive each have 968 tracks, then there are 968 cylinders. Data is written from the outside cylinder inwards, using up space on each cylinder before the heads move to the next track, or next cylinder.

The diagram to the right illustrates what "cylinder" means on a hard disk. This

conceptual hard disk spindle has four platters, and each platter has three

tracks shown on it. The cylinder indicated would be made up of the

8 tracks (2 per surface) intersected by the dotted vertical line shown.

Tracks (A) - When a read/write head is stationary, the area that spins directly under the head is called a track. There is the same number of tracks on both sides of each platter in a hard drive. Each track forms a complete circle, unlike a vinyl record, which has a single track that spirals to the center.

Sector Track (B) – Sector slice of a Track

Sectors (C) - Each track is divided up into 512 byte blocks called sectors. The data written to your drive is stored in these sectors, a cluster at a time.

Clusters (D) - A defined number of sectors make up a cluster. The number of sectors in each cluster varies depending upon the size of the HD (Hard Drive) and how it's partitioned. A cluster is the smallest allocation unit that can be written to the hard drive. Your computer needs an index, or a map telling where each cluster is, and what's stored there. This index is called the File Allocation Table (more on the FAT later). The FAT has a limited size. In other words, it can only count so many clusters. It doesn't care how big the clusters are, but it can only count so many. So, as the size of the drive increases, the number of sectors in each cluster has to increase, to keep the number of clusters the same.

This means that if a cluster is made up of 32 sectors, even a 1 byte file is going to take up 16,384 bytes or 16K of storage space (32 X 512 bytes). Or, if you have a file that is 16,385 bytes, it's going to take up 2 clusters or 32K of storage space on your hard drive. Now if you increase the size of the drive, and each cluster now contains 64 sectors… You can see how this makes for a lot of wasted space on the HD. A single partitioned hard drive can waste up to 40% of its storage space, depending on the average size of the files stored there.

Zone Bit Recording - Today's drives don't have a consistent number of sectors on each track. Zone Bit Recording is a method by which the number of sectors per track decreases as you reach the center of the disk. There are a lot more sectors on the outside tracks than there are on the inside tracks. The drive's BIOS and controller can translate the information into a form that the computer's BIOS and operating system can understand.

Calculating Hard Drive Capacity

The cylinders, heads, and sectors/track are very important. When you buy a hard drive, it has these three values printed on the drive. The system needs these numbers when the drive is installed. Plus, the capacity of a hard drive is defined by the geometry. Just multiply the cylinders by the heads by the sectors/track to get the number of sectors. Since every sector stores 512 bytes, just multiply the number of sectors times 512 to get the capacity of a drive. As an example:

Calculate the capacity of a hard drive with 1024 cylinders, 32 heads, and 63 sectors per track.

The capacity of the drive would be 1024 x 32 x 63 = 2,064,384 sectors x 512 bytes/sector = 1.056 billion bytes.

A drive with 1024 cylinders, 32 heads, and 63 sectors/track is a 1.056 billion byte drive. This is not a 1.056 gigabyte drive! You have to be careful with capacities. When talking about capacities, you use the units of megabytes, or MB (1,048,576 bytes) and gigabytes, or GB (1,073,741,824 bytes). When a hard-drive manufacturer sells you a drive, they use the units of millions and billions of bytes. This unit difference makes people think that there is something wrong with the drive or that they have been “ripped off”. Say you buy a 2.1 GB hard drive. If you look on the label, the hard-drive maker says the capacity is 2100 MB. That is 2100 million bytes, not megabytes! The manufacturer isn’t lying, you’re just reading wrong! So you install the drive and discover that the total capacity is shown as 1.96 gigabytes. It’s as though you just lost 1.4 megabytes! No, it’s just different units.

Binary vs. Decimal Capacity Measurements

Computer measurements are expressed in both binary and decimal terms, often using the same notation. Due to a mathematical coincidence, the fact that 2^10 (1024) is almost the same number as 10^3 (1000), there are two similar but different ways to express a megabyte or a gigabyte.

The problems with binary and decimal are probably more noticed in the area of hard disk capacity than anywhere else. Hard disk manufacturers always use binary figures for their products' capacity: a 72 GB hard disk has about 72,000,000,000 bytes of storage. However, hard disk makers also use binary numbers where they are normally used--for example, buffer capacities are expressed in binary kilobytes or megabytes--but the same notation ("kB" or "MB") is used as for decimal figures. Hard disks are large, and larger numbers cause the discrepancy between decimal and binary terms to be exaggerated. For example, a 72 GB hard disk, expressed in binary terms, is "only" 67 GB. Since most software uses binary terms, this difference in numbers is the source of frequent confusion regarding "where the rest of the gigabytes went". In fact, they didn't go anywhere. It's just a different way of expressing the same thing.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download