Information Technology: An Introduction for Today’s Digital World.
)
110
◾
Linux with Operating System Concepts
as you move outward from the center of the disk, it also depends on the desired track. In
spite of these delays, hard disk access is the fastest of all storage devices by far.
There are two drawbacks to the hard disk: expense and lack of portability. For around
$80, you can buy a 1 TB external hard disk drive, or you can buy a 4 TB hard disk for under
$200. This gives you storage at the rate of 200 Mb per penny. The storage capacity per
penny for a tape cartridge is even greater and the tape permits portability. However, tape,
as we will see below, is not a very efficient form of storage. The storage capacity per penny
of an optical disk and a USB drive are both greater than the hard disk making both forms
impractical for large-scale storage (e.g., hard disk backups).
The hard disk and the floppy disk are similar in that they both use read/write heads,
store magnetic information, and rotate to provide access. The floppy disk is removable
from its disk drive. This causes the floppy disk’s surface to be exposed to the environment.
Because of this, the floppy disk has a much lower density of magnetic regions when com-
pared to hard disks. The result is that the floppy disk storage capacity is much less. Because
of first optical disks and second USB drives, floppy disks, which have slow access times,
have become obsolete.
Hard disk drives are the primary form of storage today. We rely on them to store our
application software and data files. Ensuring the integrity of this storage space becomes
critical. Later in the text we consider approaches to ensure integrity through backups and
through redundancy in the form of RAID.
3.7.2 Magnetic Tape
The magnetic tape is often thought of as obsolete, just like the floppy disk. Like the floppy
disk, magnetic tape stores information as magnetized spots on the surface of the tape. And
like the floppy disk, magnetic tape is removable from the tape drive. However, more like
hard disk, magnetic tape can store a great deal of information on one unit (tape). Today,
storage capacities of tape cartridge exceed 5 TB. The advantage then of tape is its ability
to back up an entire hard disk on a single cartridge. Although tape also offers a form of
portability, tape is never used in this way because few users use tape and the tape must be
compatible with the user’s tape drive.
The drawback of tape is in its performance. There are two problems with magnetic tape.
First, files are stored in one contiguous block. If there are three files stored on tape and the
middle file is deleted, can that space be reused? If you have used either audio cassettes or
video tapes to record material, you probably know the issue here. You do not want to record
something in between two or more items for fear of running over the latter item. Recording
over a part of a data file corrupts that file, possibly to the point of the entire file being lost.
Thus, reusing freed up space is often not possible on tape. See Figure 3.10 where the file
currently under the read/write head, if deleted, may or may not allow sufficient space for
another file.
The second performance issue is that tape stores files wholly. Access to a file will require
fast forwarding or rewinding the tape to move the beginning of the desired file under the
read/write head. As tapes can be lengthy in size, the amount of time to fast forward or
rewind can be counted in minutes. Disk access often takes under a second.
Navigating the Linux File System
◾
111
Because of these drawbacks, tape tends to be used for only two purposes. The first is to
back up the contents of a hard disk. As your hard disk usually stores all of your software
and data files, losing any part of or the entire hard disk’s contents can be devastating.
Performing timely backups ensures that you will not lose much if your hard disk fails or
is damaged. However, since your hard disk is quite large, you must back it up onto some
media that can contain it all. This might be a second hard disk or it might be a magnetic
tape. Large organizations often use magnetic tape for just this purpose because it is more
cost effective than purchasing numerous external hard drives. The second use of magnetic
tape is related, storing information as an archive. The archive is essentially data from a
previous time period (e.g., last year) that the organization hopes to not need but stores
anyway just in case it is needed. An audit or an inquiry or research into previous customer
trends may require that the archive be accessed. For either the backup or archive, the items
stored will be used infrequently enough that we can afford the poor access time in favor of
reduced cost.
3.7.3 Optical Disk and USB Drive
Optical disk was first introduced to the personal computer market in the 1980s. The tech-
nology centers around the use of a laser to shine onto an optical disk. The surface of the
disk was normally reflective but pits would be burned onto the surface. A pit would swal-
low up the light while the surface itself, without a pit, would cause the light to shine back.
In this way, 1s and 0s could be written onto a disk.
Optical disk was most commonly used as a form of read-only memory because most of
the disks of that day had information permanently burned onto the surface of the disk. As
such, this technology was often called a CD-ROM (compact disk read-only memory). The
CDs would either store music or application software and multimedia data files. Once the
technology was made available, optical disk drives were being sold that could burn onto a
blank disk. These were called WORMs (write-once, read-many).
A different form of optical drive was introduced in 1985 with the NeXT workstation.
It used a form of magneto-optical drive (CD-MO). Here, a laser would be used to read the
magnetic state on the surface of the disk to pick up the corresponding bit. To write to the
disk, first the given disk location would have to be erased and then written requiring two
separate accesses. In addition to the laser, an electromagnet would be applied where the
Read/write head
Assume this file is deleted. Can we place a new file
in its location such that it does not flow into the next
file on the tape? If not, we cannot reuse this space!
FIGURE 3.10
Contiguous files on tape do not permit easy reuse of space.
112
◾
Linux with Operating System Concepts
laser would heat up the disk and the electromagnet would adjust the bit stored in the given
location. Although this technology was superior to the CD-ROM/WORM approach, it was
too cost prohibitive to find a large audience.
In the late 1990s, a different form of readable/writable optical technology was released.
In this case, the surface is comprised of a crystalline structure which in its natural state
is reflective. Instead of burning information onto the surface and permanently altering its
contents, a heated laser is used to alter the crystalline structure so that it is no longer reflec-
tive. This allows you to erase the entire disk and reuse it, which lead to the more common
CD-R and CD-RW formats.
Unlike magnetic disk or tape, the optical disk can only be erased wholly or not at all.
The optical disk led to both portable storage and a lesser costing storage device over the
hard disk drives of the era. However, optical disks have a vastly limited storage capacity
compared to hard disks and this differential has grown over time as hard disk technology
improves. Today, DVD and Blu-Ray formats allow greater storage capacity over CDs but
they are still not very useful forms of storage to perform backups as it would take dozens
to hundreds of disks to back up a single hard disk drive.
The USB drive is the most recent form of secondary storage device. Unlike the other
types of storage which combine a moving medium with a drive unit that moves the media
and accesses the content, the USB drive is a form of nonvolatile memory called flash
memory. Storage capacities for flash memory have been improving particularly in the last
decade to reach many gigabytes. Further, flash memory is portable and nearly all comput-
ers today have USB ports. The main drawbacks of USB storage are the relatively slow access
speed compared to hard disk and a limitation in the number of times the drive can be writ-
ten to. Flash memory tends to wear out over time, particularly with each erasure. Estimates
indicate that flash memory will become unusable after perhaps 1000 to 100,000 erasures.
The actual number of erasures before a failure occurs will vary by specific device but it does
indicate a limited lifetime for the device.
As a historical note, magnetic tape is the oldest of these storage devices, dating back to
the earliest computers. In those days, the media was reel-to-reel tape. Later came audio
cassette and video cassette tape. The tape cartridges available today are far more cost effec-
tive because they can store as much or more than hard disk drives. In the 1960s, magnetic
floppy disk was introduced, followed by magnetic hard disk. Optical disks were not intro-
duced until the 1980s. Flash memory was available in a rudimentary form in the 1980s but
the USB drive was not introduced until around 2000.
In order for the CPU to communicate with a storage device (whether storage or other),
we need to install the proper device driver. A device driver is software that we add onto
the operating system. Its role is to act as an intermediary between the CPU and the device
itself. This is a requisite because the CPU will not know (nor should it) how to communicate
with each type of device. Every device has its own functions, features, and peculiarities.
Therefore, we add the device driver program to translate from generic CPU commands to
the specific actions needed to control the given device.
It used to be the case that aside from some hardware device drivers installed in ROM,
you would have to install a device driver for every new piece of hardware. Today, many
Navigating the Linux File System
◾
113
popular drivers are pre-installed in the operating system. Other popular device drivers
are easily installed over the Internet. For Linux, most device drivers are pre-installed and
available through kernel modules. You can find these modules under /
lib/modules/
Do'stlaringiz bilan baham: |