Computer Organization and Design Fundamentals by David Tarnoff is now available!

Although the set of notes you have requested is presented below, it has not been maintained since January, 2003. All of the information in these notes has been included in an on-line text titled Computer Organization and Design Fundamentals. The book is available in three formats, two of which are free electronic downloads. Please visit one of the following links in order to access the format you prefer.

Thank you for your interest in this textbook. Please feel free to e-mail me at tarnoff etsu.edu if you have any questions or comments.

-Dave Tarnoff

CSCI 2150
Memory Hierarchy and Disk Operation


Magnetic Disk

Memories directly connected to the processor work well for data and code that is to be quickly read or written from RAM or read from a ROM, but for long term high capacity storage, an external device is needed. This section covers the most common high capacity, non-volatile storage method: hard drives.

Hard drives store data in well-organized patterns of ones and zeros across a thin sheet of magnetic material. This sheet of magnetic material is spread on either one side or both sides of a disk called a substrate.

Substrates used to be made from aluminum allowing for the magnetic coating to ride on a hard surface while the light weight could spin quickly. Now glass is used as a substrate primarily due to its:

Reading and Writing to Disks

Recording and retrieving data from the magnetic coating on the substrate is done with conductive coil(s) called a head(s). Older drives and floppy drives use a single head that performs both the read and the write operations. The head is shaped like a "C" with the small gap between the ends positioned so that it faces downward close to the magnetic material. A coil of wire was wrapped around portion of the head away from the magnetic material. The figure below shows the configuration of this type of head.

Hard drive read/write heads diagram.

Source: Stallings, William, Computer Organization & Architecture, 6e, Prentice Hall, Upper Saddle River, NJ, Figure 6.1, p. 165.

In order to write data, an electrical current was passed through the wire which created a magnetic field within the gap of the head close to the disk. This field would charge the magnetic material in a specific direction. Reversing the current would charge the magnetic material in the opposite direction. These two directions allow for the storage of the two types of data, ones and zeros.

The same head was used to read the data back from the disk. If a magnetized material passes close to a coil of wire, it produces a small current. This is the same principle that allows the alternator in your car to produce electricity. The direction of the current changes if the direction of the magnetization is changed. In this way, the same coil that is used to write the data can be used to read the ones and zeros back.

Newer hard drives use two heads, one for reading and one for writing. The read head works differently than the old heads in that it is made of a special material that changes its resistance depending on the magnetic field that is passing under it. These changes in resistance affect a current that the hard drive controller is passing through the read head during the read operation. In this way, the hard drive controller can determine whether a one or a zero was stored to the portion of the disk that is passing under the head.

Data Organization and Formatting

The read/write heads are moveable along the radius of the disk. This allows the heads to record information in multiple paths that form concentric circles on the disk. Each one of these circles is called a track. A typical hard drive disk contains thousands of these tracks, each being the width of the read/write heads.

In order to avoid possible interference between the tracks, a small gap is left between the tracks. This gap is called the intertrack gap. Reducing this gap allows for more data to be stored on a disk, but it also increases the risk of having data corrupted when data from a neighboring track is written.

Each track is divided into fixed size blocks of information. These blocks are called sectors. Gaps are also left between the sectors. These gaps allow for a physical separation between the blocks of data and are typically used to help the hard drive controller when reading from or writing to the disk. These gaps are called intersector gaps.

Arrangement of sectors on a disk.

Source: Stallings, William, Computer Organization & Architecture, 6e, Prentice Hall, Upper Saddle River, NJ, Figure 6.2, p. 166.

A platter may have sectors that are fixed in size for the whole platter or they may have variable amounts of data depending on their location on the platter. A common sector size is 512 bytes and there are typically hundreds of sectors per track.

There are two methods to spinning a disk. The first method is to keep the disk spinning at a constant angular velocity. The problem with this method is that the magnetic material closer to the center of the disk passes beneath the heads much slower than that at the outer edge of the disk which is passing by very fast. This means that the data toward the center of the disk will be pressed closer together leaving open the possibility for corrupting the data because of interference from neighboring bits that are too close.

This also means that the same amount of data is being stored on the much longer outside tracks than on the inside tracks. This low density of data on the outside track doesn't take advantage of the potential capacity of the disk.

Imagine taking a matrix of columns and rows of data. If you were to twist that matrix so that the top row were bunched tightly at the center of a disk and the bottom row were stretched out along the outside of a disk, you should have a good idea of the problem.

This problem is solved by allowing the disk to turn at different speeds depending on where the disk head is positioned. If the read/write heads are close to the center, the disk spins slower allowing for lower density storage. On the outside tracks, however, the disk spins faster allowing the controller to take full advantage of the storage potential of the outside tracks. This method of control is called multiple zone recording. The figure below may help show how the two methods compare.

Constant angular velocity and multiple zoned recording disk layout methods.

Source: Stallings, William, Computer Organization & Architecture, 6e, Prentice Hall, Upper Saddle River, NJ, Figure 6.3, p. 167.

The disadvantage of this method is the additional complexity of the controller that is needed to control the speed of the disk depending on head position and to determine the start of each sector. Typically, additional information is stored to the tracks to help with these control issues.

Formatting

This brings us to the concept of formatting the hard drive so that data can be stored to the disk. There are two kinds of formatting: low level and O/S level. Low level formatting depends entirely on the mechanics of the hard drive and its controller. It sets up the tracks and sectors so that the hard drive controller can store and retrieve data.

O/S level formatting is used to create a file system so that the operating system can interpret the data it retrieves from the hard drive. Low level formatting is the same regardless of the operating system or even the type of computer the hard drive is running on. It is part of the design of the hard drive's storage and retrieval system. O/S level formatting, however, depends entirely on the operating system.

Physical Characteristics of Hard Drives

There are three physical characteristics of hard drives that allow them to be classified. They are as follows:

Head motion is classified as either fixed or movable. With a fixed head system, the heads do not move at all. There are multiple heads, one per track, so that to read data from a different track, the head for that track is selected and the disk passes underneath the head to retrieve the data.

Movable heads still have the disk passing under the heads to retrieve the data, but there is only one head that is moved radially to the different tracks. This is far more common in contemporary hard drives.

Single sided or double sided refers to whether the disks or platters have magnetic material on one or both sides. If the magnetic material is on both sides, a second set of read/write heads must be positioned underneath the spinning platter in order to read the data on the second side. Single sided systems with movable heads have only one head per platter. Double sided platters are used to increase the capacity of the hard drive. In addition, this configuration increases the data throughput since two heads are reading or writing data at the same time.

The capacity of the hard drive can also be increased by using multiple platters. Once again, additional read/write heads are needed for each additional platter. This configuration also increases the speed of the drive since multiple heads reading or writing data at the same time increases the throughput of the data.

Configuration of multiple disks in a hard drive.

Another characteristic of hard drives refers to how the heads are positioned physically near the platters. Floppy drives actually have the head in physical contact with the magnetic material.

This configuration is not used with hard drives as the rigid platters would heat up and the magnetic material would be scraped from the platters due to the friction from the head. Instead, a small gap needs to exist between the heads and the platters.

One way to do this is to create a fixed gap between the head and the platter. Regardless of the motion of the platters, the head will always be up off of the platter's surface.

A second and more common method with contemporary drives is to use the air flow from the spinning platter to lift the head from the disk. If the platter is stopped, the head rests directly on the platter's surface. The head mechanism has a small air foil on it such that when the disk spins and creates a flow of air, the head lifts from the platter. This type of head configuration is referred to as a Winchester.