Section 17.7
CD-ROMs

As programs and data files got much larger, more capacious media were needed to hold them. For a while, major software vendors were selling boxed software that had 20 floppy diskettes for installation, with the programs and data on those diskettes in compressed format! Soon, computer designers realized that CD-ROMs which were used for music could also hold data.

CD-ROM stands for Compact Disk, Read Only Memory. It is an inflexible plastic platter, with only one active surface, that stores data very much like a disk drive. A typical CD-ROM stores about 650 MB, which is over 400 hundred times as much as a single floppy diskette.

Data is not stored in magentic form on a CD-ROM but in an optical fashion. Bits are written into the platter by burning tiny holes or pits into the surface so that later a laser, bouncing light off the plastic's surface, can sense when there is a hole or not by measuring the reflectivity of the surface. The presence or absence of a hole corresponds to a bit. A hole means "1" and no hole means "0."

There are several other differences between CD-ROMs and disk drives. The most obvious is that CD-ROMs, once written, cannot be rewritten because there is no way to fill in the microscopic holes again. Another difference is that the holes are arranged in a spiral, rather than concentric circles. Old vinyl phonograph records, using diamond needle tone arms as the read head, also used a spiral so that the needle would not have to be lifted out of the current track and put into the next one. However, CD-ROM readers start from the center and move outwards, whereas phonographs start at the edge and spiral inwards.

Another difference between CD-ROMs and disk drives is the extra error checking that is included on CD-ROMs due to the fact that their surfaces are directly exposed to humans and other dangerous things in the environment, whereas disk drives are sealed. Even disk drives include some error detecting bits, such as simple parity, to discover if a byte has suffered damage. But CD-ROMs, which can't be fixed by rewriting, include error correction bits which allow the computer to reproduce the correct bit pattern, as long as not too many bits have been damaged. It is possible, for example, to take a knife and scratch the CD-ROM without impairing its data, as long as the scratch isn't too wide and as long as it goes radially, i.e. from the center to the edge. A scratch that is angular may make the data unrecoverable.

Finally, CD-ROM drives that can write are becoming cheap enough for the average person. These drives can be used to back up an entire hard disk on a CD-ROM instead of tape. One can also use a CD-ROM disk as a kind of volatile storage, just like one would use a hard disk, writing, rewriting and deleting files. The way this works is that the old version of the file is burned out of existence by burning pits into every position, thereby obliterating it. The new version is then written to the free area of the CD-ROM. When the CD-ROM fills up, no more files can be rewritten and the state of the CD-ROM is frozen. However, CD-ROMs are still quite slow compared to hard disks so they are not likely to supplant traditional magnetic disks soon.

There are other, newer kinds of disk technologies that are hitting the stores today: ZIP disks, JAZZ disks, and IBM's microdisk. Some of these such as the ZIP and JAZZ disks, are updates to the floppy disk technology to handle the much larger files today. ZIP disks (made by Iomega, Inc.) hold up to 100MB of data while JAZZ store 1GB or 2GB. The prices of these disks are correspondingly much higher than the venerable 3.25 inch floppy: Roughly $15 each for a ZIP disk and $90 each for a JAZZ disk.

This has been only a very cursory overview of a huge subfield input/output and secondary storage. There are many similarities in the devices, and the preference given to one or the other is entirely due to either economics or speed. There are also lots of issues that arise which define the shape and scope of operating system software. Usually, the average programmer doesn't want to have to think about the nitty gritty details of which sectors or which tracks a file actually occupies, so system software must hide all this and provide a convenient abstraction, the file.