CHAPTER 7 DISKS AND SECONDARY STORAGE
CHAPTER 7 DISKS AND SECONDARY STORAGE
Relative Cost
Storage Speed Capacity ($) Permanent?
Registers Fastest Lowest Highest No
Floppy Very
Disk Slow Low Low Yes
Hard Disk Moderate Very High Very Low Yes
These benefits apply to all the various secondary storage devices but, as you will see,
some devices are better than others. We begin with a look at the various storage media,
including those used for personal computers, and then consider what it takes to get data
organized and processed.
Magnetic Disk Storage
Diskettes and hard disks are magnetic media; that is, they are based on a
technology of representing data as magnetized spots on the disk with a
magnetized spot representing a 1 bit and the absence of such a spot representing
a 0 bit.
Reading data from the disk means converting the magnetized data to electrical
impulses that can be sent to the processor. Writing data to disk is the opposite:
sending electrical impulses from the processor to be converted to magnetized
spots on the disk. The surface of each disk has concentric tracks on it. The
number of tracks per surface varies with the particular type of disk.
Diskettes
Made of flexible Mylar, a diskette can record data as magnetized spots on tracks
on its surface. Diskettes became popular along with the personal computer.
Flash memory
The older diskette, 5-1/4 inches
in diameter, is still in use,
but newer computers use the
3-1/2 inch diskette (Figure
1). The 3-1/2 inch diskette
has the protection of a hard
Figure 1: Diskettes plastic jacket, a size to fit
conveniently in a shirt
pocket or purse, and
the capacity to hold significantly more data than a 5-1/4 inch diskette. Diskettes
offer particular advantages which, as you will see, are not readily available with
hard disk:
Portability. Diskettes easily transport data from one computer to another.
Workers, for example, carry their files from office computer to home
computer and back on a diskette instead of in a briefcase. Students use the
campus computers but keep their files on their own diskettes.
Backup. It is convenient to place an extra copy of a hard disk file on a
diskette.
New software. Although, for convenience, software packages are kept on
hard disk, new software out of the box may come on diskettes (new software
also may come on CD-ROM disks, which we will discuss shortly).
The end of the diskettes useful life-time may be upon us. In 1998
Macintosh introduced its new computer, the IMAC, without a floppy disk drive.
Alternatives such as Zip disks (discussed later), or transferring data via networks
are making the low-capacity diskette become obsolete.
Hard Disks
A hard disk is a metal platter coated with magnetic oxide that can be magnetized to
represent data. Hard disks come in a variety of sizes.
Hard disk for mainframes and
minicomputers may be as large as 14 inches
in diameter. Several disks can be assembled
into a disk pack. There are different types
of disk packs, with the number of platters
varying by model. Each disk in the pack
has top and bottom surfaces on which to
record data. Many disk devices, however,
Figure 2: Hard Disk and do not record data on the top of the top
Drive
platter or on the bottom of the bottom
platter.
A disk drive is a machine that allows data to be read from a disk or written on a disk. A
disk pack is mounted on a disk drive that is a separate unit connected to the computer.
Large computers have dozens or ever hundreds of disk drives. In a disk pack all disks
rotate at the same time although only one disk is being read or written on at any one
time. The mechanism for reading or writing data on a disk is an access arm; it moves a
read/write head into position over a particular track. The read/write head on the end of
the access arm hovers just above the track but does not actually touch the surface. When
a read/write head does accidentally touch the disk surface, this is called a head crash and
all data is destroyed. Data can also be destroyed if a read/write head encounters even
minuscule foreign matter on the disk surface. A disk pack has a series of access arms
that slip in between the disks in the pack. Two read/write heads are on each arm, one
facing up for the surface above it and one facing down for the surface below it.
However, only one read/write head can operate at any one time.
In some disk drives the access arms can be retracted; then the disk pack can be removed
from the drive. Most disk packs, however, combine the disks, access arms, and
read/write heads in a sealed module called a Winchester disk. Winchester disk
assemblies are put together in clean rooms so even microscopic dust particles do not get
on the disk surface.
Hard disks for personal computers are 5-1/4 inch or 3-1/2 inch disks in sealed modules
and even gigabytes are not unusual. Hard disk capacity for personal computers has
soared in recent years; capacities of hundreds of megabytes are common and gigabytes
are not unusual. Although an individual probably cannot imagine generating enough
output-letters, budgets, reports, and so forth-to fill a hard disk, software packages take
up a lot of space and can make a dent rather quickly. Furthermore, graphics images
and audio and video files require large file capacities. Perhaps more important than
capacity, however, is the convenience of speed. Personal computer users find
accessing files on a hard disk is significantly faster and thus more convenient than
accessing files on a diskette.
The most popular removable disk media is the Zip drive from Iomega (Figure 3). Over 100's
of millions have been sold, making it the de facto standard. The disk cartridges look like a
floppy disk, but are slightly bigger in all dimensions. Older Zip disks hold 100MB, newer ones
hold 250MB and cost $8-$10 a piece (Floppies hold 1.4MB and cost around $2). The drive
sells for around $80- $125. Many new PCs come with Zip drives built in addition to floppy
drives. Zip disks are a great way to store large files and software programs
Hard Disks in Groups
A concept of using several small disks that work together as a unit is called a redundant array of
inexpensive disks, or simply RAID. The group of connected disks operates as if it were just one
large disk, but it speeds up reading and writing by having multiple access paths. The data file
for, say, aircraft factory tools, may be spread across several disks; thus, if the computer is used
to look up tools for several workers, the computer need not read the data in turn but instead read
them at the same time in parallel. Furthermore, data security is improved because if a disk fails,
the disk system can reconstruct data on an extra disk; thus, computer operations can continue
uninterrupted. This is significant data insurance.
How Data Is Organized on a Disk
There is more than one way of physically organizing data on a disk. The methods we will
consider here are the sector method and the cylinder method.
The Sector Method
In the sector method each track is divided into sectors that hold a specific number of
characters. Data on the track is accessed by referring to the surface number, track number,
and sector number where the data is stored. The sector method is used for diskettes as well
as disk packs.
Zone Recording
The fact that a disk is circular presents a problem: The distances around the tracks on the
outside of the disk are greater than that of the tracks or the inside. A given amount of data
that takes up 1 inch of a track on the inside of a disk might be spread over several inches on
a track near the outside of a disk. This means that the tracks on the outside are not storing
data as efficiently.
Zone recording involves dividing a disk into zones to take advantage of the storage available
on all tracks, by assigning more sectors to tracks in outer zones than to those in inner zones.
Since each sector on the disk holds the same amount of data, more sectors mean more data
storage than if all tracks had the same number of sectors.
The Cylinder Method
A way to organize data on a disk pack is the cylinder method. The organization in this case is
vertical. The purpose is to reduce the time it takes to move the access arms of a disk pack
into position. Once the access arms are in position, they are in the same vertical position on
all disk surfaces.
To appreciate this, suppose you had an empty disk pack on which you wished to record data.
You might be tempted to record the data horizontally-to start with the first surface, fill track
000, then fill track 001, track 002, and so on, and then move to the second surface and again
fill tracks 000, 001, 002, and so forth. Each new track and new surface, however, would
require movement of the access arms, a relatively slow mechanical process.
Recording the data vertically, on the other hand, substantially reduces access arm movement.
The data is recorded on the tracks that can be accessed by one positioning of the access arms-
that is, on one cylinder. To visualize cylinder organization, pretend a cylindrically shaped item,
such as a tin can, were figuratively dropped straight down through all the disks in the disk
pack. All the tracks thus encountered, in the same position on each disk surface, comprise a
cylinder. The cylinder method, then, means all tracks of a certain cylinder on a disk pack are
lined up one beneath the other, and all the vertical tracks of one cylinder are access ible by the
read/write heads with one positioning of the
access arms mechanism. Tracks within a cylinder are numbered according to this
vertical perspective: A 20-surface disk pack contains cylinder tracks numbered 0 through 19,
top to bottom.
Optical Disk Storage
The explosive growth in storage needs has driven the computer industry to provide cheaper,
more compact, and more versatile storage devices with greater capacity. This demanding
shopping list is a description of the optical disk, like a CD. The technology works like this: A
laser hits a layer of metallic material spread over the surface of a disk. When data is being
entered, heat from the laser produces tiny spots on the disk surface. To read the data, the laser
scans the disk, and a lens picks up different light reflections from the various spots.
Optical storage technology is categorized according to its read/write capability. Read-only
media are recorded on by the manufacturer and can be read from but not written to by the user.
Such a disk cannot, obviously, be used for your files, but manufacturers can use it to supply
software. Applications software packages sometimes include a dozen diskettes or more; all
these could fit on one optical disk with plenty of room to spare. The most prominent optical
technology is the CD-ROM, for compact disk read-only memory. The disk in its drive is
shown in Figure 3.
When buying a computer the speed of the CD-ROM drive is advertised using an "X"
factor, like 12X, or 24X. This indicates the speed at which the CD can transfer data to the
CPU - the higher the X factor, the faster the CD.
Modern computers now offer a write CD drive or, CD-RW as an option. CD- RW is a write-
once, read-many media. With a CD-RW drive, you can create your own CDs. This offers
an inexpensive, convenient, safe way to store large volumes of data such as favorite songs,
photographs, etc.
Digital Versatile Disk (DVD) drives are now widely available in computers as well as home
entertainment centers. DVD-ROM drives can read data, such as stored commercial videos
for playing. DVD-RW allow DVDs to be created on a computer.
The highest-capacity tape is the digital audio tape, or DAT, which uses a
different method of recording data. Using a method called helical scan recording,
DAT wraps around a rotating read/write head that spins vertically as it moves. This places the
data in diagonal bands that run across the tape rather than down its length. This method
produces high density and faster access to data.
Two reels are used, a supply reel and a take-up reel. The supply reel, which has the tape with
data on it or on which data will be recorded, is the reel that is changed. The take-up reel
always stays with the magnetic tape unit. Many cartridges and cassettes have the supply and
take-up reels built into the same case.
Tape now has a limited role because disk has proved the superior storage medium. Disk data is
quite reliable, especially within a sealed module. Furthermore, as we will see, disk data can be
accessed directly, as opposed to data on tape, which can be accessed only by passing by all the
data ahead of it on the tape. Consequently, the primary role of tape today is as an inexpensive
backup medium.
Backup Systems
Although a hard disk is an extremely reliable device, a hard disk drive is subject
to electromechanical failures that cause loss of data. Furthermore, data files, particularly those
accessed by several users, are subject to errors introduced by users. There is also the
possibility of errors introduced by software. With any method of data storage, a backup
system a way of storing data in more than one place to protect it from damage and errors is
vital. As we have already noted, magnetic tape is used primarily for backup purposes. For
personal computer users, an easy and inexpensive way to back up a hard disk file is to simply
copy it to a diskette whenever it is updated. But this is not practical for a system with many
files or many users.
Personal computer users have the option of purchasing their own tape backup system, to be
used on a regular basis for copying all data from hard disk to a high-capacity tape. Data thus
saved can be restored to the hard disk later if needed. A key advantage of a tape backup
system is that it can copy the entire hard disk in minutes, saving you the trouble of swapping
diskettes in and out of the machine.
A rule of thumb among computer professionals is to estimate disk needs generously and then
double that amount. But estimating future needs is rarely easy. Many users, therefore, make
later adjustments like adding a removable hard disk cartridge to accommodate expanding
storage needs. To quote many a computer user, "I just couldn't envision how I could use all
that disk space. Now I can imagine even the extra disk filling up."
Flash memory
Electronic memory comes in a variety of forms to serve a variety of purposes. Flash memory is
used for easy and fast information storage in computers, digital cameras and home video game
consoles. It is used more like a hard drive than as RAM. In fact, flash memory is known as a
solid state storage device, meaning there are no moving parts -- everything is electronic
instead of mechanical.
Here are a few examples of flash memory:
Your computer's BIOS chip
CompactFlash (most often found in digital cameras)
SmartMedia (most often found in digital cameras)
Memory Stick (most often found in digital cameras)
PCMCIA Type I and Type II memory cards (used as solid-state disks in laptops)
Memory cards for video game consoles
Flash memory is a type of EEPROM chip, which stands for Electronically Erasable
Programmable Read Only Memory. It has a grid of columns and rows with a cell that has
two transistors at each intersection.
File access and storage methods
How data files are stored in secondary storage varies with the types of media and devices
you are using. Data files may be stored on or in sequential-access storage, direct-access
storage, or random-access storage.
SEQUENTIAL-ACCESS STORAGE
This is a technology whereby stored data can be retrieved in only the order in which it is it is
physically stored. Punched cards, paper tape, and magnetic tape are examples of sequential-
access storage media. When operating in a sequential environment, a particular record can be
read only by first reading all the records that come before it in the file. When you store a file
on tape, the 125th record cannot be read until the 124 records in front of it are read. The
records are read in sequence. You cannot read just any record at random. This is also true when
reading punched cards or paper tape.
DIRECT-ACCESS STORAGE
This is a technology that allows a computer to immediately locate and retrieve a program,
information or data. Direct-access storage allows you to access the
125th record without first having to read the 124 records in front of it. Magnetic disks and
drums are examples of direct-access storage media. Data can be obtained quickly from
anywhere on the media. However, the amount of time it takes to access a record is dependent
to some extent on the mechanical process involved. It is usually necessary to scan some (but
not all) of the preceding data.
RANDOM-ACCESS STORAGE
Random-access storage media refers to magnetic core, semiconductor, thin film, and bubble
storage. Here, a given item of data can be selected from anywhere in storage without having
to scan any preceding items. And, the access time is independent of the storage location.
Chapter review questions
1. On a floppy disk, a numbered concentric circle is called a
(a) Sector (b) Cluster (c) Track (d) Ring
2. On a compact disc, a laser records data by burning tiny indentations onto the disc
surface called
(a) Lands (b) Pits (c) Tracks (d) Sectors
3. Which one of the following is not an optical disk format?
(a) Hard disk (b) CD-ROM (c) CD-RW (d) DVD