22C:18, Lecture 36, Fall 1996

Douglas W. Jones
University of Iowa Department of Computer Science

Magnetic Disks

In the 1940's, a new recording medium emerged, magnetic recording. The oldest use of this recording technology was sound recording on iron wire. Wire recorders had two spools of wire, with the wire feeding from one spool to the other through a hole in the record-playback head. If an audio electrical signal was applied to the coil of wires in the head, it would induce a series of magnetic patterns on the wire moving through the head. If no signal was applied to the coil, the pattern of magnetization on the wire would induce a signal, recreating the original audio signal.

Magnetic wire recording was cumbersome, and by the early 1950's, experimental systems based on magnetic tape were under development. Some of the earliest, actually used on the UNIVAC computer (known as the UNIVAC I only after later models were produced) used iron foil tape, but it did not take long before modern magnetic tape was invented, based on a thin magnetic coating on a flexible plastic base.

Todays, audio cassettes, videotapes, and computer tapes are all direct descendants of this early work, but our story continues in the 1950's with the development of another offspring of magnetic recording technology, the magnetic drum.

Early computer memories were expensive and had very low capacity, so in the 1950's, there was an intense search for alternative memory systems. One idea that emerged quite early in this search was the rotating magnetic drum. The idea was quite simple: Spin a cylinder made of magnetic material, and put a row of read-write heads above its surface, so each head was permanently positioned over its own circular track on the drum surface. The read-write heads were electrically identical to those used with early tape recorders, but instead of riding against the magnetic surface of the tape, the head was held a tiny fraction of an inch above the drum surface by a micrometer mechanism.

                     / ___H_H_H_H_H___ \
                     ||   U_U_U_U_U   ||
         _____       ||  |         |  || Heavy cast
        |     |  _   ||  |         |  || iron casing
        |motor|=|_|=|  |=|  DRUM   |=|  |
        |_____|      ||  |         |  ||
          | |        ||  |_________|  ||
          | |        ||_______________||
         /___\      /___________________\
Early drum assemblies weighed hundreds of pounds, required industrial size motors, and had on the order of 40 to 64 heads. Typically, the tracks were 1/8 of an inch apart and the heads were mounted on micrometer screws about 1/2 inch in diameter on 1 inch centers, so the heads had to be staggered in multiple rows to achieve the tight spacing of tracks on the drum. A very few of the very earliest drums still exist, notably the drum for ILLIAC I, which was used as a doorstop at the University of Illinois for many years.

Drums remained in use into the early 1970's, but the search for more efficient magnetic storage soon led to a more compact alternative, the disk. The first disks were electronically identical to drums. The only difference was that the magnetic surface was the top (or top and bottom) of a rotating disk instead of the outside of a cylinder.

     / ___________________H_H_H_H_H___ \
     ||  ____________||___U_U_U_U_U   ||
     || |__________________________|  || Heavy cast
     ||______________||___H_H_H_H_H___|| aluminum casing
     \______________    __H_H_H_H_H____/
                    -||-  H H H H H
                   __||__           Heads
                  |      |
                  | Motor|
Such disks are now called fixed head disks because the heads were fixed to the disk housing. Alternately, they are called head-per-track disks because there is one head over each data track on the disk surface. Both the later drums and all disks are usually made of aluminum with a thin magnetic coating on the surface -- the coating material is quite similar to that used on magnetic recording tape.

In the late 1950's and early 1960's IBM and Bryant corporation developed the moving-head disk. With fixed head disks, one of the major limits on the cost of the system was the need to put one head over each track of the disk. The idea of using a single head, or one head per recording surface, was obvious, but this introduced two problems:

  1. How to accurately position the heads over the right track.

  2. How to hold the heads a constant distance above the disk surface.
IBM solved the latter position with what is now called the flying head. Earlier heads had been held above the recording surface by micrometer mechanisms; a technician would use a feeler gauge to adjust the height of the head above the disk, and then it would remain fixed for all time. The idea IBM came up with was to fly the head over the disk surface on an air cushion. The first flying heads used a compressor to pump a film of air between head and disk, but all modern hard disks use the motion of the disk itself to pull air between the head and the disk surface.

The second problem, that of moving the head from track to track, has been solved in many ways over the years. IBM's first moving head disks used hydraulic mechanisms to move the head (and oil leaks sometimes caused major disk failures). Lead screws are still used for low performance disks -- floppy disks. For high performance disks, head positioning using a voice coil drive has been the dominant approach since the mid 1960's.

                          Heads         Coil
         ____________||_____U______    ||_____|   _
        |__________________________|   ||   __|__| |
                     ||     H___       ||  |     | | Fixed
                     ||      ___========|  |N   S| | Magnet
         ____________||_____U______    ||  |_____| |
        |__________________________|   ||_____|  | |
                     ||     H___       ||_____|  | |
                     ||         ========         | |
                   __||__                        | |
                  |      |_______________________| |
                  | Motor|_________________________|
                  |______|   Frame
The voice coil drive shown above is only one possible arrangement. In all voice coil drives, there is a fixed magnet attached to the frame. The coil is attached to the head assembly and surrounds the magnet (or is surrounded by the magnet on some variants). The heads are free to move radially in and out, and running an electrical current through the coil will accelerate the heads inwards or outwards, depending on the direction of the current.

The primary differences between the moving head disk drives of 1965 and those of today is in size, capacity and speed. When your disk is 4 feet in diameter, as those made by Bryant in the mid 1960's were, you cannot rotate it more than a few revolutions per second. By 1970, most disks were 14 inches in diameter, and they were typically spun at around 20 revolutions per second. Today, with disks only a few inches across, speeds of 100 revolutions a secod are common.

The accuracy with which the heads may be positioned determines the spacing of recording tracks on the disk surface. In 1970, 100 tracks per inch was common on moving head disks, while today, with improved heads flying far closer to the disk surface, we can pack 10 times as many. The same advances in head design that allow tracks to be spaced more closely also allow more bits to be stored per unit distance along a track.

Floppy disks, or diskettes, as IBM prefers to call them, were introduced by IBM around 1970 as a storage medium for system software used only at bootstrap (start-up) time on mainframes. Around 1973, IBM introduced word-processing systems that used diskettes, and within a year, Shugart came out with the first non-IBM commercial diskette drives. Within a few years, floppy disk drives became common on minicomputers, and this new storage medium was quickly adopted by the microcomputer industry.

Floppy disks are conceptually very similar to any single platter moving head disk, except that the disk medium is flexibe plastic instead of rigid aluminum, and the record-playback head does not fly over the disk surface, it is in direct physical contact as the disk rotates. As a result, floppy disks can only rotate slowly, 3 revolutions per second with the original 8-inch diskettes, 6 to 10 revolutions per second with modern diskettes.


Before a track of a moving head disk is read or written, two things must be done: The heads must be moved to the correct position, and the correct head must be selected. Each possible head position is said to define a cylinder. This term is used because it is typical to align all heads to the same radial position, so that, at any instant, all of the heads on the disk define a cylindrical data storage surface. It should be noted that the term cylinder is used even when the heads are not aligned this way, and that the meaning is always the set of data tracks that can be read or written without moving the heads!

Selecting a head is the same as selecting one surface of the disk, so it is common to describe each track as being at the intersection of one recording surface and one cylinder. Speaking of the number of cylinders in the disk is the same as speaking of the number of tracks per surface, and speaking of the number of surfaces or the number of heads is the same as speaking of the number of tracks per cylinder.

A disk address consists of, at minimum, the cylinder number and surface number of the track to be read or written.


It would be possible to read or write entire tracks of a disk, but tracks are too big for most purposes. Even on the disks of the early 1970's, a track could easily hold 10K bytes, and todays disk tracks hold considerably more. In comparison, the average disk file is probably closer to 2k bytes; many disk files are quite small, holding only a few tens of lines of text, and if the unit of data transfer to and from disk is the file, we need to be able to work in terms of units smaller than one track.

As a result, most disk formats in common use today break the tracks into sectors. Typical sector sizes vary between 512 and 4K bytes; in 1970, it was common to find disks with 20 sectors per track and 512 bytes per sector; todays disks are likely to have far more sectors per track.

A typical disk sector has the following format:

     <--- direction of rotation ----
      ________ ___________ ________
 gap  prologue    data     epilogue  gap
Sectors are separated from their neighbors by intersector gaps. Each sector begins with a prologue that says, first, "here comes a sector". Typically, the prologue includes the surface, cylinder and sector number that uniquely identifies of the sector on the disk. These allow the software to detect failures in head positioning or surface selection, and the cylinder number and sector number are sometimes used directly in by the disk controller in determining when the desired data is available for reading or writing.

When you format a disk, an operation that must be performed on most computer systems before any other use can be made of the disk, you record the prologues of each and every sector on the disk; this wipes out any data that may already have been recorded on the disk, and the formatting program typically also records an empty file system data structure on the disk after it has verified that all sectors can be read and written.

The epilogue on the sector is re-written every time data is stored in a sector. The epilogue contains a checksum, that is, a data pattern that includes a contribution from every bit in the sector. When the sector is read, the checksum is recomputed and compared with the checksum that was recorded with the sector, and if a difference is detected, it means that an error was made in reading or writing the sector.

It is important to note that sectors are the minimum unit of data transfer to and from a disk. An entire sector must be read before the checksum can be verified, and an entire sector must be written in order to compute and record the checksum. Thus, to change one bit on the disk, the sector containing that bit must be read, the bit changed, and then the entire sector must be rewritten.

So, a complete disk address on a typical modern computer consists of the specification of one sector on one surface on one cylinder of the disk.