How PCs Work

Published on July 2016 | Categories: Types, School Work | Downloads: 40 | Comments: 0 | Views: 366
of 116
Download PDF   Embed   Report

Comments

Content

1
How PCs Work
The word computer refers to an object that can accept some input and produce
some output. In fact, the human brain itself is a sophisticated computer, and
scientists are learning more about how it works with each passing year. Our most
common use of the word computer, though, is to describe an electronic device
containing a microprocessor.
A microprocessor is a small electronic device that can carry out complex
calculations in the blink of an eye. You can find microprocessors in many devices
you use each day, such as cars, refrigerators and televisions. The most recognized
device with a microprocessor is the personal computer, or PC. In fact, the concept of
a computer has become nearly synonymous with the term PC.
When you hear PC, you probably envision an enclosed device with an attached
video screen, keyboard and some type of a pointing device, like a mouse or
touchpad. You might also envision different forms of PCs, such as desktop
computers, towers and laptops. The term PC has been associated with certain
brands, such as Intel processors or Microsoft operating systems. In this article,
though, we define a PC as a more general computing device with these
characteristics:


designed for use by one person at a time



runs an operating system to interface between the user and the
microprocessor



has certain common internal components described in this article, like a CPU
and RAM



runs software applications designed for specific work or play activities



allows for adding and removing hardware or software as needed

PCs trace their history back to the 1970s when a man named Ed Roberts began to
sell computer kits based on a microprocessor chip designed by Intel. Roberts called
his computer the Altair 8800 and sold the unassembled kits for $395. Popular
Electronics ran a story about the kit in its January 1975 issue, and to the surprise of
just about everyone, the kits became an instant hit. Thus, the era of the personal
computer began
While the Altair 8800 was the first real personal computer, it was the release of the
Apple II a couple of years later that signaled the start of the PC as a sought-after
home appliance. The Apple II, from inventors Steve Jobs and Steve Wozniak, proved
that there was a demand for computers in homes and schools. Soon after, longestablished computer companies like IBM and Texas Instruments jumped into the PC
market, and new brands like Commodore and Atari jumped into the game.

2
In this article, we'll look inside the PC to find out about its parts and what they do.
We'll also check out the basic software used to boot and run a PC. Then, we'll cover
mobile PCs and examine the future for PC technology.

Core PC Components
To see how a PC works, let's start with the pieces that come together to make up
the machine. The following are the components common to PCs in the order they're
typically assembled:
Case -- If you're using a laptop, the computer case includes keyboard and screen.
For desktop PCs, the case is typically some type of box with lights, vents, and places
for attaching cables. The size of the case can vary from small tabletop units to tall
towers. A larger case doesn't always imply a more powerful computer; it's what's
inside that counts. PC builders design or select a case based on the type of
motherboard that should fit inside.
Motherboard -- The primary circuit board inside your PC is its motherboard. All
components, inside and out, connect through the motherboard in some way. The
other components listed on this page are removable and, thus, replaceable without
replacing the motherboard. Several important components, though, are attached
directly to the motherboard. These include the complementary metal-oxide
semiconductor (CMOS), which stores some information, such as the system clock,
when the computer is powered down. Motherboards come in different sizes and
standards, the most common as of this writing being ATX and Micro ATX. From there,
motherboards vary by the type of removable components they're designed to
handle internally and what ports are available for attaching external devices.
Power supply -- Other than its CMOS, which is powered by a replaceable CMOS
battery on the motherboard, every component in your PC relies on its power supply.
The power supply connects to some type of power source, whether that's a battery
in the case of mobile computers, or a power outlet in the case of desktop PCs. In a
desktop PC, you can see the power supply mounted inside the case with a power
cable connection on the outside and a handful of attached cables inside. Some of
these cables connect directly to the motherboard while others connect to other
components like drives and fans.
Central processing unit (CPU) -- The CPU, often just called the processor, is the
component that contains the microprocessor. That microprocessor is the heart of all
the PC's operations and the performance of both hardware and software rely on the
processor's performance. Intel and AMD are the largest CPU manufacturers for PCs,
though you'll find others on the market, too. The two common CPU architectures are
32-bit and 64-bit, and you'll find that certain software relies on this architecture
distinction.

3
Random-access memory (RAM) -- Even the fastest processor needs a buffer to
store information while it's being processed. The RAM is to the CPU as a countertop
is to a cook: It serves as the place where the ingredients and tools you're working
with wait until you need to pick up and use them. Both a fast CPU and an ample
amount of RAM are necessary for a speedy PC. Each PC has a maximum amount of
RAM it can handle, and slots on the motherboard indicate the type of RAM the PC
requires.
Drives -- A drive is a device intended to store data when it's not in use. A hard drive
or solid state drive stores a PC's operating system and software, which we'll look at
more closely later. This category also includes optical drives such as those used for
reading and writing CD, DVD and Blue-ray media. A drive connects to the
motherboard based on the type of drive controller technology it uses, including the
older IDE standard and the newer SATA standard.
Cooling devices -- The more your computer processes, the more heat it generates.
The CPU and other components can handle a certain amount of heat. However, if a
PC isn't cooled properly, it can overheat, causing costly damage to its components
and circuitry. Fans are the most common device used to cool a PC. In addition, the
CPU is covered by a metallic block called a heat sink, which draws heat away from
the CPU. Some serious computer users, such as gamers, sometimes have more
expensive heat management solutions, like a water-cooled system, designed to deal
with more intense cooling demands.
Cables -- All the components we've mentioned so far are connected by some
combination of cables. These cables are designed to carry data, power or both. PCs
should be constructed so that the cables fold neatly within the case and do not
block air flow throughout it.
A PC is typically much more than these core components. Next, we'll look at the
ports and peripherals that let you interact with the computer and how you can add
even more components using expansion slots.

Ideally, your computer will have enough ports that you won't have to
jumble all your accessories together. If you find yourself in a jam like this,
consider whether or not you need all those peripherals.
Ports, Peripherals and Expansion Slots

4
The core components we've looked at so far make up a PC's central processing
power. A PC needs additional components, though, for interacting with human users
and other computers. The following are the PC parts that make this happen:
Graphics components -- While some motherboards have on-board graphics,
others include what's called an expansion slot, where you can slide in a separate
video card. In both cases, the video components in a PC process some of the
complex graphics data going to the screen, taking some of the load off your CPU. A
motherboard accepts video cards based on a specific interface, such as the older
AGP standard or one of the newer PCI standards.
Ports -- The word port is often used to describe a place on the outside of your PC
where you can plug in a cable. Describe a port by its use, such as a USB port or an
Ethernet port. (Note that the word port is also used to describe a software
connection when two pieces of hardware try to communicate.) Many ports are
affixed directly to the motherboard. Some of the ports you'll find on a PC include the
following:



USB ports



network ports, typically Ethernet and FireWire



video ports, typically some combination of VGA, DVI, RCA/component, S-Video
and HDMI



audio ports, typically some combination mini analog audio jacks or RCA



legacy ports, or ports that follow old standards which are rarely used in
modern computers, such as parallel printer ports and PS2 ports for a
keyboard and mouse

Peripherals -- Any piece of hardware that isn't mounted inside a PC's case is called
a peripheral. This includes your basic input and output devices: monitors, keyboards
and mice. It also includes printers, speakers, headphones, microphones, webcams
and USB flash drives. Anything you can plug in to a port on the PC is one of the PC's
peripherals. The essential peripherals (such as monitors) aren't necessary on
laptops, which have them built in instead.
Expansion slots -- On occasion, you'll want to add components to a PC that don't
have a designated slot somewhere on the motherboard. That's why the
motherboard will include a series of expansion slots. The removable components
designed to fit into expansion slots are called cards, probably because of their flat,
card-like structure. Using expansion slots, you can add extra video cards, network
cards, printer ports, TV receivers and many other custom additions. The card must

5
match the expansion slot type, whether it's the legacy ISA/EISA type or the more
common PCI, PCI-X or PCI Express types.
Now that we've looked at the parts of a PC, let's press the power button and see
what makes it boot.
Powering Up a PC
When you first power up a PC, the machine goes through several internal processes
before it's ready for you to use. This is called the boot process, or booting the PC.
Boot is short for bootstrap, a reference to the old adage, "Pull yourself up by the
bootstraps," which means to start something from the very beginning. The boot
process is controlled by the PC's basic input-output system (BIOS).
The BIOS is software stored on a flash memory chip. In a PC, the BIOS is embedded
on the motherboard. Occasionally, a PC manufacturer will release an update for the
BIOS, and you can carefully follow instructions to "flash the BIOS" with the updated
software.
Besides controlling the boot process, the BIOS provide a basic configuration
interface for the PC's hardware components. In that interface, you can configure
such things as the order to read drives during boot and how fast the processor
should be allowed to run. Check your PC's documentation to find out how to enter
its BIOS interface. This information is often displayed when you first boot the
computer, too, with a message such as, "Press DEL to enter Setup Menu."
The following is a summary of the boot process in a PC:
1. The power button activates the power supply in the PC, sending power to the
motherboard and other components.
2. The PC performs a power-on self-test (POST). The POST is a small computer
program within the BIOS that checks for hardware failures. A single beep after
the POST signals that everything's okay. Other beep sequences signal a
hardware failure, and PC repair specialists compare these sequences with a
chart to determine which component has failed.
3. The PC displays information on the attached monitor showing details about
the boot process. These include the BIOS manufacturer and revision,
processor specs, the amount of RAM installed, and the drives detected. Many
PCs have replaced displaying this information with a splash screen showing
the manufacturer's logo. You can turn off the splash screen in the BIOS
settings if you'd rather see the text.
4. The BIOS attempts to access the first sector of the drive designated as the
boot disk. The first sector is the first kilobytes of the disk in sequence, if the
drive is read sequentially starting with the first available storage address. The

6
boot disk is typically the same hard disk or solid-state drive that contains
your operating system. You can change the boot disk by configuring the BIOS
or interrupting the boot process with a key sequence (often indicated on the
boot screens).
5. The BIOS confirms there's a bootstrap loader, or boot loader, in that first
sector of the boot disk, and it loads that boot loader into memory (RAM). The
boot loader is a small program designed to find and launch the PC's operating
system.
6. Once the boot loader is in memory, the BIOS hands over its work to the boot
loader, which in turn begins loading the operating system into memory.
7. When the boot loader finishes its task, it turns control of the PC over to the
operating system. Then, the OS is ready for user interaction.
Now that we're all powered up, what's next? A great deal of how PCs work depends
on the operating system you use. In the next section, let's examine how operating
systems work on a PC.

Microsoft Windows continues to be the most popular operating system in
the world.
PC Operating Systems
After a PC boots, you can control it through an operating system, or OS for short. As
of this writing, most non-Apple PCs run a version of Microsoft Windows or
a Linux distribution. These operating systems are designed to run on various kinds
of PC hardware, while Mac OS X is designed primarily for Apple hardware.
An operating system is responsible for several tasks. These tasks fall into the
following broad categories:

7


Processor management -- breaks down the processor's work into
manageable chunks and prioritizes them before sending them to the CPU.



Memory management -- coordinates the flow of data in and out of RAM,
and determines when to use virtual memory on the hard disk to supplement
an insufficient amount of RAM.



Device management -- provides a software-based interface between the
computer's internal components and each device connected to the computer.
Examples include interpreting keyboard or mouse input or adjusting graphics
data to the right screen resolution. Network interfaces, including managing
your Internet connection, also fall into the device management bucket.



Storage management -- directs where data should be stored permanently
on hard drives, solid state drives, USB drives and other forms of storage. For
example, storage management tasks assist when creating, reading, editing,
moving, copying and deleting documents.



Application interface -- provides data exchange between software
programs and the PC. An application must be programmed to work with the
application interface for the operating system you're using. Applications are
often designed for specific versions of an OS, too. You'll see this in the
application's requirements with phrases like "Windows Vista or later," or "only
works on 64-bit operating systems."



User interface (UI) - provides a way for you to interact with the computer.

From there, make a note to see our article How Operating Systems Work for more
details about how an OS functions on a PC. Also, check with when you want to know
how specific applications and devices work on your PC.
Now let's look at the future of PCs overall and the way that PC manufacturers have
conquered the portability challenges of mobile computing.

8
Mobile computing devices will continue to become more and more
prominent in the PC market.
Portable Personal Computing
Even before the PC, computer manufacturers were conceptualizing portable
computers. It was the 12-pound IBM PC Convertible that brought the laptop concept
into production in 1986. Since then, laptop computers have become smaller and
lighter and their processing power has improved alongside desktop PCs.
Today, the computer industry recognizes other classes of mobile computers. One
class, the notebook, has become almost synonymous with the laptop. The term was
originally used to indicate a smaller, lighter cousin to the laptop. Another class,
the net book, is even smaller than notebooks, while also being cheaper and less
powerful. The classification is probably named for its target audience: those that
want a very basic interface for using the Internet.
Mobile computing goes even further than notebooks and net books. Many smart
phones and tablets have as much processing power as notebooks, packed into
smaller packages. The key differences include a smaller screen size and resolution,
fewer external ports, cellular phone capability and touch-screen technology, in
addition to or in place of a keyboard.
On the software side, PC operating systems are also improving portability. For
example, Google Chrome OS minimizes the need for hard drive space by relying on
access to Web applications and cloud storage. This means a net book that's limited
to a 64 GB solid-state drive has the potential to be as useful as a laptop with a 500
GB disk drive. Naturally, large applications that aren't Web-enabled are the
exception to this space-saving advantage.
In this article, we've looked at how a PC works and where PC technology is going.
One thing is certain: the PC will evolve. It will get faster. It will have more capacity.
And it will continue to be an integral part of our lives.

How Operating Systems Work
When you turn on your computer, it's nice to think that you're in control. There's the
trusty computer mouse, which you can move anywhere on the screen, summoning
up your music library or Internet browser at the slightest whim. Although it's easy to
feel like a director in front of your desktop or laptop, there's a lot going on inside,
and the real man behind the curtain handling the necessary tasks is the operating
system.
Most desktop or laptop PCs come pre-loaded with Microsoft Windows. Macintosh
computers come pre-loaded with Mac OS X. Many corporate servers use the Linux

9
or UNIX operating systems. The operating system (OS) is the first thing loaded onto
the computer -- without the operating system, a computer is useless.
More recently, operating systems have started to pop up in smaller computers as
well. If you like to tinker with electronic devices, you're probably pleased that
operating systems can now be found on many of the devices we use every day,
from cell phones to wireless access points. The computers used in these little
devices have gotten so powerful that they can now actually run an operating
system and applications. The computer in a typical modern cell phone is now more
powerful than a desktop computer from 20 years ago, so this progression makes
sense and is a natural development.
The purpose of an operating system is to organize and control hardware and
software so that the device it lives in behaves in a flexible but predictable way. In
this article, we'll tell you what a piece of software must do to be called an operating
system, show you how the operating system in your desktop computer works and
give you some examples of how to take control of the other operating systems
around you.
What is an Operating System?
Not all computers have operating systems. The computer that controls
the microwave oven in your kitchen, for example, doesn't need an operating
system. It has one set of tasks to perform, very straightforward input to expect (a
numbered keypad and a few pre-set buttons) and simple, never-changing hardware
to control. For a computer like this, an operating system would be unnecessary
baggage, driving up the development and manufacturing costs significantly and
adding complexity where none is required. Instead, the computer in a microwave
oven simply runs a single hard-wired program all the time.
For other devices, an operating system creates the ability to:


serve a variety of purposes



interact with users in more complicated ways



keep up with needs that change over time

All desktop computers have operating systems. The most common are the Windows
family of operating systems developed by Microsoft, the Macintosh operating
systems developed by Apple and the UNIX family of operating systems (which have
been developed by a whole history of individuals, corporations and collaborators).
There are hundreds of other operating systems available for special-purpose
applications, including specializations for mainframes, robotics, and manufacturing,
real-time control systems and so on.

10
In any device that has an operating system, there's usually a way to make changes
to how the device works. This is far from a happy accident; one of the reasons
operating systems are made out of portable code rather than permanent physical
circuits is so that they can be changed or modified without having to scrap the
whole device.
For a desktop computer user, this means you can add a new security update,
system patch, new application or even an entirely new operating system rather than
junk your computer and start again with a new one when you need to make a
change. As long as you understand how an operating system works and how to get
at it, in many cases you can change some of the ways it behaves. The same thing
goes for your phone, too.
Regardless of what device an operating system runs, what exactly can it
do?

11
The operating system controls every task your computer carries out and
manages system resources.
Operating System Functions
At the simplest level, an operating system does two things:
1. It manages the hardware and software resources of the system. In a desktop
computer, these resources include such things as the processor, memory,
disk space and more (On a cell phone, they include the keypad, the screen,
the address book, the phone dialer, the battery and the network connection).
2. It provides a stable, consistent way for applications to deal with the hardware
without having to know all the details of the hardware.
The first task, managing the hardware and software resources, is very important, as
various programs and input methods compete for the attention of the central
processing unit (CPU) and demand memory, storage and input/output (I/O)
bandwidth for their own purposes. In this capacity, the operating system plays the
role of the good parent, making sure that each application gets the necessary
resources while playing nicely with all the other applications, as well as husbanding
the limited capacity of the system to the greatest good of all the users and
applications.
The second task, providing a consistent application interface, is especially important
if there is to be more than one of a particular type of computer using the operating
system, or if the hardware making up the computer is ever open to change. A
consistent application program interface (API) allows a software developer to
write an application on one computer and have a high level of confidence that it will
run on another computer of the same type, even if the amount of memory or the
quantity of storage is different on the two machines.
Even if a particular computer is unique, an operating system can ensure that
applications continue to run when hardware upgrades and updates occur. This is
because the operating system -- not the application -- is charged with managing the
hardware and the distribution of its resources. One of the challenges facing
developers is keeping their operating systems flexible enough to run hardware from
the thousands of vendors manufacturing computer equipment. Today's systems can
accommodate thousands of different printers, disk drives and special peripherals in
any possible combination.
Types of Operating Systems
Within the broad family of operating systems, there are generally four types,
categorized based on the types of computers they control and the sort of
applications they support. The categories are:

12


Real-time operating system (RTOS) - Real-time operating systems are
used to control machinery, scientific instruments and industrial systems. An
RTOS typically has very little user-interface capability, and no end-user
utilities, since the system will be a "sealed box" when delivered for use. A
very important part of an RTOS is managing the resources of the computer so
that a particular operation executes in precisely the same amount of time,
every time it occurs. In a complex machine, having a part move more quickly
just because system resources are available may be just as catastrophic as
having it not move at all because the system is busy.



Single-user, single task - As the name implies, this operating system is
designed to manage the computer so that one user can effectively do one
thing at a time. The Palm OS for Palm handheld computers is a good example
of a modern single-user, single-task operating system.



Single-user, multi-tasking - This is the type of operating system most
people use on their desktop and laptop computers today. Microsoft's Windows
and Apple's Mac OS platforms are both examples of operating systems that
will let a single user have several programs in operation at the same time. For
example, it's entirely possible for a Windows user to be writing a note in a
word processor while downloading a file from the Internet while printing the
text of an e-mail message.



Multi-user - A multi-user operating system allows many different users to
take advantage of the computer's resources simultaneously. The operating
system must make sure that the requirements of the various users are
balanced, and that each of the programs they are using has sufficient and
separate resources so that a problem with one user doesn't affect the entire
community of users. Unix, VMS and mainframe operating systems, such
as MVS, are examples of multi-user operating systems.

It's important to differentiate between multi-user operating systems and single-user
operating systems that support networking. Windows 2000 and Novell Netware can
each support hundreds or thousands of networked users, but the operating systems
themselves aren't true multi-user operating systems. The system administrator is
the only "user" for Windows 2000 or Netware. The network support and all of the
remote user logins the network enables are, in the overall plan of the operating
system, a program being run by the administrative user.
With the different types of operating systems in mind, it's time to look at the basic
functions provided by an operating system.
Happen when she boots up her computer, but eventually the operating
system takes over.
Computer Operating Systems

13
When you turn on the power to a computer, the first program that runs is usually a
set of instructions kept in the computer's read-only memory (ROM). This code
examines the system hardware to make sure everything is functioning properly.
This power-on self test (POST) checks the CPU, memory, and basic input-output
systems (BIOS) for errors and stores the result in a special memory location. Once
the POST has successfully completed, the software loaded in ROM (sometimes
called the BIOS or firmware) will begin to activate the computer's disk drives. In
most modern computers, when the computer activates the hard disk drive, it finds
the first piece of the operating system: the bootstrap loader.
The bootstrap loader is a small program that has a single function: It loads the
operating system into memory and allows it to begin operation. In the most basic
form, the bootstrap loader sets up the small driver programs that interface with and
control the various hardware subsystems of the computer. It sets up the divisions of
memory that hold the operating system, user information and applications. It
establishes the data structures that will hold the myriad signals, flags and
semaphores that are used to communicate within and between the subsystems and
applications of the computer. Then it turns control of the computer over to the
operating system.
The operating system's tasks, in the most general sense, fall into six categories:


Processor management



Memory management



Device management



Storage management



Application interface



User interface

While there are some who argue that an operating system should do more than
these six tasks, and some operating-system vendors do build many more utility
programs and auxiliary functions into their operating systems, these six tasks define
the core of nearly all operating systems. Next, let's look at the tools the operating
system uses to perform each of these functions.
Processor Management
The heart of managing the processor comes down to two related issues:


Ensuring that each process and application receives enough of the
processor's time to function properly



Using as many processor cycles as possible for real work

14
The basic unit of software that the operating system deals with in scheduling the
work done by the processor is either a process or a thread, depending on the
operating system.
It's tempting to think of a process as an application, but that gives an incomplete
picture of how processes relate to the operating system and hardware. The
application you see (word processor, spreadsheet or game) is, indeed, a process,
but that application may cause several other processes to begin, for tasks like
communications with other devices or other computers. There are also numerous
processes that run without giving you direct evidence that they ever exist. For
example, Windows XP and UNIX can have dozens of background processes running
to handle the network, memory management, disk management, virus checks and
so on.
A process, then, is software that performs some action and can be controlled -- by a
user, by other applications or by the operating system.
It is processes, rather than applications, that the operating system controls and
schedules for execution by the CPU. In a single-tasking system, the schedule is
straightforward. The operating system allows the application to begin running,
suspending the execution only long enough to deal with interrupts and user input.
Interrupts are special signals sent by hardware or software to the CPU. It's as if
some part of the computer suddenly raised its hand to ask for the CPU's attention in
a lively meeting. Sometimes the operating system will schedule the priority of
processes so that interrupts are masked -- that is, the operating system will ignore
the interrupts from some sources so that a particular job can be finished as quickly
as possible. There are some interrupts (such as those from error conditions or
problems with memory) that are so important that they can't be ignored.
These non-mask able interrupts (NMIs) must be dealt with immediately,
regardless of the other tasks at hand.
While interrupts add some complication to the execution of processes in a singletasking system, the job of the operating system becomes much more complicated
in a multi-tasking system. Now, the operating system must arrange the execution of
applications so that you believe that there are several things happening at once.
This is complicated because the CPU can only do one thing at a time. Today's multicore processors and multi-processor machines can handle more work, but each
processor core is still capable of managing one task at a time.
In order to give the appearance of lots of things happening at the same time, the
operating system has to switch between different processes thousands of times a
second. Here's how it happens:


A process occupies a certain amount of RAM. It also makes use of registers,
stacks and queues within the CPU and operating-system memory space.

15


When two processes are multi-tasking, the operating system allots a certain
number of CPU execution cycles to one program.



After that number of cycles, the operating system makes copies of all the
registers, stacks and queues used by the processes, and notes .the point at
which the process paused in its execution.



It then loads all the registers, stacks and queues used by the second process
and allow it a certain number of CPU cycles.



When those are complete, it makes copies of all the registers, stacks and
queues used by the second program, and load the first program.

Process Control Block
All of the information needed to keep track of a process when switching is kept in a
data package called a process control block. The process control block typically
contains:


An ID number that identifies the process



Pointers to the locations in the program and its data where processing last
occurred



Register contents



States of various flags and switches



Pointers to the upper and lower bounds of the memory required for the
process



A list of files opened by the process



The priority of the process



The status of all I/O devices needed by the process

Each process has a status associated with it. Many processes consume no CPU time
until they get some sort of input. For example, a process might be waiting for a
keystroke from the user. While it is waiting for the keystroke, it uses no CPU time.
While it's waiting, it is "suspended". When the keystroke arrives, the OS changes
its status. When the status of the process changes, from pending to active, for
example, or from suspended to running, the information in the process control block
must be used like the data in any other program to direct execution of the taskswitching portion of the operating system.
This process swapping happens without direct user interference, and each process
gets enough CPU cycles to accomplish its task in a reasonable amount of time.

16
Trouble can begin if the user tries to have too many processes functioning at the
same time. The operating system itself requires some CPU cycles to perform the
saving and swapping of all the registers, queues and stacks of the application
processes. If enough processes are started, and if the operating system hasn't been
carefully designed, the system can begin to use the vast majority of its available
CPU cycles to swap between processes rather than run processes. When this
happens, it's called thrashing, and it usually requires some sort of direct user
intervention to stop processes and bring order back to the system.
One way that operating-system designers reduce the chance of thrashing is by
reducing the need for new processes to perform various tasks. Some operating
systems allow for a "process-lite," called a thread that can deal with all the CPUintensive work of a normal process, but generally does not deal with the various
types of I/O and does not establish structures requiring the extensive process
control block of a regular process. A process may start many threads or other
processes, but a thread cannot start a process.
So far, all the scheduling we've discussed has concerned a single CPU. In a system
with two or more CPUs, the operating system must divide the workload among the
CPUs, trying to balance the demands of the required processes with the available
cycles on the different CPUs. Asymmetric operating systems use one CPU for
their own needs and divide application processes among the remaining
CPUs. Symmetric operating systems divide themselves among the various CPUs,
balancing demand versus CPU availability even when the operating system itself is
all that's running.
If the operating system is the only software with execution needs, the CPU is not the
only resource to be scheduled. Memory management is the next crucial step in
making sure that all processes run smoothly.
Memory Storage and Management
When an operating system manages the computer's memory, there are two broad
tasks to be accomplished:
1. Each process must have enough memory in which to execute, and it can
neither run into the memory space of another process nor be run into by
another process.
2. The different types of memory in the system must be used properly so that
each process can run most effectively.
The first task requires the operating system to set up memory boundaries for types
of software and for individual applications.
As an example, let's look at an imaginary small system with 1 megabyte (1,000
kilobytes) of RAM. During the boot process, the operating system of our imaginary

17
computer is designed to go to the top of available memory and then "back up" far
enough to meet the needs of the operating system itself. Let's say that the
operating system needs 300 kilobytes to run. Now, the operating system goes to
the bottom of the pool of RAM and starts building up with the various driver
software required to control the hardware subsystems of the computer. In our
imaginary computer, the drivers take up 200 kilobytes. So after getting the
operating system completely loaded, there are 500 kilobytes remaining for
application processes.
When applications begin to be loaded into memory, they are loaded in block sizes
determined by the operating system. If the block size is 2 kilobytes, then every
process that's loaded will be given a chunk of memory that's a multiple of 2
kilobytes in size. Applications will be loaded in these fixed block sizes, with the
blocks starting and ending on boundaries established by words of 4 or 8 bytes.
These blocks and boundaries help to ensure that applications won't be loaded on
top of one another's space by a poorly calculated bit or two. With that ensured, the
larger question is what to do when the 500-kilobyte application space is filled.
In most computers, it's possible to add memory beyond the original capacity. For
example, you might expand RAM from 1 to 2 gigabytes. This works fine, but can be
relatively expensive. It also ignores a fundamental fact of computing -- most of the
information that an application stores in memory is not being used at any given
moment. A processor can only access memory one location at a time, so the vast
majority of RAM is unused at any moment. Since disk space is cheap compared to
RAM, then moving information in RAM to hard disk can greatly expand RAM space at
no cost. This technique is called virtual memory management.
Disk storage is only one of the memory types that must be managed by the
operating system, and it's also the slowest. Ranked in order of speed, the types of
memory in a computer system are:


High-speed cache -- This is fast, relatively small amounts of memory that
are available to the CPU through the fastest connections. Cache controllers
predict which pieces of data the CPU will need next and pull it from main
memory into high-speed cache to speed up system performance.



Main memory -- This is the RAM that you see measured in megabytes when
you buy a computer.



Secondary memory -- This is most often some sort of rotating magnetic
storage that keeps applications and data available to be used, and serves
as virtual RAM under the control of the operating system.

The operating system must balance the needs of the various processes with the
availability of the different types of memory, moving data in blocks (called pages)
between available memory as the schedule of processes dictates.

18
A driver helps the operating system communicate with the electrical
signals from computer hardware.
Device Management
The path between the operating system and virtually all hardware not on the
computer's motherboard goes through a special program called a driver. Much of a
driver's function is to be the translator between the electrical signals of the
hardware subsystems and the high-level programming languages of the operating
system and application programs. Drivers take data that the operating system has
defined as a file and translate them into streams of bits placed in specific locations
on storage devices, or a series of laser pulses in a printer.
Because there are such wide differences in the hardware, there are differences in
the way that the driver programs function. Most run when the device is required,
and function much the same as any other process. The operating system will
frequently assign high-priority blocks to drivers so that the hardware resource can
be released and readied for further use as quickly as possible.
One reason that drivers are separate from the operating system is so that new
functions can be added to the driver -- and thus to the hardware subsystems -without requiring the operating system itself to be modified, recompiled and
redistributed. Through the development of new hardware device drivers,
development often performed or paid for by the manufacturer of the subsystems
rather than the publisher of the operating system, input/output capabilities of the
overall system can be greatly enhanced.
Managing input and output is largely a matter of managing queues and buffers,
special storage facilities that take a stream of bits from a device, perhaps a
keyboard or a serial port, hold those bits, and release them to the CPU at a rate with
which the CPU can cope. This function is especially important when a number of
processes are running and taking up processor time. The operating system will
instruct a buffer to continue taking input from the device, but to stop sending data
to the CPU while the process using the input is suspended. Then, when the process
requiring input is made active once again, the operating system will command the
buffer to send data. This process allows a keyboard or a modem to deal with
external users or computers at a high speed even though there are times when the
CPU can't use input from those sources.
Managing all the resources of the computer system is a large part of the operating
system's function and, in the case of real-time operating systems, may be virtually
all the functionality required. For other operating systems, though, providing a
relatively simple, consistent way for applications and humans to use the power of
the hardware is a crucial part of their reason for existing.
Application Program Interfaces

19
Just as drivers provide a way for applications to make use of hardware subsystems
without having to know every detail of the hardware's operation, application
program interfaces (APIs) let application programmers use functions of
the computer and operating system without having to directly keep track of all the
details in the CPU's operation. Let's look at the example of creating a hard disk file
for holding data to see why this can be important.
A programmer writing an application to record data from a scientific instrument
might want to allow the scientist to specify the name of the file created. The
operating system might provide an API function named Make File for creating files.
When writing the program, the programmer would insert a line that looks like this:
Make File [1, %Name, 2]
In this example, the instruction tells the operating system to create a file that will
allow random access to its data (signified by the 1 -- the other option might be 0 for
a serial file), will have a name typed in by the user (%Name) and will be a size that
varies depending on how much data is stored in the file (signified by the 2 -- other
options might be zero for a fixed size, and 1 for a file that grows as data is added
but does not shrink when data is removed). Now, let's look at what the operating
system does to turn the instruction into action.
The operating system sends a query to the disk drive to get the location of the first
available free storage location.
With that information, the operating system creates an entry in the file system
showing the beginning and ending locations of the file, the name of the file, the file
type, whether the file has been archived, which users have permission to look at or
modify the file, and the date and time of the file's creation.
The operating system writes information at the beginning of the file that identifies
the file, sets up the type of access possible and includes other information that ties
the file to the application. In all of this information, the queries to the disk drive and
addresses of the beginning and ending point of the file are in formats heavily
dependent on the manufacturer and model of the disk drive.
Because the programmer has written the program to use the API for disk storage,
the programmer doesn't have to keep up with the instruction codes, data types and
response codes for every possible hard disk and tape drive. The operating system,
connected to drivers for the various hardware subsystems, deals with the changing
details of the hardware. The programmer must simply write code for the API and
trust the operating system to do the rest.
APIs have become one of the most hotly contested areas of the computer industry
in recent years. Companies realize that programmers using their API will ultimately
translate this into the ability to control and profit from a particular part of the

20
industry. This is one of the reasons that so many companies have been willing to
provide applications like readers or viewers to the public at no charge. They know
consumers will request that programs take advantage of the free readers, and
application companies will be ready to pay royalties to allow their software to
provide the functions requested by the consumers.

User Interface
Just as the API provides a consistent way for applications to use the resources of
the computer system, a user interface (UI) brings structure to the interaction
between a user and the computer. In the last decade, almost all development in
user interfaces has been in the area of the graphical user interface (GUI), with
two models, Apple's Macintosh and Microsoft's Windows, receiving most of the
attention and gaining most of the market share. The popular open-source Linux
operating system also supports a graphical user interface.
There are other user interfaces, some graphical and some not, for other operating
systems.
Unix, for example, has user interfaces called shells that present a user interface
more flexible and powerful than the standard operating system text-based
interface. Programs such as the Korn Shell and the C Shell are text-based interfaces
that add important utilities, but their main purpose is to make it easier for the user
to manipulate the functions of the operating system. There are also graphical user
interfaces, such as X-Windows and Gnome, that make Unix and Linux more like
Windows and Macintosh computers from the user's point of view.
It's important to remember that in all of these examples, the user interface is a
program or set of programs that sits as a layer above the operating system itself.
The same thing is true, with somewhat different mechanisms, of both Windows and
Macintosh operating systems. The core operating-system functions -- the
management of the computer system -- lie in the kernel of the operating system.
The display managers separate, though it may be tied tightly to
the kernel beneath. The ties between the operating-system kernel and the user
interface, utilities and other software define many of the differences in operating
systems today, and will further define them in the future.

21
Linux logo
Operating System Development
For desktop systems, access to a LAN or the Internet has become such an expected
feature that in many ways it's hard to discuss an operating system without making
reference to its connections to other computers and servers. Operating system
developers have made the Internet the standard method for delivering crucial
operating system updates and bug fixes. Although it's possible to receive these
updates via CD or DVD, it's becoming increasingly less common. In fact, some entire
operating systems themselves are only available through distribution over the
Internet.
Further, a process called Net Booting has streamlined the capability to move the
working operating system of a standard consumer desktop computer -- kernel, user
interface and all -- off of the machine it controls. This was previously only possible
for experienced power-users on multi-user platforms like UNIX and with a suite of
specialized applications. Net Booting allows the operating system for one computer
to be served over a network connection, by a remote computer connected
anywhere in the network. One NetBoot server can serve operating systems to
several dozen client computers simultaneously, and to the user sitting in front of
each client computer the experience is just like they are using their familiar desktop
operating system like Windows or Mac OS.
One question concerning the future of operating systems concerns the ability of a
particular philosophy of software distribution to create an operating system usable
by corporations and consumers together.
Linux, the operating system created and distributed according to the principles
of open source, has had a significant impact on the operating system in general.
Most operating systems, drivers and utility programs are written by commercial
organizations that distribute executable versions of their software -- versions that
can't be studied or altered. Open source requires the distribution of original source
materials that can be studied, altered and built upon, with the results once again
freely distributed. In the desktop computer realm, this has led to the development
and distribution of countless useful and cost-free applications like the image
manipulation program GIMP and the popular Web server Apache. In the consumer
device realm, the use of Linux has paved the way for individual users to have
greater control over how their devices behave.
Many consumer devices like cell phones and routers deliberately hide access to the
operating system from the user, mostly to make sure that it's not inadvertently
broken or removed. In many cases, they leave a "developer's mode" or
"programmer's mode" open to allow changes to be made; howe3ver, that's only if
you know how to find it. Often these systems may be programmed in such a way
that there are only a limited range of changes that can be made. Some devices

22
leave both a mode of access and the means of making powerful changes open to
users, especially those that use Linux. Here are a couple of examples:


The TiVo DVR runs on a modified version of Linux. All of the modifications are
public knowledge, and can be downloaded here along with some special tools
for manipulating the code. Many enterprising TiVo users have added
functionality to their systems, including increasing the storage capacity to
getting to UNIX shells to changing the mode from NTSC to PAL.

How Computer Memory Works

When you think about it, it's amazing how many different types of electronic
memory you encounter in daily life. Many of them have become an integral part of
our vocabulary:


RAM



ROM



Cache



Dynamic RAM



Static RAM

23


Flash memory



Memory Sticks



Virtual memory



Video memory



BIOS

You already know that the computer in front of you has memory. What you may not
know is that most of the electronic items you use every day have some form of
memory also. Here are just a few examples of the many items that use memory:


Cell phones



PDAs



Game consoles



Car radios



VCRs



TVs

In this article, you'll learn why there are so many different types of memory and
what all of the terms mean. On the next page, let's start with the basics: What
exactly does computer memory do?

24

Computer Memory Basics
Although memory is technically any form of electronic storage, it is used most often
to identify fast, temporary forms of storage. If your computer's CPU had to
constantly access the hard drive to retrieve every piece of data it needs, it would
operate very slowly. When the information is kept in memory, the CPU can access it
much more quickly. Most forms of memory are intended to store data temporarily.
As you can see in the diagram above, the CPU accesses memory according to a
distinct hierarchy. Whether it comes from permanent storage (the hard drive) or
input (the keyboard), most data goes in random access memory (RAM) first. The
CPU then stores pieces of data it will need to access, often in a cache, and
maintains certain special instructions in the register. We'll talk about cache and
registers later.
All of the components in your computer, such as the CPU, the hard drive and
the operating system, work together as a team, and memory is one of the most
essential parts of this team. From the moment you turn your computer on until the
time you shut it down, your CPU is constantly using memory. Let's take a look at a
typical scenario:
You turn the computer on.
The computer loads data from read-only memory (ROM) and performs a poweron self-test (POST) to make sure all the major components are functioning
properly. As part of this test, the memory controller checks all of the memory

25
addresses with a quick read/write operation to ensure that there are no errors in
the memory chips. Read/write means that data is written to a bit and then read from
that bit.
The computer loads the basic input/output system (BIOS) from ROM. The BIOS
provides the most basic information about storage devices, boot sequence,
security, Plug and Play (auto device recognition) capability and a few other items.
The computer loads the operating system (OS) from the hard drive into the
system's RAM. Generally, the critical parts of the operating system are maintained
in RAM as long as the computer is on. This allows the CPU to have immediate access
to the operating system, which enhances the performance and functionality of the
overall system.
When you open an application, it is loaded into RAM. To conserve RAM usage,
many applications load only the essential parts of the program initially and then
load other pieces as needed.
After an application is loaded, any files that are opened for use in that application
are loaded into RAM.
When you save a file and close the application, the file is written to the specified
storage device, and then it and the application are purged from RAM.
In the list above, every time something is loaded or opened, it is placed into RAM.
This simply means that it has been put in the computer's temporary storage
area so that the CPU can access that information more easily. The CPU requests the
data it needs from RAM, processes it and writes new data back to RAM in
a continuous cycle. In most computers, this shuffling of data between the CPU and
RAM happens millions of times every second. When an application is closed, it and
any accompanying files are usually purged (deleted) from RAM to make room for
new data. If the changed files are not saved to a permanent storage device before
being purged, they are lost.
One common question about desktop computers that comes up all the time is, "Why
does a computer need so many memory systems?"
Types of Computer Memory
A typical computer has:


Level 1 and level 2 caches



Normal system RAM



Virtual memory



A hard disk

26
Why so many? The answer to this question can teach you a lot about memory!
Fast, powerful CPUs need quick and easy access to large amounts of data in order to
maximize their performance. If the CPU cannot get to the data it needs, it literally
stops and waits for it. Modern CPUs running at speeds of about 1 gigahertz can
consume massive amounts of data -- potentially billions of bytes per second. The
problem that computer designers face is that memory that can keep up with a 1gigahertz CPU is extremely expensive -- much more expensive than anyone can
afford in large quantities.
Computer designers have solved the cost problem by "tiering" memory -- using
expensive memory in small quantities and then backing it up with larger quantities
of less expensive memory.
The cheapest form of read/write memory in wide use today is the hard disk. Hard
disks provide large quantities of inexpensive, permanent storage. You can buy hard
disk space for pennies per megabyte, but it can take a good bit of time
(approaching a second) to read a megabyte off a hard disk. Because storage space
on a hard disk is so cheap and plentiful, it forms the final stage of a CPUs memory
hierarchy, called virtual memory.
The next level of the hierarchy is RAM. We discuss RAM in detail in How RAM Works,
but several points about RAM are important here.
The bit size of a CPU tells you how many bytes of information it can access from
RAM at the same time. For example, a 16-bit CPU can process 2 bytes at a time (1
byte = 8 bits, so 16 bits = 2 bytes), and a 64-bit CPU can process 8 bytes at a time.
Megahertz (MHz) is a measure of a CPU's processing speed, or clock cycle, in
millions per second. So, a 32-bit 800-MHz Pentium III can potentially process 4 bytes
simultaneously, 800 million times per second (possibly more based on pipelining)!
The goal of the memory system is to meet those requirements.
A computer's system RAM alone is not fast enough to match the speed of the CPU.
That is why you need a cache (discussed later). However, the faster RAM is, the
better. Most chips today operate with a cycle rate of 50 to 70 nanoseconds. The
read/write speed is typically a function of the type of RAM used, such as DRAM,
SDRAM, RAM BUS. We will talk about these various types of memory later.
First, let's talk about system RAM.
System RAM
System RAM speed is controlled by bus width and bus speed. Bus width refers to
the number of bits that can be sent to the CPU simultaneously, and bus speed refers
to the number of times a group of bits can be sent each second. A bus cycle occurs
every time data travels from memory to the CPU. For example, a 100-MHz 32-bit

27
bus is theoretically capable of sending 4 bytes (32 bits divided by 8 = 4 bytes) of
data to the CPU 100 million times per second, while a 66-MHz 16-bit bus can send 2
bytes of data 66 million times per second. If you do the math, you'll find that simply
changing the bus width from 16 bits to 32 bits and the speed from 66 MHz to 100
MHz in our example allows for three times as much data (400 million bytes versus
132 million bytes) to pass through to the CPU every second.
In reality, RAM doesn't usually operate at optimum speed. Latency changes the
equation radically. Latency refers to the number of clock cycles needed to read a bit
of information. For example, RAM rated at 100 MHz is capable of sending a bit in
0.00000001 seconds, but may take 0.00000005 seconds to start the read process
for the first bit. To compensate for latency, CPUs uses a special technique
called burst mode.
Burst mode depends on the expectation that data requested by the CPU will be
stored in sequential memory cells. The memory controller anticipates that
whatever the CPU is working on will continue to come from this same series of
memory addresses, so it reads several consecutive bits of data together. This
means that only the first bit is subject to the full effect of latency; reading
successive bits takes significantly less time. The rated burst mode of memory is
normally expressed as four numbers separated by dashes. The first number tells
you the number of clock cycles needed to begin a read operation; the second, third
and fourth numbers tell you how many cycles are needed to read each consecutive
bit in the row, also known as the word line. For example: 5-1-1-1 tells you that it
takes five cycles to read the first bit and one cycle for each bit after that. Obviously,
the lower these numbers are, the better the performance of the memory.
Burst mode is often used in conjunction with pipelining, another means of
minimizing the effects of latency. Pipelining organizes data retrieval into a sort of
assembly-line process. The memory controller simultaneously reads one or more
words from memory, sends the current word or words to the CPU and writes one or
more words to memory cells. Used together, burst mode and pipelining can
dramatically reduce the lag caused by latency.
So why wouldn't you buy the fastest, widest memory you can get? The speed and
width of the memory's bus should match the system's bus. You can use memory
designed to work at 100 MHz in a 66-MHz system, but it will run at the 66-MHz
speed of the bus so there is no advantage, and 32-bit memory won't fit on a 16-bit
bus.
Even with a wide and fast bus, it still takes longer for data to get from the memory
card to the CPU than it takes for the CPU to actually process the data. That's where
caches come in.
Cache and Registers

28
Caches are designed to alleviate this bottleneck by making the data used most
often by the CPU instantly available. This is accomplished by building a small
amount of memory, known as primary or level 1 cache, right into the CPU. Level 1
cache is very small, normally ranging between 2 kilobytes (KB) and 64 KB.
The secondary or level 2 cache typically resides on a memory card located near
the CPU. The level 2 cache has a direct connection to the CPU. A dedicated
integrated circuit on the motherboard, the L2 controller, regulates the use of the
level 2 cache by the CPU. Depending on the CPU, the size of the level 2 cache
ranges from 256 KB to 2 megabytes (MB). In most systems, data needed by the CPU
is accessed from the cache approximately 95 percent of the time, greatly reducing
the overhead needed when the CPU has to wait for data from the main memory.
Some inexpensive systems dispense with the level 2 cache altogether. Many high
performance CPUs now have the level 2 cache actually built into the CPU chip itself.
Therefore, the size of the level 2 cache and whether it is onboard (on the CPU) is a
major determining factor in the performance of a CPU. For more details on caching,
A particular type of RAM, static random access memory (SRAM), is used primarily
for cache. SRAM uses multiple transistors, typically four to six, for each memory
cell. It has an external gate array known as a bitable multi vibrator that switches,
or flip-flops, between two states. This means that it does not have to be continually
refreshed like DRAM. Each cell will maintain its data as long as it has power. Without
the need for constant refreshing, SRAM can operate extremely quickly. But the
complexity of each cell make it prohibitively expensive for use as standard RAM.
The SRAM in the cache can be asynchronous or synchronous. Synchronous SRAM
is designed to exactly match the speed of the CPU, while asynchronous is not. That
little bit of timing makes a difference in performance. Matching the CPU's clock
speed is a good thing, so always look for synchronized SRAM. (For more information
on the various types of RAM, see How RAM Works.)
The final step in memory is the registers. These are memory cells built right into
the CPU that contain specific data needed by the CPU, particularly the arithmetic
and logic unit (ALU). An integral part of the CPU itself, they are controlled directly
by the compiler that sends information for the CPU to process. See How for details
on registers.
VOLATILITY
Memory can be split into two main categories: volatile and nonvolatile. Volatile
memory loses any data as soon as the system is turned off; it requires constant
power to remain viable. Most types of RAM fall into this category.
Nonvolatile memory does not lose its data when the system or device is turned off.
A number of types of memory fall into this category. The most familiar is ROM, but

29
Flash memory storage devices such as Compact Flash or Smart Media cards are also
forms of nonvolatile memory.
How BIOS Works

One of the most common uses of Flash memory is for the basic input/output
system of your computer, commonly known as the BIOS (pronounced "bye-ose").
On virtually every computer available, the BIOS makes sure all the other chips, hard
drives, ports and CPU function together.
Every desktop and laptop computer in common use today contains
amicroprocessor as its central processing unit. The microprocessor is
the hardware component. To get its work done, the microprocessor executes a set
of instructions known as software (see How Microprocessors Work for details). You
are probably very familiar with two different types of software:
The operating system - The operating system provides a set of services for the
applications running on your computer, and it also provides the fundamental user
interface for your computer. Windows 98 and Linux are examples of operating
systems. (See How Operating Systems Work for lots of details.)
The applications - Applications are pieces of software that are programmed to
perform specific tasks. On your computer right now you probably have a browser
application, a word processing application, an e-mail application and so on. You can
also buy new applications and install them.
It turns out that the BIOS is the third type of software your computer needs to
operate successfully. In this article, you'll learn all about BIOS -- what it does, how to
configure it and what to do if your BIOS needs updating.

30

BIOS uses Flash memory, a type of ROM.
What BIOS Does
The BIOS software has a number of different roles, but its most important role is to
load the operating system. When you turn on your computer and the
microprocessor tries to execute its first instruction, it has to get that instruction
from somewhere. It cannot get it from the operating system because the operating
system is located on a hard disk, and the microprocessor cannot get to it without
some instructions that tell it how. The BIOS provides those instructions. Some of
the other common tasks that the BIOS per forms include:
A power-on self-test (POST) for all of the different hardware components in the
system to make sure everything is working properly
Activating other BIOS chips on different cards installed in the computer - For
example, SCSI and graphics cards often have their own BIOS chips.
Providing a set of low-level routines that the operating system uses to interface to
different hardware devices - It is these routines that give the BIOS its name. They
manage things like the keyboard, the screen, and the serial and parallel ports,
especially when the computer is booting.
Managing a collection of settings for the hard disks, clock, etc.
The BIOS is special software that interfaces the major hardware components of your
computer with the operating system. It is usually stored on a Flash memory chip on
the motherboard, but sometimes the chip is another type of ROM.
When you turn on your computer, the BIOS does several things. This is its usual
sequence:
1. Check the CMOS Setup for custom settings
2. Load the interrupt handlers and device drivers

31
3. Initialize registers and power management
4. Perform the power-on self-test (POST)
5. Display system settings
6. Determine which devices are bootable
7. Initiate the bootstrap sequence
The first thing the BIOS does is check the information stored in a tiny (64 bytes)
amount of RAM located on a complementary metal oxide
semiconductor (CMOS) chip. The CMOS Setup provides detailed information
particular to your system and can be altered as your system changes. The BIOS
uses this information to modify or supplement its default programming as needed.
We will talk more about these settings later.
Interrupt handlers are small pieces of software that act as translators between
the hardware components and the operating system. For example, when you press
a key on your keyboard, the signal is sent to the keyboard interrupt handler, which
tells the CPU what it is and passes it on to the operating system. The device
drivers are other pieces of software that identify the base hardware components
such as keyboard, mouse, hard drive and floppy drive. Since the BIOS is constantly
intercepting signals to and from the hardware, it is usually copied, or shadowed,
into RAM to run faster.

This is the message you receive if a disk is in the drive when you restart
your computer.
Booting the Computer
Whenever you turn on your computer, the first thing you see is the BIOS software
doing its thing. On many machines, the BIOS displays text describing things like the
amount of memory installed in your computer, the type of hard disk and so on. It
turns out that, during this boot sequence, the BIOS is doing a remarkable amount of
work to get your computer ready to run. This section briefly describes some of those
activities for a typical PC.

32
After checking the CMOS Setup and loading the interrupt handlers, the BIOS
determines whether the video card is operational. Most video cards have a
miniature BIOS of their own that initializes the memory and graphics processor on
the card. If they do not, there is usually video driver information on another ROM on
the motherboard that the BIOS can load.
Next, the BIOS checks to see if this is a cold boot or a reboot. It does this by
checking the value at memory address 0000:0472. A value of 1234h indicates a
reboot, and the BIOS skips the rest of POST. Anything else is considered a cold boot.
If it is a cold boot, the BIOS verifies RAM by performing a read/write test of each
memory address. It checks the PS/2 ports or USB ports for a keyboard and a mouse.
It looks for a peripheral component interconnects (PCI) bus and, if it finds one,
checks all the PCI cards. If the BIOS find any errors during the POST, it will notify you
by a series of beeps or a text message displayed on the screen. An error at this
point is almost always a hardware problem.
The BIOS then displays some details about your system. This typically includes
information about:


The processor



The floppy drive and hard drive



Memory



BIOS revision and date



Display

Any special drivers, such as the ones for small computer system interface (SCSI)
adapters, are loaded from the adapter and the BIOS displays the information. The
BIOS then looks at the sequence of storage devices identified as boot devices in
the CMOS Setup. "Boot" is short for "bootstrap," as in the old phrase, "Lift yourself
up by your bootstraps." Boot refers to the process of launching the operating
system. The BIOS will try to initiate the boot sequence from the first device. If the
BIOS does not find a device, it will try the next device in the list. If it does not find
the proper files on a device, the startup process will halt. If you have ever left a
disk when you restarted your computer, you have probably seen this message.
The BIOS has tried to boot the computer off of the disk left in the drive. Since it did
not find the correct system files, it could not continue. Of course, this is an easy fix.
Simply pop out the disk and press a key to continue.

33

CMOS Setup
Configuring BIOS
In the previous list, you saw that the BIOS checks the CMOS Setup for custom
settings. Here's what you do to change those settings.
To enter the CMOS Setup, you must press a certain key or combination of keys
during theinitial startup sequence. Most systems use "Esc," "Del," "F1," "F2,"
"Ctrl-Esc" or "Ctrl-Alt-Esc" to enter setup. There is usually a line of text at the
bottom of the display that tells you "Press ___ to Enter Setup."
Once you have entered setup, you will see a set of text screens with a number of
options. Some of these are standard, while others vary according to the BIOS
manufacturer. Common options include:


System Time/Date - Set the system time and date



Boot Sequence - The order that BIOS will try to load the operating system



Plug and Play - A standard for auto-detecting connected devices; should be
set to "Yes" if your computer and operating system both support it



Mouse/Keyboard - "Enable Num Lock," "Enable the Keyboard," "Auto-Detect
Mouse"...



Drive Configuration - Configure hard drives, CD-ROM and floppy drives



Memory - Direct the BIOS to shadow to a specific memory address



Security - Set a password for accessing the computer



Power Management - Select whether to use power management, as well as
set the amount of time for standby and suspend



Exit - Save your changes, discard your changes or restore default settings

34
Be very careful when making changes to setup. Incorrect settings may keep your
computer from booting. When you are finished with your changes, you should
choose "Save Changes" and exit. The BIOS will then restart your computer so that
the new settings take effect.
The BIOS uses CMOS technology to save any changes made to the computer's
settings. With this technology, a small lithium or Ni-Cad battery can supply enough
power to keep the data for years. In fact, some of the newer chips have a 10-year,
tiny lithium battery built right into the CMOS chip!
Updating Your BIOS
Occasionally, a computer will need to have its BIOS updated. This is especially true
of older machines. As new devices and standards arise, the BIOS needs to change in
order to understand the new hardware. Since the BIOS is stored in some form of
ROM, changing it is a bit harder than upgrading most other types of software.
To change the BIOS itself, you'll probably need a special program from the computer
or BIOS manufacturer. Look at the BIOS revision and date information displayed on
system startup or check with your computer manufacturer to find out what type of
BIOS you have. Then go to the BIOS manufacturer's Web site to see if an upgrade is
available. Download the upgrade and the utility program needed to install it.
Sometimes the utility and update are combined in a single file to download. Copy
the program, along with the BIOS update, onto a floppy disk. Restart your computer
with the floppy disk in the drive, and the program erases the old BIOS and writes
the new one. You can find a BIOS Wizard that will check your BIOS at BIOS
Upgrades.
As with changes to the CMOS Setup, be careful when upgrading your BIOS. Make
sure you are upgrading to a version that is compatible with your computer system.
Otherwise, you could corrupt the BIOS, which means you won't be able to boot your
computer. If in doubt, check with your computer manufacturer to be sure you need
to upgrade.

How Microprocessors Work

35

The computer you are using to read this page uses a microprocessor to do its
work. The microprocessor is the heart of any normal computer, whether it is
a desktop machine, a server or a laptop. The microprocessor you are using might be
a Pentium, a K6, a PowerPC, a Sparc or any of the many other brands and types of
microprocessors, but they all do approximately the same thing in approximately the
same way.
A microprocessor -- also known as a CPU or central processing unit -- is a complete
computation engine that is fabricated on a single chip. The first microprocessor was
the Intel 4004, introduced in 1971. The 4004 was not very powerful -- all it could do
was add and subtract, and it could only do that 4 bits at a time. But it was amazing
that everything was on one chip. Prior to the 4004, engineers built computers either
from collections of chips or from discrete components (transistors wired one at a
time). The 4004 powered one of the first portable electronic calculators.
If you have ever wondered what the microprocessor in your computer is doing, or if
you have ever wondered about the differences between types of microprocessors,
then read on. In this article, you will learn how fairly simple digital logic techniques
allow a computer to do its job, whether its playing a game or spell checking a
document!

The Intel 8080 was the first microprocessor in a home computer.

36
Microprocessor Progression: Intel
The first microprocessor to make it into a home computer was the Intel 8080, a
complete 8-bit computer on one chip, introduced in 1974. The first microprocessor
to make a real splash in the market was the Intel 8088, introduced in 1979 and
incorporated into the IBM PC (which first appeared around 1982). If you are familiar
with the PC market and its history, you know that the PC market moved from the
8088 to the 80286 to the 80386 to the 80486 to the Pentium to the Pentium II to the
Pentium III to the Pentium 4. All of these microprocessors are made by Intel and all
of them are improvements on the basic design of the 8088. The Pentium 4 can
execute any piece of code that ran on the original 8088, but it does it about 5,000
times faster!
Since 2004, Intel has introduced microprocessors with multiple cores and millions
more transistors. But even these microprocessors follow the same general rules as
earlier chips.

Here are the differences between the different processors that Intel has
introduced over the years.
Compiled from The Intel Microprocessor Quick Reference Guide and TSCP
Benchmark Scores
Additional information about the table on this page:


The date is the year that the processor was first introduced. Many processors
are re-introduced at higher clock speeds for many years after the original
release date.



Transistors is the number of transistors on the chip. You can see that the
number of transistors on a single chip has risen steadily over the years.

37


Microns is the width, in microns, of the smallest wire on the chip. For
comparison, a human hair is 100 microns thick. As the feature size on the
chip goes down, the number of transistors rises.



Clock speed is the maximum rate that the chip can be clocked at. Clock
speed will make more sense in the next section.



Data Width is the width of the ALU. An 8-bit ALU can
add/subtract/multiply/etc. two 8-bit numbers, while a 32-bit ALU can
manipulate 32-bit numbers. An 8-bit ALU would have to execute four
instructions to add two 32-bit numbers, while a 32-bit ALU can do it in one
instruction. In many cases, the external data bus is the same width as the
ALU, but not always. The 8088 had a 16-bit ALU and an 8-bit bus, while the
modern Pentiums fetch data 64 bits at a time for their 32-bit ALUs.



MIPS stand for "millions of instructions per second" and is a rough measure
of the performance of a CPU. Modern CPUs can do so many different things
that MIPS ratings lose a lot of their meaning, but you can get a general sense
of the relative power of the CPUs from this column.

From this table you can see that, in general, there is a relationship between clock
speed and MIPS. The maximum clock speed is a function of the manufacturing
process and delays within the chip. There is also a relationship between the number
of transistors and MIPS. For example, the 8088 clocked at 5 MHz but only executed
at 0.33 MIPS (about one instruction per 15 clock cycles). Modern processors can
often execute at a rate of two instructions per clock cycle. That improvement is
directly related to the number of transistors on the chip and will make more sense in
the next section.

WHAT'S A CHIP?

38
A chip is also called an integrated circuit. Generally it is a small, thin piece of
silicon onto which the transistors making up the microprocessor have been etched.
A chip might be as large as an inch on a side and can contain tens of millions of
transistors. Simpler processors might consist of a few thousand transistors etched
onto a chip just a few millimeters square.

Intel Pentium 4 processor
Microprocessor Logic
To understand how a microprocessor works, it is helpful to look inside and learn
about the logic used to create one. In the process you can also learn
about assembly language -- the native language of a microprocessor -- and many
of the things that engineers can do to boost the speed of a processor.
A microprocessor executes a collection of machine instructions that tell the
processor what to do. Based on the instructions, a microprocessor does three basic
things:


Using its ALU (Arithmetic/Logic Unit), a microprocessor can perform
mathematical operations like addition, subtraction, multiplication and
division. Modern microprocessors contain complete floating point processors
that can perform extremely sophisticated operations on large floating point
numbers.



A microprocessor can move data from one memory location to another.



A microprocessor can make decisions and jump to a new set of instructions
based on those decisions.

There may be very sophisticated things that a microprocessor does, but those are
its three basic activities. The following diagram shows an extremely simple
microprocessor capable of doing those three things:

39

This is about as simple as a microprocessor gets. This microprocessor has:


An address bus (that may be 8, 16 or 32 bits wide) that sends an address to
memory

40


A data bus (that may be 8, 16 or 32 bits wide) that can send data to
memory or receive data from memory



An RD (read) and WR (write) line to tell the memory whether it wants to set
or get the addressed location



A clock line that lets a clock pulse sequence the processor



A reset line that resets the program counter to zero (or whatever) and
restarts execution

Let's assume that both the address and data buses are 8 bits wide in this example.
Here are the components of this simple microprocessor:


Registers A, B and C are simply latches made out of flip-flops. (See the
section on "edge-triggered latches"



The address latch is just like registers A, B and C.



The program counter is a latch with the extra ability to increment by 1 when
told to do so, and also to reset to zero when told to do so.



The ALU could be as simple as an 8-bit adder (see the section on adders
in How Boolean Logic Works for details), or it might be able to add, subtract,
multiply and divide 8-bit values. Let's assume the latter here.



The test register is a special latch that can hold values from comparisons
performed in the ALU. An ALU can normally compare two numbers and
determine if they are equal, if one is greater than the other, etc. The test
register can also normally hold a carry bit from the last stage of the adder. It
stores these values in flip-flops and then the instruction decoder can use the
values to make decisions.



There are six boxes marked "3-State" in the diagram. These are tri-state
buffers. A tri-state buffer can pass a 1, a 0 or it can essentially disconnect its
output (imagine a switch that totally disconnects the output line from the
wire that the output is heading toward). A tri-state buffer allows multiple
outputs to connect to a wire, but only one of them to actually drive a 1 or a 0
onto the line.



The instruction register and instruction decoder are responsible for controlling
all of the other components.

Although they are not shown in this diagram, there would be control lines from the
instruction decoder that would:


Tell the A register to latch the value currently on the data bus

41


Tell the B register to latch the value currently on the data bus



Tell the C register to latch the value currently output by the ALU



Tell the program counter register to latch the value currently on the data bus



Tell the address register to latch the value currently on the data bus



Tell the instruction register to latch the value currently on the data bus



Tell the program counter to increment



Tell the program counter to reset to zero



Activate any of the six tri-state buffers (six separate lines)



Tell the ALU what operation to perform



Tell the test register to latch the ALU's test bits



Activate the RD line



Activate the WR line

Coming into the instruction decoder are the bits from the test register and the clock
line, as well as the bits from the instruction register.

Microprocessor Memory
The previous section talked about the address and data buses, as well as the RD
and WR lines. These buses and lines connect either to RAM or ROM -- generally
both. In our sample microprocessor, we have an address bus 8 bits wide and a data
bus 8 bits wide. That means that the microprocessor can address (2 8) 256 bytes of
memory, and it can read or write 8 bits of the memory at a time. Let's assume that
this simple microprocessor has 128 bytes of ROM starting at address 0 and 128
bytes of RAM starting at address 128.
ROM stands for read-only memory. A ROM chip is programmed with a permanent
collection of pre-set bytes. The address bus tells the ROM chip which byte to get
and place on the data bus. When the RD line changes state, the ROM chip presents
the selected byte onto the data bus.

42
RAM stands for random-access memory. RAM contains bytes of information, and the
microprocessor can read or write to those bytes depending on whether the RD or
WR line is signaled. One problem with today's RAM chips is that they forget
everything once the power goes off. That is why the computer needs ROM.

RAM chip
By the way, nearly all computers contain some amount of ROM (it is possible to
create a simple computer that contains no RAM -- many microcontrollers do this by
placing a handful of RAM bytes on the processor chip itself -- but generally
impossible to create one that contains no ROM). On a PC, the ROM is called
the BIOS (Basic Input/output System). When the microprocessor starts, it begins
executing instructions it finds in the BIOS. The BIOS instructions do things like test
the hardware in the machine, and then it goes to the hard disk to fetch the boot
sector (see How Hard Disks Work for details). This boot sector is another small
program, and the BIOS stores it in RAM after reading it off the disk. The
microprocessor then begins executing the boot sector's instructions from RAM. The
boot sector program will tell the microprocessor to fetch something else from the
hard disk into RAM, which the microprocessor then executes, and so on. This is how
the microprocessor loads and executes the entire operating system.
Microprocessor Instructions
Even the incredibly simple microprocessor shown in the previous example will have
a fairly large set of instructions that it can perform. The collection of instructions is
implemented as bit patterns, each one of which has a different meaning when
loaded into the instruction register. Humans are not particularly good at
remembering bit patterns, so a set of short words are defined to represent the
different bit patterns. This collection of words is called the assembly language of
the processor. An assembler can translate the words into their bit patterns very
easily, and then the output of the assembler is placed in memory for the
microprocessor to execute.
Here's the set of assembly language instructions that the designer might create for
the simple microprocessor in our example:


LOADA mem - Load register A from memory address

43


LOADB mem - Load register B from memory address



CONB con - Load a constant value into register B



SAVEB mem - Save register B to memory address



SAVEC mem - Save register C to memory address



ADD - Add A and B and store the result in C



SUB - Subtract A and B and store the result in C



MUL - Multiply A and B and store the result in C



DIV - Divide A and B and store the result in C



COM - Compare A and B and store the result in test



JUMP addr - Jump to an address



JEQ addr - Jump, if equal, to address



JNEQ addr - Jump, if not equal, to address



JG addr - Jump, if greater than, to address



JGE addr - Jump, if greater than or equal, to address



JL addr - Jump, if less than, to address



JLE addr - Jump, if less than or equal, to address



STOP - Stop execution

If you have read How C Programming Works, then you know that this simple piece of
C code will calculate the factorial of 5 (where the factorial of 5 = 5! = 5 * 4 * 3 * 2 *
1 = 120):
a=1;f=1;while (a <= 5){ f = f * a; a = a + 1;}
At the end of the program's execution, the variable f contains the factorial of 5.
Assembly Language
A C compiler translates this C code into assembly language. Assuming that RAM
starts at address 128 in this processor, and ROM (which contains the assembly
language program) starts at address 0, then for our simple microprocessor the
assembly language might look like this:

44
// Assume a is at address 128// Assume F is at address 1290 CONB 1 // a=1;1 SAVEB
1282 CONB 1 // f=1;3 SAVEB 1294 LOADA 128 // if a > 5 the jump to 175 CONB 56
COM7 JG 178 LOADA 129 // f=f*a;9 LOADB 12810 MUL11 SAVEC 12912 LOADA
128 // a=a+1;13 CONB 114 ADD15 SAVEC 12816 JUMP 4 // loop back to if17 STOP
ROM
So now the question is, "How do all of these instructions look in ROM?" Each of
these assembly language instructions must be represented by a binary number. For
the sake of simplicity, let's assume each assembly language instruction is given a
unique number, like this:
The numbers are known as opcodes. In ROM, our little program would look like this:
// Assume a is at address 128// Assume F is at address 129Addr opcode/value0 3 //
CONB 11 12 4 // SAVEB 1283 1284 3 // CONB 15 16 4 // SAVEB 1297 1298 1 //
LOADA 1289 12810 3 // CONB 511 512 10 // COM13 14 // JG 1714 3115 1 // LOADA
12916 12917 2 // LOADB 12818 12819 8 // MUL20 5 // SAVEC 12921 12922 1 //
LOADA 12823 12824 3 // CONB 125 126 6 // ADD27 5 // SAVEC 12828 12829 11 //
JUMP 430 831 18 // STOP
You can see that seven lines of C code became 18 lines of assembly language, and
that became 32 bytes in ROM.
Decoding
The instruction decoder needs to turn each of the opcodes into a set of signals that
drive the different components inside the microprocessor. Let's take the ADD
instruction as an example and look at what it needs to do:
1. During the first clock cycle, we need to actually load the instruction.
Therefore the instruction decoder needs to: activate the tri-state buffer for
the program counter activate the RD line activate the data-in tri-state buffer
latch the instruction into the instruction register
2. During the second clock cycle, the ADD instruction is decoded. It needs to do
very little: set the operation of the ALU to addition latch the output of the ALU
into the C register
3. During the third clock cycle, the program counter is incremented (in theory
this could be overlapped into the second clock cycle).
Every instruction can be broken down as a set of sequenced operations like these
that manipulate the components of the microprocessor in the proper order. Some
instructions, like this ADD instruction, might take two or three clock cycles. Others
might take five or six clock cycles.
Microprocessor Performance and Trends

45
The number of transistors available has a huge effect on the performance of a
processor. As seen earlier, a typical instruction in a processor like an 8088 took 15
clock cycles to execute. Because of the design of the multiplier, it took
approximately 80 cycles just to do one 16-bit multiplication on the 8088. With more
transistors, much more powerful multipliers capable of single-cycle speeds become
possible.
More transistors also allow for a technology called pipelining. In a pipelined
architecture, instruction execution overlaps. So even though it might take five clock
cycles to execute each instruction, there can be five instructions in various stages of
execution simultaneously. That way it looks like one instruction completes every
clock cycle.
Many modern processors have multiple instruction decoders, each with its own
pipeline. This allows for multiple instruction streams, which means that more than
one instruction can complete during each clock cycle. This technique can be quite
complex to implement, so it takes lots of transistors.
Trends
The trend in processor design has primarily been toward full 32-bit ALUs with fast
floating point processors built in and pipelined execution with multiple instruction
streams. The newest thing in processor design is 64-bit ALUs, and people are
expected to have these processors in their home PCs in the next decade. There has
also been a tendency toward special instructions (like the MMX instructions) that
make certain operations particularly efficient, and the addition of hardware virtual
memory support and L1 caching on the processor chip. All of these trends push up
the transistor count, leading to the multi-million transistor powerhouses available
today. These processors can execute about one billion instructions per second!

46
64-bit Microprocessors
Sixty-four-bit processors have been with us since 1992, and in the 21st century they
have started to become mainstream. Both Intel and AMD have introduced 64-bit
chips, and the Mac G5 sports a 64-bit processor. Sixty-four-bit processors have 64bit ALUs, 64-bit registers, 64-bit buses and so on.
One reason why the world needs 64-bit processors is because of their enlarged
address spaces. Thirty-two-bit chips are often constrained to a maximum of 2 GB
or 4 GB of RAM access. That sounds like a lot, given that most home computers
currently use only 256 MB to 512 MB of RAM. However, a 4-GB limit can be a severe
problem for server machines and machines running large databases. And
even home machines will start bumping up against the 2 GB or 4 GB limit pretty
soon if current trends continue. A 64-bit chip has none of these constraints because
a 64-bit RAM address space is essentially infinite for the foreseeable future -- 2^64
bytes of RAM is something on the order of a billion gigabytes of RAM.
With a 64-bit address bus and wide, high-speed data buses on the motherboard, 64bit machines also offer faster I/O (input/output) speeds to things like hard disk
drives and video cards. These features can greatly increase system performance.
Servers can definitely benefit from 64 bits, but what about normal users? Beyond
the RAM solution, it is not clear that a 64-bit chip offers "normal users" any real,
tangible benefits at the moment. They can process data (very complex data
features lots of real numbers) faster. People doing video editing and people doing
photographic editing on very large images benefit from this kind of computing
power. High-end games will also benefit, once they are re-coded to take advantage
of 64-bit features. But the average user who is reading e-mail, browsing the Web
and editing Word documents is not really using the processor in that way.
How Graphics Cards Work

47
The images you see on your monitor are made of tiny dots called pixels. At most
common resolution settings, a screen displays over a million pixels, and the
computer has to decide what to do with every one in order to create an image. To
do this, it needs a translator -- something to take binary from the CPU and turn it
into a picture you can see. Unless a computer has graphics capability built into the
motherboard, that translation takes place on the graphics card.
A graphics card's job is complex, but its principles and components are easy to
understand. In this article, we will look at the basic parts of a video card and what
they do. We'll also examine the factors that work together to make a fast, efficient
graphics card.
Think of a computer as a company with its own art department. When people in the
company want a piece of artwork, they send a request to the art department. The
art department decides how to create the image and then puts it on paper. The end
result is that someone's idea becomes an actual, viewable picture.
A graphics card works along the same principles. The CPU, working in conjunction
with software applications, sends information about the image to the graphics card.
The graphics card decides how to use the pixels on the screen to create the image.
It then sends that information to the monitor through a cable.
Creating an image out of binary data is a demanding process. To make a 3-D image,
the graphics card first creates a wire frame out of straight lines. Then, it rasterizes
the image (fills in the remaining pixels). It also adds lighting, texture and color. For
fast-paced games, the computer has to go through this process about sixty times
per second. Without a graphics card to perform the necessary calculations, the
workload would be too much for the computer to handle.
The graphics card accomplishes this task using four main components:


A motherboard connection for data and power



A processor to decide what to do with each pixel on the screen



Memory to hold information about each pixel and to temporarily store
completed pictures



A monitor connection so you can see the final result

48

Graphics cards take data from the CPU and turn it into pictures. Find out
the parts of a graphics card and read expert reviews of graphics cards.
The GPU
Like a motherboard, a graphics card is a printed circuit board that houses
a processor and RAM. It also has an input/output system (BIOS) chip, which stores
the card's settings and performs diagnostics on the memory, input and output at
startup. A graphics card's processor, called a graphics processing unit (GPU), is
similar to a computer's CPU. A GPU, however, is designed specifically for performing
the complex mathematical and geometric calculations that are necessary for
graphics rendering. Some of the fastest GPUs have more transistors than the
average CPU. A GPU produces a lot of heat, so it is usually located under a heat sink
or a fan.
In addition to its processing power, a GPU uses special programming to help it
analyze and use data. ATI and n Vidia produce the vast majority of GPUs on the
market, and both companies have developed their own enhancements for GPU
performance. To improve image quality, the processors use:


Full scene anti aliasing (FSAA), which smoothes the edges of 3-D objects



Anisotropic filtering (AF), which makes images look crisper

Each company has also developed specific techniques to help the GPU apply colors,
shading, textures and patterns.
As the GPU creates images, it needs somewhere to hold information and completed
pictures. It uses the card's RAM for this purpose, storing data about each pixel, its
color and its location on the screen. Part of the RAM can also act as a frame buffer,
meaning that it holds completed images until it is time to display them. Typically,
video RAM operates at very high speeds and is dual ported, meaning that the
system can read from it and write to it at the same time.
The RAM connects directly to the digital-to-analog converter, called the DAC.
This converter, also called the RAMDAC, translates the image into an analog signal
that the monitor can use. Some cards have multiple RAMDACs, which can improve

49
performance and support more than one monitor. You can learn more about this
process in How Analog and Digital Recording Works.
The RAMDAC sends the final picture to the monitor through a cable. We'll look at
this connection and other interfaces in the next section.
THE EVOLUTION OF GRAPHICS CARDS
Graphics cards have come a long way since IBM introduced the first one in 1981.
Called a Monochrome Display Adapter (MDA), the card provided text-only
displays of green or white text on a black screen. Now, the minimum standard for
new video cards is Video Graphics Array (VGA), which allows 256 colors. With
high-performance standards like Quantum Extended Graphics Array (QXGA),
video cards can display millions of colors at resolutions of up to 2040 x 1536 pixels.

This Radeon X800XL graphics card has DVI, VGA and Vi Vo connections.
PCI Connection
Graphics cards connect to the computer through the motherboard.
The motherboard supplies power to the card and lets it communicate with the CPU.
Newer graphics cards often require more power than the motherboard can provide,
so they also have a direct connection to the computer's power supply.
Connections to the motherboard are usually through one of three interfaces:


Peripheral component interconnect (PCI)



Advanced graphics port (AGP)



PCI Express (PCI e)

PCI Express is the newest of the three and provides the fastest transfer rates
between the graphics card and the motherboard. PCI e also supports the use of two
graphics cards in the same computer.

50
Most graphics cards have two monitor connections. Often, one is a DVI connector,
which supports LCD screens, and the other is a VGA connector, which
supports CRT screens. Some graphics cards have two DVI connectors instead. But
that doesn't rule out using a CRT screen; CRT screens can connect to DVI ports
through an adapter. At one time, Apple made monitors that used the proprietary
Apple Display Connector (ADC). Although these monitors are still in use, new Apple
monitors use a DVI connection.
Most people use only one of their two monitor connections. People who need to use
two monitors can purchase a graphics card with dual head capability, which splits
the display between the two screens. A computer with two dual head, PCIe-enabled
video cards could theoretically support four monitors.
In addition to connections for the motherboard and monitor, some graphics cards
have connections for:


TV display: TV-out or S-video



Analog video cameras: ViVo or video in/video out



Digital cameras: FireWire or USB

Some cards also incorporate TV tuners. Next, we'll look at how to choose a good
graphics card.
DIRECTX AND OPEN GL
DirectX and Open GL are application programming interfaces, or APIs. An API
helps hardware and software communicate more efficiently by providing
instructions for complex tasks, like 3-D rendering. Developers optimize graphicsintensive games for specific APIs. This is why the newest games often require
updated versions of DirectX or Open GL to work correctly.
APIs are different from drivers, which are programs that allow hardware to
communicate with a computer's operating system. But as with updated APIs,
updated device drivers can help programs run correctly.
Choosing a Good Graphics Card
A top-of-the-line graphics card is easy to spot. It has lots of memoryand a
fast processor. Often, it's also more visually appealing than anything else that's
intended to go inside a computer's case. Lots of high-performance video cards are
illustrated or have decorative fans or heat sinks.
But a high-end card provides more power than most people really need. People who
use their computers primarily for e-mail, word processing or Web surfing can find all
the necessary graphics support on a motherboard with integrated graphics. A mid-

51
range card is sufficient for most casual gamers. People who need the power of a
high-end card include gaming enthusiasts and people who do lots of 3-D graphic
work.
A good overall measurement of a card's performance is its frame rate, measured
in frames per second (FPS). The frame rate describes how many complete images
the card can display per second. The human eye can process about 25 frames every
second, but fast-action games require a frame rate of at least 60 FPS to provide
smooth animation and scrolling. Components of the frame rate are:


Triangles or vertices per second: 3-D images are made of triangles, or
polygons. This measurement describes how quickly the GPU can calculate the
whole polygon or the vertices that define it. In general, it describes how
quickly the card builds a wire frame image.



Pixel fill rate: This measurement describes how many pixels the GPU can
process in a second, which translates to how quickly it can rasterize the
image.

The graphics card's hardware directly affects its speed. These are the hardware
specifications that most affect the card's speed and the units in which they are
measured:


GPU clock speed (MHz)



Size of the memory bus (bits)



Amount of available memory (MB)



Memory clock rate (MHz)



Memory bandwidth (GB/s)



RAMDAC speed (MHz)

The computer's CPU and motherboard also play a part, since a very fast graphics
card can't compensate for a motherboard's inability to deliver data quickly.
Similarly, the card's connection to the motherboard and the speed at which it can
get instructions from the CPU affect its performance.
For more information on graphics cards and related topics, check out the links on
the following page.
INTEGRATED GRAPHICS AND OVERLOCKING
Many motherboards have integrated graphics capabilities and function without a
separate graphics card. These motherboards handle 2-D images easily, so they are

52
ideal for productivity and Internet applications. Plugging a separate graphics card
into one of these motherboards overrides the onboard graphics functions.
Some people choose to improve their graphics card's performance by manually
setting their clock speed to a higher rate, known as over clocking. People usually
over clock their memory, since over clocking the GPU can lead to overheating. While
over clocking can lead to better performance, it also voids the manufacturer's
warranty.
How AGP Works

You point, you click; you drag and you drop. Files open and close in separate
windows. Movies play, pop-ups pop, and video games fill the screen, immersing you
in a world of 3-D graphics. This is the stuff we're used to seeing on our computers.
It all started in 1973, when Xerox completed the Alto, the first computer to use a
graphical user interface. This innovation forever changed the way the people work
with their computers.
Today, every aspect of computing, from creating animation to simple tasks such as
word processing and e-mail, uses lots of graphics to create a more intuitive work
environment for the user. The hardware to support these graphics is called a
graphics card. The way this card connects to your computer is key in your
computer's ability to render graphics. In this article, you will learn about AGP,
or Accelerated Graphics Port. AGP enables your computer to have a dedicated
way to communicate with the graphics card, enhancing both the look and speed of
your computer's graphics.
Get Off the PCI Bus
In 1996, Intel introduced AGP as a more efficient way to deliver the streaming video
and real-time-rendered 3-D graphics that were becoming more prevalent in all
aspects of computing. Previously, the standard method of delivery was the
Peripheral Component Interconnect (PCI) bus. The PCI bus is a path used to deliver
information from the graphics card to the central processing unit (CPU). A bus allows

53
multiple packets of information from different sources to travel down one path
simultaneously. Information from the graphics card travels through the bus along
with any other information that is coming from a device connected to the PCI. When
all the information arrives at the CPU, it has to wait in line to get time with the CPU.
This system worked well for many years, but eventually the PCI bus became a little
long in the tooth. The Internet and most software were more and more graphically
oriented, and the demands of the graphics card needed priority over all other PCI
devices.

54

Typical example of an AGP-based graphics card
AGP is based on the design of the PCI bus; but unlike a bus, it provides a dedicated
point-to-point connection from the graphics card to the CPU. With a clear path to the
CPU and system memory, AGP provides a much faster, more efficient way for your
computer to get the information it needs to render complex graphics. In the next
section, we'll see how this is done
AGP Graphics Rendering
AGP is built on the idea of improving the ways that PCI transports data to the CPU.
Intel achieved this by addressing all of the areas where PCI transfers were causing
data bottlenecks in the system. By clearing the traffic jams of data, AGP increases
the speed at which machines can render graphics while using the system's
resources more efficiently to reduce overall drag. Here's how:


Dedicated Port - There are no other devices connected to the AGP other
than the graphics card. With a dedicated path to the CPU, the graphics card
can always operate at the maximum capacity of the connection.



Pipelining - This method of data organization allows the graphics card to
receive and respond to multiple packets of data in a single request. Here's a
simplified example of this: With AGP, the graphics card can receive a request

55
for all of the information needed to render a particular image and send it out
all at once. With PCI, the graphics card would receive information on the
height of the image and wait... then the length of the image, and wait... then
the width of the image, and wait... combine the data, and then send it out.


Sideband addressing - Like a letter, all requests and information sent from
one part of your computer to the next must have an address containing "To"
and "From." The problem with PCI is that this "To" and "From" information is
sent with the working data all together in one packet. This is the equivalent of
including an address card inside the envelope when you send a letter to a
friend: Now the post office has to open the envelope to see the address in
order to know where to send it. This takes up the post office's time. In
addition, the address card itself takes up room in the envelope, reducing the
total amount of stuff you can send to your friend. With sideband addressing,
the AGP issues eight additional lines on the data packet just for addressing.
This puts the address on the outside of the envelope, so to speak, freeing up
the total bandwidth of the data path used to transfer information back and
forth. In addition, it unclogs system resources that were previously used to
open the packet to read the addresses.

56
With PCI, texture maps are loaded from the hard drive to system memory,
processed by the CPU and then loaded into the frame buffer of the
graphics card.
PCI Graphics Rendering: Wasting RAM
Speed is not the only area where AGP has bested its predecessor. It also streamlines
the process of rendering graphics by using system memory more efficiently.
Any 3-D graphic you see on your computer is built by a texture map. Texture maps
are like wrapping paper. Your computer takes a flat, 2-D image and wraps it around
a set of parameters dictated by the graphics card to create the appearance of a 3-D
image. Think of this as wrapping an invisible box with wrapping paper to show the
size of the box. It is important to understand this because the creation and storage
of texture maps is the main thing that drains the memory from both the graphics
card and the system overall.
With a PCI-based graphics card, every texture map has to be stored twice. First, the
texture map is loaded from the hard drive to the system memory (RAM) until it has
to be used. Once it is needed, it is pulled from memory and sent to the CPU to be
processed. Once processed, it is sent through the PCI bus to the graphics card,
where it is stored again in the card's frame buffer. The frame buffer is where the
graphics card holds the image in storage once it has been rendered so that it can be
refreshed every time it is needed. All of this storing and sending between the
system and the card is very draining to the overall performance of the computer.

57

Diagram of the standard architecture of a Pentium III-based system using
AGP
Photo courtesy Intel Corporation
AGP Memory Improvements
AGP improves the process of storing texture maps by allowing the operating
system to designate RAM for use by the graphics card on the fly. This type of
memory is called AGP memory or non-local video memory. Using the much more
abundant and faster RAM used by the operating system to store texture maps
reduces the number of maps that have to be stored on the graphics card's memory.
In addition, the size of the texture map your computer is capable of processing is no
longer limited to the amount of RAM on the graphics card.
The other way AGP saves RAM is by only storing texture maps once. It does this with
a little trickery. This trickery takes the form of a chipset called the Graphics
Address Remapping Table (GART). GART takes the portion of the system memory
that the AGP borrows to store texture maps for the graphics card and re-addresses
it. The new address provided by GART makes the CPU think that the texture map is
being stored in the card's frame buffer. GART may be putting bits and pieces of the

58
map all over the system RAM; but when the CPU needs it, as far as it's concerned
the texture map is right where it should be.
AGP Graphic Cards
AGP and AGP graphics cards are now the standard for processing graphics on
computers. Like all hardware, the technology and specifications are constantly
improving. To learn about the current standards for AGP and prices for AGP graphics
cards, click on the links below.
How Caching Works
If you have been shopping for a computer, then you have heard the word "cache."
Modern computers have both L1 and L2 caches, and many now also have L3 cache.
You may also have gotten advice on the topic from well-meaning friends, perhaps
something like "Don't buy that Celeron chip, it doesn't have any cache in it!"
It turns out that caching is an important computer-science process that appears on
every computer in a variety of forms. There are memory caches, hardware and
software disk caches, page caches and more. Virtual memory is even a form of
caching. In this article, we will explore caching so you can understand why it is so
important.
A Simple Example: Before Cache
Caching is a technology based on the memory subsystem of your computer. The
main purpose of a cache is to accelerate your computer while keeping the price of the computer low. Caching allows you to do your computer tasks more rapidly.
To understand the basic idea behind a cache system, let's start with a super-simple
example that uses a librarian to demonstrate caching concepts. Let's imagine a
librarian behind his desk. He is there to give you the books you ask for. For the sake
of simplicity, let's say you can't get the books yourself -- you have to ask the
librarian for any book you want to read, and he fetches it for you from a set of
stacks in a storeroom (the library of congress in Washington, D.C., is set up this
way). First, let's start with a librarian without cache.
The first customer arrives. He asks for the book Moby Dick. The librarian goes into
the storeroom, gets the book, returns to the counter and gives the book to the
customer. Later, the client comes back to return the book. The librarian takes the
book and returns it to the storeroom. He then returns to his counter waiting for
another customer. Let's say the next customer asks for Moby Dick (you saw it
coming...). The librarian then has to return to the storeroom to get the book he
recently handled and give it to the client. Under this model, the librarian has to
make a complete round trip to fetch every book -- even very popular ones that are
requested frequently. Is there a way to improve the performance of the librarian?

59
Yes, there's a way -- we can put a cache on the librarian. In the next section, we'll
look at this same example but this time, the librarian will use a caching system.

A Simple Example: After Cache
Let's give the librarian a backpack into which he will be able to store 10 books (in
computer terms, the librarian now has a 10-book cache). In this backpack, he will
put the books the clients return to him, up to a maximum of 10. Let's use the prior
example, but now with our new-and-improved caching librarian.
The day starts. The backpack of the librarian is empty. Our first client arrives and
asks for Moby Dick. No magic here -- the librarian has to go to the storeroom to get
the book. He gives it to the client. Later, the client returns and gives the book back
to the librarian. Instead of returning to the storeroom to return the book, the
librarian puts the book in his backpack and stands there (he checks first to see if the
bag is full -- more on that later). Another client arrives and asks for Moby Dick.
Before going to the storeroom, the librarian checks to see if this title is in his
backpack. He finds it! All he has to do is take the book from the backpack and give

60
it to the client. There's no journey into the storeroom, so the client is served more
efficiently.
What if the client asked for a title not in the cache (the backpack)? In this case, the
librarian is less efficient with a cache than without one, because the librarian takes
the time to look for the book in his backpack first. One of the challenges of cache
design is to minimize the impact of cache searches, and modern hardware has
reduced this time delay to practically zero. Even in our simple librarian example, the
latency time (the waiting time) of searching the cache is so small compared to the
time to walk back to the storeroom that it is irrelevant. The cache is small (10
books), and the time it takes to notice a miss is only a tiny fraction of the time that
a journey to the storeroom takes.
From this example you can see several important facts about caching:
Cache technology is the use of a faster but smaller memory type to accelerate a
slower but larger memory type.
When using a cache, you must check the cache to see if an item is in there. If it is
there, it's called acache hit. If not, it is called a cache miss and the computer
must wait for a round trip from the larger, slower memory area.
A cache has some maximum size that is much smaller than the larger storage area.
It is possible to have multiple layers of cache. With our librarian example, the
smaller but faster memory type is the backpack, and the storeroom represents the
larger and slower memory type. This is a one-level cache. There might be another
layer of cache consisting of a shelf that can hold 100 books behind the counter. The
librarian can check the backpack, then the shelf and then the storeroom. This would
be a two-level cache.
Computer Caches
A computer is a machine in which we measure time in very small increments. When
the microprocessor accesses the main memory (RAM), it does it in about 60
nanoseconds (60 billionths of a second). That's pretty fast, but it is much slower
than the typical microprocessor. Microprocessors can have cycle times as short as 2
nanoseconds, so to a microprocessor 60 nanoseconds seems like an eternity.
What if we build a special memory bank in the motherboard, small but very fast
(around 30 nanoseconds)? That's already two times faster than the main memory
access. That's called a level 2 cache or an L2 cache. What if we build an even
smaller but faster memory system directly into the microprocessor's chip? That way,
this memory will be accessed at the speed of the microprocessor and not the speed
of the memory bus. That's an L1 cache, which on a 233-megahertz (MHz) Pentium
is 3.5 times faster than the L2 cache, which is two times faster than the access to
main memory.

61
Some microprocessors have two levels of cache built right into the chip. In this case,
the motherboard cache -- the cache that exists between the microprocessor and
main system memory -- becomes level 3, or L3 cache.
There are a lot of subsystems in a computer; you can put cache between many of
them to improve performance. Here's an example. We have the microprocessor (the
fastest thing in the computer). Then there's the L1 cache that caches the L2 cache
that caches the main memory which can be used (and is often used) as a cache for
even slower peripherals like hard disks and CD-ROMs. The hard disks are also used
to cache an even slower medium -- your Internet connection.
Caching Subsystems
Your Internet connection is the slowest link in your computer. So your browser
(Internet Explorer, Netscape, Opera, etc.) uses the hard disk to store HTML pages,
putting them into a special folder on your disk. The first time you ask for an HTML
page, your browser renders it and a copy of it is also stored on your disk. The next
time you request access to this page, your browser checks if the date of the file on
the Internet is newer than the one cached. If the date is the same, your browser
uses the one on your hard disk instead of downloading it from Internet. In this case,
the smaller but faster memory system is your hard disk and the larger and slower
one is the Internet.
Cache can also be built directly on peripherals. Modern hard disks come with fast
memory, around 512 kilobytes, hardwired to the hard disk. The computer doesn't
directly use this memory -- the hard-disk controller does. For the computer, these
memory chips are the disk itself. When the computer asks for data from the hard
disk, the hard-disk controller checks into this memory before moving the
mechanical parts of the hard disk (which is very slow compared to memory). If it
finds the data that the computer asked for in the cache, it will return the data stored
in the cache without actually accessing data on the disk itself, saving a lot of time.
Here's an experiment you can try. Your computer caches your floppy drive with main
memory, and you can actually see it happening. Access a large file from your floppy
-- for example, open a 300-kilobyte text file in a text editor. The first time, you will
see the light on your floppy turning on, and you will wait. The floppy disk is
extremely slow, so it will take 20 seconds to load the file. Now, close the editor and
open the same file again. The second time (don't wait 30 minutes or do a lot of disk
access between the two tries) you won't see the light turning on, and you won't
wait. The operating system checked into its memory cache for the floppy disk and
found what it was looking for. So instead of waiting 20 seconds, the data was found
in a memory subsystem much faster than when you first tried it (one access to the
floppy disk takes 120 milliseconds, while one access to the main memory takes
around 60 nanoseconds -- that's a lot faster). You could have run the same test on
your hard disk, but it's more evident on the floppy drive because it's so slow.

62
To give you the big picture of it all, here's a list of a normal caching system:
L1 cache - Memory accesses at full microprocessor speed (10 nanoseconds, 4
kilobytes to 16 kilobytes in size)
L2 cache - Memory access of type SRAM (around 20 to 30 nanoseconds, 128
kilobytes to 512 kilobytes in size)
Main memory - Memory access of type RAM (around 60 nanoseconds,
32 megabytes to 128 megabytes in size)
Hard disk - Mechanical, slow (around 12 milliseconds, 1 gigabyte to 10 gigabytes
in size)
Internet - Incredibly slow (between 1 second and 3 days, unlimited size)
As you can see, the L1 cache caches the L2 cache, which caches the main memory,
which can be used to cache the disk subsystems, and so on.
Cache Technology
One common question asked at this point is, "Why not make all of the computer's
memory run at the same speed as the L1 cache, so no caching would be required?"
That would work, but it would be incredibly expensive. The idea behind caching is to
use a small amount of expensive memory to speed up a large amount of slower,
less-expensive memory.
In designing a computer, the goal is to allow the microprocessor to run at its full
speed as inexpensively as possible. A 500-MHz chip goes through 500 million cycles
in one second (one cycle every two nanoseconds). Without L1 and L2 caches, an
access to the main memory takes 60 nanoseconds, or about 30 wasted cycles
accessing memory.
When you think about it, it is kind of incredible that such relatively tiny amounts of
memory can maximize the use of much larger amounts of memory. Think about a
256-kilobyte L2 cache that caches 64 megabytes of RAM. In this case, 256,000
bytes efficiently caches 64,000,000 bytes. Why does that work?
In computer science, we have a theoretical concept called locality of reference. It
means that in a fairly large program, only small portions are ever used at any one
time. As strange as it may seem, locality of reference works for the huge majority of
programs. Even if the executable is 10 megabytes in size, only a handful of bytes
from that program are in use at any one time, and their rate of repetition is very
high. On the next page, you'll learn more about locality of reference

63
Locality of Reference
Let's take a look at the following pseudo-code to see why locality of reference works
Output to screen «Enter a number between 1 and 100 »
Read input from user
Put value from user in variable X
Put value 100 in variable Y
Put value 1 in variable Z
Loop Y number of time
Divide Z by X
If the remainder of the division = 0
then output « Z is a multiple of X » Add 1 to Z Return to loop End
This small program asks the user to enter a number between 1 and 100. It reads the
value entered by the user. Then, the program divides every number between 1 and
100 by the number entered by the user. It checks if the remainder is 0 (modulo
division). If so, the program outputs "Z is a multiple of X" (for example, 12 is a
multiple of 6), for every number between 1 and 100. Then the program ends.
Even if you don't know much about computer programming, it is easy to understand
that in the 11 lines of this program, the loop part (lines 7 to 9) are executed 100
times. All of the other lines are executed only once. Lines 7 to 9 will run significantly
faster because of caching.
This program is very small and can easily fit entirely in the smallest of L1 caches,
but let's say this program is huge. The result remains the same. When you program,
a lot of action takes place inside loops. A word processor spends 95 percent of the
time waiting for your input and displaying it on the screen. This part of the wordprocessor program is in the cache.
This 95%-to-5% ratio (approximately) is what we call the locality of reference, and
it's why a cache works so efficiently. This is also why such a small cache can
efficiently cache such a large memory system. You can see why it's not worth it to
construct a computer with the fastest memory everywhere. We can deliver 95
percent of this effectiveness for a fraction of the cost.
How Virtual Memory Works

64

Virtual memory is a common part of most operating systems on desktop. It has
become so common because it provides a big benefit for users at a very low cost.
In this article, you will learn exactly what virtual memory is, what your computer
uses it for and how to configure it on your own machine to achieve optimal
performance.
Most computers today have something like 32 or 64 megabytes of RAM available for
the CPU to use. Unfortunately, that amount of RAM is not enough to run all of the
programs that most users expect to run at once.
For example, if you load the operating system, an e-mail program, a Web browser
and word processor into RAM simultaneously, 32 megabytes is not enough to hold it
all. If there were no such thing as virtual memory, then once you filled up the
available RAM your computer would have to say, "Sorry, you can not load any more
applications. Please close another application to load a new one." With virtual
memory, what the computer can do is look at RAM for areas that have not been
used recently and copy them onto the hard disk. This frees up space in RAM to load
the new application.
Because this copying happens automatically, you don't even know it is happening,
and it makes your computer feel like is has unlimited RAM space even though it only
has 32 megabytes installed. Because hard disk space is so much cheaper than RAM
chips, it also has a nice economic benefit.
The read/write speed of a hard drive is much slower than RAM, and the technology
of a hard drive is not geared toward accessing small pieces of data at a time. If your
system has to rely too heavily on virtual memory, you will notice a significant
performance drop. The key is to have enough RAM to handle everything you tend to
work on simultaneously -- then, the only time you "feel" the slowness of virtual
memory is is when there's a slight pause when you're changing tasks. When that's
the case, virtual memory is perfect.

65
When it is not the case, the operating system has to constantly swap information
back and forth between RAM and the hard disk. This is called thrashing, and it can
make your computer feel incredibly slow.
The area of the hard disk that stores the RAM image is called a page file. It
holds pages of RAM on the hard disk, and the operating system moves data back
and forth between the page file and RAM. On a Windows machine, page files have
a .SWP extension.
Next, we'll look at how to configure virtual memory on a computer

Configuring Virtual Memory
Windows 98 is an example of a typical operating system that has virtual memory.
Windows 98 has an intelligent virtual memory manager that uses a default
setting to help Windows allocate hard drive space for virtual memory as needed. For
most circumstances, this should meet your needs, but you may want to manually
configure virtual memory, especially if you have more than one physical hard
drive or speed-critical applications.

66
To do this, open the "Control Panel" window and double-click on the "System" icon.
The system dialog window will open. Click on the "Performance" tab and then click
on the "Virtual Memory" button.
Click on the option that says, "Let me specify my own virtual memory settings." This
will make the options below that statement become active. Click on the drop-down
list beside "Hard disk:" to select the hard drive that you wish to configure virtual
memory for. Remember that a good rule of thumb is to equally split virtual
memory between the physical hard disks you have.
In the "Minimum:" box, enter the smallest amount of hard drive space you wish to
use for virtual memory on the hard disk specified. The amounts are in megabytes.
For the "C:" drive, the minimum should be 2 megabytes. The "Maximum:" figure
can be anything you like, but one possible upper limit is twice physical RAM space.
Windows default is normally 12 megabytes above the amount of physical RAM in
your computer. To put the new settings into effect, close the dialog box and restart
your computer.
The amount of hard drive space you allocate for virtual memory is important. If you
allocate too little, you will get "Out of Memory" errors. If you find that you need to
keep increasing the size of the virtual memory, you probably are also finding that
your system is sluggish and accesses the hard drive constantly. In that case, you
should consider buying more RAM to keep the ratio between RAM and virtual
memory about 2:1. Some applications enjoy having lots of virtual memory space
but do not access it very much. In that case, large paging files work well.
One trick that can improve the performance of virtual memory (especially when
large amounts of virtual memory are needed) is to make the minimum and
maximum sizes of the virtual memory file identical. This forces the operating
system to allocate the entire paging file when you start the machine. That keeps the
paging file from having to grow while programs are running, which improves
performance. Many video applications recommend this technique to avoid pauses
while reading or writing video information between hard disk and tape.
Another factor in the performance of virtual memory is the location of the page
file. If your system has multiple physical hard drives (not multiple drive letters, but
actual drives), you can spread the work among them by making smaller page files
on each drive. This simple modification will significantly speed up any system that
makes heavy use of virtual memory.
How RAM Works

67

Random access memory (RAM) is the best known form of computer memory. RAM is
considered "random access" because you can access any memory cell directly if
you know the row and column that intersect at that cell.
The opposite of RAM is serial access memory (SAM). SAM stores data as a series
of memory cells that can only be accessed sequentially (like a cassette tape). If the
data is not in the current location, each memory cell is checked until the needed
data is found. SAM works very well for memory buffers, where the data is normally
stored in the order in which it will be used (a good example is the texture buffer
memory on a video card). RAM data, on the other hand, can be accessed in any
order.
Similar to a microprocessor, a memory chip is an integrated circuit(IC) made of
millions of transistors and capacitors. In the most common form of computer
memory, dynamic random access memory (DRAM), a transistor and a capacitor
are paired to create a memory cell, which represents a single bit of data. The
capacitor holds the bit of information -- a 0 or a 1 (see How Bits and Bytes Work for
information on bits). The transistor acts as a switch that lets the control circuitry on
the memory chip read the capacitor or change its state.
A capacitor is like a small bucket that is able to store electrons. To store a 1 in the
memory cell, the bucket is filled with electrons. To store a 0, it is emptied. The
problem with the capacitor's bucket is that it has a leak. In a matter of a few
milliseconds a full bucket becomes empty. Therefore, for dynamic memory to work,
either the CPU or the memory controller has to come along and recharge all of
the capacitors holding a 1 before they discharge. To do this, the memory controller
reads the memory and then writes it right back. This refresh operation happens
automatically thousands of times per second.
The capacitor in a dynamic RAM memory cell is like a leaky bucket. It needs to be
refreshed periodically or it will discharge to 0. This refresh operation is where
dynamic RAM gets its name. Dynamic RAM has to be dynamically refreshed all of

68
the time or it forgets what it is holding. The downside of all of this refreshing is that
it takes time and slows down the memory.
In this article, you'll learn all about what RAM is, what kind you should buy and how
to install it. See the next page to learn more about dynamic RAM and memory cells.
Memory Cells and DRAM
Memory is made up of bits arranged in a two-dimensional grid.
In this figure, red cells represent 1s and white cells represent 0s. In the animation, a
column is selected and then rows are charged to write data into the specific column.
Memory cells are etched onto a silicon wafer in an array of columns (bit lines) and
rows (word lines). The intersection of a bit line and word line constitutes
the address of the memory cell.
DRAM works by sending a charge through the appropriate column (CAS) to activate
the transistor at each bit in the column. When writing, the row lines contain the
state the capacitor should take on. When reading, the sense-amplifier determines
the level of charge in the capacitor. If it is more than 50 percent, it reads it as a 1;
otherwise it reads it as a 0. The counter tracks the refresh sequence based on which
rows have been accessed in what order. The length of time necessary to do all this
is so short that it is expressed in nanoseconds (billionths of a second). A memory
chip rating of 70ns means that it takes 70 nanoseconds to completely read and
recharge each cell.
Memory cells alone would be worthless without some way to get information in and
out of them. So the memory cells have a whole support infrastructure of other
specialized circuits. These circuits perform functions such as:


Identifying each row and column (row address select and column address
select)



Keeping track of the refresh sequence (counter)



Reading and restoring the signal from a cell (sense amplifier)



Telling a cell whether it should take a charge or not (write enable)

Other functions of the memory controller include a series of tasks that include
identifying the type, speed and amount of memory and checking for errors.
Static RAM works differently from DRAM. We'll look at how in the next section.
Static RAM

69
Static RAM uses a completely different technology. In static RAM, a form of flip-flop
holds each bit of memory (see How Boolean Logic Works for details on flip-flops). A
flip-flop for a memory cell takes four or six transistors along with some wiring, but
never has to be refreshed. This makes static RAM significantly faster than dynamic
RAM. However, because it has more parts, a static memory cell takes up a lot more
space on a chip than a dynamic memory cell. Therefore, you get less memory per
chip, and that makes static RAM a lot more expensive.
Static RAM is fast and expensive, and dynamic RAM is less expensive and slower. So
static RAM is used to create the CPU's speed-sensitive cache, while dynamic RAM
forms the larger system RAM space.
Memory chips in desktop computers originally used a pin configuration called dual
inline package (DIP). This pin configuration could be soldered into holes on the
computer's motherboard or plugged into a socket that was soldered on the
motherboard. This method worked fine when computers typically operated on a
couple of megabytes or less of RAM, but as the need for memory grew, the number
of chips needing space on the motherboard increased.
The solution was to place the memory chips, along with all of the support
components, on a separate printed circuit board (PCB) that could then be
plugged into a special connector (memory bank) on the motherboard. Most of
these chips use a small outline J-lead (SOJ) pin configuration, but quite a few
manufacturers use the thin small outline package (TSOP) configuration as well.
The key difference between these newer pin types and the original DIP configuration
is that SOJ and TSOP chips are surface-mounted to the PCB. In other words, the
pins are soldered directly to the surface of the board, not inserted in holes or
sockets.
Memory chips are normally only available as part of a card called a module. You've
probably seen memory listed as 8x32 or 4x16. These numbers represent the
number of the chips multiplied by the capacity of each individual chip, which is
measured in megabits (Mb), or one million bits. Take the result and divide it by
eight to get the number of megabytes on that module. For example, 4x32 means
that the module has four 32-megabit chips. Multiply 4 by 32 and you get 128
megabits. Since we know that a byte has 8 bits, we need to divide our result of 128
by 8. Our result is 16 megabytes!
In the next section we'll look at some other common types of RAM
Types of RAM
The following are some common types of RAM:

70


SRAM: Static random access memory uses multiple transistors, typically four
to six, for each memory cell but doesn't have a capacitor in each cell. It is
used primarily for cache.



DRAM: Dynamic random access memory has memory cells with a paired
transistor and capacitor requiring constant refreshing.



FPM DRAM: Fast page mode dynamic random access memory was the
original form of DRAM. It waits through the entire process of locating a bit of
data by column and row and then reading the bit before it starts on the next
bit. Maximum transfer rate to L2 cache is approximately 176 MBps.



EDO DRAM: Extended data-out dynamic random access memory does
not wait for all of the processing of the first bit before continuing to the next
one. As soon as the address of the first bit is located, EDO DRAM begins
looking for the next bit. It is about five percent faster than FPM. Maximum
transfer rate to L2 cache is approximately 264 MBps.



SDRAM: Synchronous dynamic random access memory takes
advantage of the burst mode concept to greatly improve performance. It
does this by staying on the row containing the requested bit and moving
rapidly through the columns, reading each bit as it goes. The idea is that
most of the time the data needed by the CPU will be in sequence. SDRAM is
about five percent faster than EDO RAM and is the most common form in
desktops today. Maximum transfer rate to L2 cache is approximately 528
MBps.



DDR SDRAM: Double data rate synchronous dynamic RAM is just like
SDRAM except that is has higher bandwidth, meaning greater speed.
Maximum transfer rate to L2 cache is approximately 1,064 MBps (for DDR
SDRAM 133 MHZ).



RDRAM: Ram bus dynamic random access memory is a radical
departure from the previous DRAM architecture. Designed by Ram bus,
RDRAM uses a Ram bus in-line memory module (RIMM), which is similar
in size and pin configuration to a standard DIMM. What makes RDRAM so
different is its use of a special high-speed data bus called the Ram bus
channel. RDRAM memory chips work in parallel to achieve a data rate of 800
MHz, or 1,600 MBps. Since they operate at such high speeds, they generate
much more heat than other types of chips. To help dissipate the excess heat
Ram bus chips are fitted with a heat spreader, which looks like a long thin
wafer. Just like there are smaller versions of DIMMs, there are also SO-RIMMs,
designed for notebook computers.

71


Credit Card Memory: Credit card memory is a proprietary self-contained
DRAM memory module that plugs into a special slot for use in notebook
computers.



PCMCIA Memory Card: Another self-contained DRAM module for notebooks,
cards of this type are not proprietary and should work with any notebook
computer whose system bus matches the memory card's configuration.



CMOS RAM: CMOS RAM is a term for the small amount of memory used by
your computer and some other devices to remember things like hard
disk settings -- see Why does my computer need a battery? for details. This
memory uses a small battery to provide it with the power it needs to maintain
the memory contents.



Most computers have a small battery. In many cases, the battery is soldered directly onto
themotherboard, but the battery is usually in some sort of holder so it is easy to replace.
Computers are not the only things that have a small battery like this -- camcorders and digital
cameras often have them, too. Just about any gadget that keeps track of the time will have a
battery.



In your computer (as well as other gadgets), the battery powers a chip called the Real Time
Clock (RTC)chip. The RTC is essentially a quartz watch that runs all the time, whether or not the
computer has power. The battery powers this clock. When the computer boots up, part of the
process is to query the RTC to get the correct time and date. A little quartz clock like this might
run for five to seven years off of a small battery. Then it is time to replace the battery.



This does not explain why your computer would not boot, however. You would expect the
computer to boot fine but have an incorrect time and date. The reason your computer would not
boot is because the RTC chip also contains 64 (or more) bytes of random access memory (RAM).
The clock uses 10 bytes of this space, leaving 54 bytes for other purposes. The BIOS stores all
sorts of information in the CMOS RAM area, like the number of floppy and hard disk drives, the
hard disk drive type, etc. If the CMOS RAM loses power, the computer may not know anything
about the hard disk configuration of your machine, and therefore it cannot boot.



Many more modern computers are not quite so dependent on the CMOS RAM. They store the
settings in non-volatile RAM that works without any power at all. If the battery goes dead, the
clock fails but the computer can still boot using the information in the non-volatile RAM area.



VRAM: Video RAM, also known as multiport dynamic random access
memory (MPDRAM), is a type of RAM used specifically for video adapters or
3-D accelerators. The "multiport" part comes from the fact that VRAM
normally has two independent access ports instead of one, allowing the CPU

72
and graphics processor to access the RAM simultaneously. VRAM is located on
the graphics card and comes in a variety of formats, many of which are
proprietary. The amount of VRAM is a determining factor in the
resolution and color depth of the display. VRAM is also used to hold graphicsspecific information such as3-D geometry data and texture maps. True
multiport VRAM tends to be expensive, so today, many graphics cards
use SGRAM (synchronous graphics RAM) instead. Performance is nearly the
same, but SGRAM is cheaper.

Memory Modules

The type of board and connector used for RAM in desktop computers has evolved
over the past few years. The first types were proprietary, meaning that different
computer manufacturers developed memory boards that would only work with their
specific systems. Then came SIMM, which stands for single in-line memory
module. This memory board used a 30-pin connector and was about 3.5 x .75
inches in size (about 9 x 2 cm). In most computers, you had to install SIMMs in pairs
of equal capacity and speed. This is because the width of the bus is more than a
single SIMM. For example, you would install two 8-megabyte (MB) SIMMs to get 16
megabytes total RAM. Each SIMM could send 8 bits of data at one time, while the
system bus could handle 16 bits at a time. Later SIMM boards, slightly larger at 4.25
x 1 inch (about 11 x 2.5 cm), used a 72-pin connector for increased bandwidth and
allowed for up to 256 MB of RAM.
As processors grew in speed and bandwidth capability, the industry adopted a new
standard in dual in-line memory module (DIMM). With a whopping 168-pin or
184-pin connector and a size of 5.4 x 1 inch (about 14 x 2.5 cm), DIMMs range in
capacity from 8 MB to 1 GB per module and can be installed singly instead of in

73
pairs. Most PC memory modules and the modules for the Mac G5 systems operate
at 2.5 volts, while older Mac G4 systems typically use 3.3 volts. Another
standard, Ram bus in-line memory module (RIMM), is comparable in size and pin
configuration to DIMM but uses a special memory bus to greatly increase speed.
Many brands of notebook computers use proprietary memory modules, but several
manufacturers use RAM based on the small outline dual in-line memory
module (SODIMM) configuration. SODIMM cards are small, about 2 x 1 inch (5 x 2.5
cm), and have 144 or 200 pins. Capacity ranges from 16 MB to 1 GB per module. To
conserve space, the Apple iMac desktop computer uses SODIMMs instead of the
traditional DIMMs. Sub-notebook computers use even smaller DIMMs, known as
Micro DIMMs, which have either 144 pins or 172 pins.
Most memory available today is highly reliable. Most systems simply have the
memory controller check for errors at start-up and rely on that. Memory chips with
built-in error-checking typically use a method known as parity to check for errors.
Parity chips have an extra bit for every 8 bits of data. The way parity works is
simple. Let's look at even parity first.
When the 8 bits in a byte receive data, the chip adds up the total number of 1s. If
the total number of 1s is odd, the parity bit is set to 1. If the total is even, the parity
bit is set to 0. When the data is read back out of the bits, the total is added up again
and compared to the parity bit. If the total is odd and the parity bit is 1, then the
data is assumed to be valid and is sent to the CPU. But if the total is odd and the
parity bit is 0, the chip knows that there is an error somewhere in the 8 bits and
dumps the data. Odd parity works the same way, but the parity bit is set to 1 when
the total number of 1s in the byte are even.
The problem with parity is that it discovers errors but does nothing to correct them.
If a byte of data does not match its parity bit, then the data are discarded and the
system tries again. Computers in critical positions need a higher level of fault
tolerance. High-end servers often have a form of error-checking known as errorcorrection code (ECC). Like parity, ECC uses additional bits to monitor the data in
each byte. The difference is that ECC uses several bits for error checking -- how
many depends on the width of the bus -- instead of one. ECC memory uses a
special algorithm not only to detect single bit errors, but actually correct them as
well. ECC memory will also detect instances when more than one bit of data in a
byte fails. Such failures are very rare, and they are not correctable, even with ECC.
The majority of computers sold today use nonparty memory chips. These chips do
not provide any type of built-in error checking, but instead rely on the memory
controller for error detection.
How Much RAM Do You Need?

74
It's been said that you can never have enough money, and the same holds true for
RAM, especially if you do a lot of graphics-intensive work or gaming. Next to
the CPU itself, RAM is the most important factor in computer performance. If you
don't have enough, adding RAM can make more of a difference than getting a new
CPU!
If your system responds slowly or accesses the hard drive constantly, then you need
to add more RAM. If you are running Windows XP, Microsoft recommends 128MB as
the minimum RAM requirement. At 64MB, you may experience frequent application
problems. For optimal performance with standard desktop applications, 256MB is
recommended. If you are running Windows 95/98, you need a bare minimum of 32
MB, and your computer will work much better with 64 MB. Windows NT/2000 needs
at least 64 MB, and it will take everything you can throw at it, so you'll probably
want 128 MB or more.
Linux works happily on a system with only 4 MB of RAM. If you plan to add XWindows or do much serious work, however, you'll probably want 64 MB. Mac OS X
systems should have a minimum of 128 MB, or for optimal performance, 512 MB.
The amount of RAM listed for each system above is estimated for normal usage -accessing the Internet, word processing, standard home/office applications and light
entertainment. If you do computer-aided design (CAD), 3-D modeling/animation or
heavy data processing, or if you are a serious gamer, then you will most likely need
more RAM. You may also need more RAM if your computer acts as a server of some
sort (Web pages, database, application, FTP or network).
Another question is how much VRAM you want on your video card. Almost all cards
that you can buy today have at least 16 MB of RAM. This is normally enough to
operate in a typical office environment. You should probably invest in a 32-MB or
better graphics card if you want to do any of the following:


Play realistic games



Capture and edit video



Create 3-D graphics



Work in a high-resolution, full-color environment



Design full-color illustrations

When shopping for video cards, remember that your monitor and computer must be
capable of supporting the card you choose.
How to Install RAM

75
Most of the time, installing RAM is a very simple and straightforward procedure. The
key is to do your research. Here's what you need to know:


How much RAM you have



How much RAM you wish to add



Form factor



RAM type



Tools needed



Warranty



Where it goes

RAM is usually sold in multiples of 16 megabytes: 16, 32, 64, 128, 256, 512, 1024
(which is the same as 1GB). This means that if you currently have a system with 64
MB RAM and you want at least 100 MB RAM total, then you will probably need to
add another 64 MB module.
Once you know how much RAM you want, check to see what form factor(card
type) you need to buy. You can find this in the manual that came with your
computer, or you can contact the manufacturer. An important thing to realize is that
your options will depend on the design of your computer. Most computers sold
today for normal home/office use have DIMM slots. High-end systems are moving to
RIMM technology, which will eventually take over in standard desktop computers as
well. Since DIMM and RIMM slots look a lot alike, be very careful to make sure you
know which type your computer uses. Putting the wrong type of card in a slot can
cause damage to your system and ruin the card.
You will also need to know what type of RAM is required. Some computers require
very specific types of RAM to operate. For example, your computer may only work
with 60ns-70ns parity EDO RAM. Most computers are not quite that restrictive, but
they do have limitations. For optimal performance, the RAM you add to your
computer must also match the existing RAM in speed, parity and type. The most
common type available today is SDRAM.
Additionally, some computers support Dual Channel RAM configuration either as an
option or as a requirement. Dual Channel means that RAM modules are installed in
matched pairs, so if there is a 512MB RAM card installed, there is another 512 MB
card installed next to it. When Dual Channel is an optional configuration, installing
RAM in matched pairs speeds up the performance of certain applications. When it's
a requirement, as in computers with the Mac G5 chip(s), the computer will not
function properly without matched pairs of RAM chips.

76

To install more RAM, look for memory modules on your computer's
motherboard. At the left is a Macintosh G4 and on the right is a PC.
Before you open your computer, check to make sure you won't be voiding the
warranty. Some manufacturers seal the case and request that the customer have an
authorized technician install RAM. If you're set to open the case, turn off and unplug
the computer. Ground yourself by using an anti-static pad or wrist strap to
discharge any static electricity. Depending on your computer, you may need a
screwdriver or nut-driver to open the case. Many systems sold today come in toolless cases that use thumbscrews or a simple latch.
The actual installation of the memory module does not normally require any tools.
RAM is installed in a series of slots on the motherboard known as the memory
bank. The memory module is notched at one end so you won't be able to insert it in
the wrong direction. For SIMMs and some DIMMs, you install the module by placing
it in the slot at approximately a 45-degree angle. Then push it forward until it is
perpendicular to the motherboard and the small metal clips at each end snap into
place. If the clips do not catch properly, check to make sure the notch is at the right
end and the card is firmly seated. Many DIMMs do not have metal clips; they rely on
friction to hold them in place. Again, just make sure the module is firmly seated in
the slot.
Once the module is installed, close the case, plug the computer back in and power it
up. When the computer starts the POST, it should automatically recognize the
memory. That's all there is to it!
For more information on RAM, other types of computer memory and related topics,
check out the links on the next page.

How ROM Works

77

2008 How Stuff Works ROM is used in most electronic devices. See more
computer memory pictures.
Read-only memory (ROM), also known as firmware, is an integrated circuit
programmed with specific data when it is manufactured. ROM chips are used not
only in computers, but in most other electronic items as well.
ROM Types
There are five basic ROM types:


ROM



PROM



EPROM



EEPROM



Flash memory

Each type has unique characteristics, which you'll learn about in this article, but
they are all types of memory with two things in common:


Data stored in these chips is nonvolatile -- it is not lost when power is
removed.



Data stored in these chips is either unchangeable or requires a special
operation to change (unlike RAM, which can be changed as easily as it is
read).

This means that removing the power source from the chip will not cause it to lose
any data.

78

Figure 1. BIOS uses Flash memory, a type of ROM.
ROM at Work
Similar to RAM, ROM chips (Figure 1) contain a grid of columns and rows. But where
the columns and rows intersect, ROM chips are fundamentally different from RAM
chips. While RAM uses transistors to turn on or off access to a capacitor at each
intersection, ROM uses a diode to connect the lines if the value is 1. If the value is
0, then the lines are not connected at all.
A diode normally allows current to flow in only one direction and has a certain
threshold, known as the forward break over, that determines how much current is
required before the diode will pass it on. In silicon-based items such
as processors and memory chips, the forward break over voltage is approximately
0.6 volts. By taking advantage of the unique properties of a diode, a ROM chip can
send a charge that is above the forward break over down the appropriate column
with the selected row grounded to connect at a specific cell. If a diode is present at
that cell, the charge will be conducted through to the ground, and, under the binary
system, the cell will be read as being "on" (a value of 1). The neat part of ROM is
that if the cell's value is 0, there is no diode at that intersection to connect the
column and row. So the charge on the column does not get transferred to the row.
As you can see, the way a ROM chip works necessitates the programming of perfect
and complete data when the chip is created. You cannot reprogram or rewrite a
standard ROM chip. If it is incorrect, or the data needs to be updated, you have to
throw it away and start over. Creating the original template for a ROM chip is often a
laborious process full of trial and error. But the benefits of ROM chips outweigh the
drawbacks. Once the template is completed, the actual chips can cost as little as a
few cents each. They use very little power, are extremely reliable and, in the case of
most small electronic devices, contain all the necessary programming to control the
device. A great example is the small chip in the singing fish toy. This chip, about the

79
size of your fingernail, contains the 30-second song clips in ROM and the control
codes to synchronize the motors to the music.

Figure 2
PROM
Creating ROM chips totally from scratch is time-consuming and very expensive in
small quantities. For this reason, mainly, developers created a type of ROM known
as programmable read-only memory (PROM). Blank PROM chips can be bought
inexpensively and coded by anyone with a special tool called a programmer.
PROM chips (Figure 2) have a grid of columns and rows just as ordinary ROMs do.
The difference is that every intersection of a column and row in a PROM chip has
a fuse connecting them. A charge sent through a column will pass through the fuse
in a cell to a grounded row indicating a value of 1. Since all the cells have a fuse,
the initial (blank) state of a PROM chip is all 1s. To change the value of a cell to 0,
you use a programmer to send a specific amount of current to the cell. The higher
voltage breaks the connection between the column and row by burning out the
fuse. This process is known as burning the PROM.
PROMs can only be programmed once. They are more fragile than ROMs. A jolt of
static electricity can easily cause fuses in the PROM to burn out, changing
essential bits from 1 to 0. But blank PROMs are inexpensive and are great for
prototyping the data for a ROM before committing to the costly ROM fabrication
process.
EPROM
Working with ROMs and PROMs can be a wasteful business. Even though they are
inexpensive per chip, the cost can add up over time. Erasable programmable
read-only memory (EPROM) addresses this issue. EPROM chips can be rewritten
many times. Erasing an EPROM requires a special tool that emits a certain
frequency of ultraviolet (UV) light. EPROMs are configured using an EPROM
programmer that provides voltage at specified levels depending on the type of
EPROM used.

80
Once again we have a grid of columns and rows. In an EPROM, the cell at each
intersection has two transistors. The two transistors are separated from each other
by a thin oxide layer. One of the transistors is known as the floating gate and the
other as the control gate. The floating gate's only link to the row (word line) is
through the control gate. As long as this link is in place, the cell has a value of 1. To
change the value to 0 requires a curious process called Fowler-Nordheim
tunneling. Tunneling is used to alter the placement of electrons in the
floating gate. An electrical charge, usually 10 to 13 volts, is applied to the floating
gate. The charge comes from the column (bit line), enters the floating gate and
drains to a ground.
This charge causes the floating-gate transistor to act like an electron gun. The
excited electrons are pushed through and trapped on the other side of the thin
oxide layer, giving it a negative charge. These negatively charged electrons act as a
barrier between the control gate and the floating gate. A device called a cell
sensor monitors the level of the charge passing through the floating gate. If the
flow through the gate is greater than 50 percent of the charge, it has a value of 1.
When the charge passing through drops below the 50-percent threshold, the value
changes to 0. A blank EPROM has all of the gates fully open, giving each cell a value
of 1.
Figure 3
To rewrite an EPROM, you must erase it first. To erase it, you must supply a level of
energy strong enough to break through the negative electrons blocking the floating
gate. In a standard EPROM, this is best accomplished with UV light at a frequency of
253.7. Because this particular frequency will not penetrate most plastics or glasses,
each EPROM chip has a quartz window on top of it. The EPROM must be very close
to the eraser's light source, within an inch or two, to work properly.
An EPROM eraser is not selective, it will erase the entire EPROM. The EPROM must
be removed from the device it is in and placed under the UV light of the EPROM
eraser for several minutes. An EPROM that is left under too long can become overerased. In such a case, the EPROM's floating gates are charged to the point that
they are unable to hold the electrons at all
EEPROMs and Flash Memory
Though EPROMs are a big step up from PROMs in terms of reusability, they still
require dedicated equipment and a labor-intensive process to remove and reinstall
them each time a change is necessary. Also, changes cannot be made incrementally
to an EPROM; the whole chip must be erased. Electrically erasable
programmable read-only memory (EEPROM) chips remove the biggest
drawbacks of EPROMs.
In EEPROMs:

81


The chip does not have to removed to be rewritten.



The entire chip does not have to be completely erased to change a specific
portion of it.



Changing the contents does not require additional dedicated equipment.

Instead of using UV light, you can return the electrons in the cells of an EEPROM to
normal with the localized application of an electric field to each cell. This erases
the targeted cells of the EEPROM, which can then be rewritten. EEPROMs are
changed 1 byte at a time, which makes them versatile but slow. In fact, EEPROM
chips are too slow to use in many products that make quick changes to the data
stored on the chip.
Manufacturers responded to this limitation with Flash memory, a type of EEPROM
that uses in-circuit wiring to erase by applying an electrical field to the entire chip
or to predetermined sections of the chip called blocks. Flash memory works much
faster than traditional EEPROMs because it writes data in chunks, usually 512 bytes
in size, instead of 1 byte at a time. See How Flash Memory Works to learn more
about this type of ROM and its applications.
How Flash Memory Works

We store and transfer all kinds of files on our computers -- digital photographs,
music files, word processing documents, PDFs and countless other forms of media.
But sometimes your computer's hard drive isn't exactly where you want your
information. Whether you want to make backup copies of files that live off of your

82
systems or if you worry about your security, portable storage devices that use a
type of electronic memory called flash memory may be the right solution.
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



Compact Flash (most often found in digital cameras)



Smart Media (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 (see image below).
The two transistors are separated from each other by a thin oxide layer. One of the
transistors is known as a floating gate, and the other one is the control gate. The
floating gate's only link to the row, or word line, is through the control gate. As
long as this link is in place, the cell has a value of 1. To change the value to a 0
requires a curious process called Fowler-Nord heim tunneling.
In this article, we'll find out how Flash memory works and look at some of the forms
it takes and types of devices that use it. Next, we'll talk more about tunneling.
Flash Memory: Tunneling and Erasing
Tunneling is used to alter the placement of electrons in the floating gate. An
electrical charge, usually 10 to 13 volts, is applied to the floating gate. The charge
comes from the column, or bitline, enters the floating gate and drains to a ground.
This charge causes the floating-gate transistor to act like an electron gun. The
excited electrons are pushed through and trapped on other side of the thin oxide
layer, giving it a negative charge. These negatively charged electrons act as a
barrier between the control gate and the floating gate. A special device called a cell
sensor monitors the level of the charge passing through the floating gate. If the
flow through the gate is above the 50 percent threshold, it has a value of 1. When

83
the charge passing through drops below the 50-percent threshold, the value
changes to 0. A blank EEPROM has all of the gates fully open, giving each cell a
value of 1.
The electrons in the cells of a flash-memory chip can be returned to normal ("1") by
the application of an electric field, a higher-voltage charge. Flash memory uses incircuit wiring to apply the electric field either to the entire chip or to
predetermined sections known as blocks. This erases the targeted area of the chip,
which can then be rewritten. Flash memory works much faster than traditional
EEPROMs because instead of erasing one byte at a time, it erases a block or the
entire chip, and then rewrites it.
You may think that your car radio has flash memory, since you're able to program
the presets and the radio remembers them. But it's actually using flash RAM. The
difference is that flash RAM has to have some power to maintain its contents, while
flash memory will maintain its data without any external source of power. Even
though you've turned the power off, the car radio is pulling a tiny amount of current
to preserve the data in the flash RAM. That is why the radio will lose its presets if
your car battery dies or the wires are disconnected.

Smart Media card
Removable Flash Memory Cards
There are a few reasons to use flash memory instead of a hard disk:


It has no moving parts, so it's noiseless.



It allows faster access.



It's smaller in size and lighter.

So why don't we just use flash memory for everything? Because the cost per
megabyte for a hard disk is drastically cheaper, and the capacity is substantially
more.
The solid-state floppy-disk card (SSFDC), better known as Smart Media, was
originally developed by Toshiba. Smart Media cards are available in capacities
ranging from 2 MB to 128 MB. The card itself is quite small, approximately 45 mm
long, 37 mm wide and less than 1 mm thick.

84
As shown below, Smart Media cards are extremely simple. A plane electrode is
connected to the flash-memory chip by bonding wires. The flash-memory chip,
plane electrode and bonding wires are embedded in a resin using a technique
called over-molded thin package (OMTP). This allows everything to be integrated
into a single package without the need for soldering.

Samsung Electronics shows off the world's first 30-nanometer 64-gigabit
Flash memory device.
Flash Memory Standards
Both Smart Media and Compact Flash, as well as PCMCIA Type I and Type II memory
cards, adhere to standards developed by the Personal Computer Memory Card
International Association (PCMCIA). Because of these standards, it is easy to use
Compact Flash and Smart Media products in a variety of devices. You can also buy
adapters that allow you to access these cards through a standard floppy drive, USB
port or PCMCIA card slot (available in some laptop computers). For example, games
for Sony's original PlayStation and the PlayStation 2 are backwards-compatible with
the latest console, PlayStation 3, but there is no slot for the memory cards used by
the older systems. Gamers who want to import their saved game data on the
newest system have to buy an adapter. Sony's Memory Stick is available in a large
array of products offered by Sony, and is now showing up in products from other
manufacturers as well.
Although standards are flourishing, there are many flash-memory products that are
completely proprietary in nature, such as the memory cards in some video game
systems. But it is good to know that as electronic components become increasingly
interchangeable and are able to communicate with each other (by way of
technologies such as Bluetooth), standardized removable memory will allow you to
keep your world close at hand.
In September 2006, Samsung announced the development of PRAM -- Phasechange Random Access Memory. This new type of memory combines the fast

85
processing speed of RAM with the non-volatile features of flash memory, leading
some to nickname it "Perfect RAM." PRAM is supposed to be 30 times faster than
conventional flash memory and have 10 times the lifespan. Samsung plans to make
the first PRAM chips commercially available in 2010, with a capacity of 512 MB
[source: Numonyx]. They'll probably be used in cell phones and other mobile
devices, and may even replace flash memory altogether.
For more information on flash memory, other forms of computer memory and
related topics, check out the links on the next page.

The OMTP module is glued to a base card to create the actual card. Power and data
is carried by the electrode to the Flash-memory chip when the card is inserted into a
device. A notched corner indicates the power requirements of the Smart Media card.
Looking at the card with the electrode facing up, if the notch is on the left side, the
card needs 5 volts. If the notch is on the right side, it requires 3.3 volts.
Smart Media cards erase, write and read memory in small blocks (256- or 512-byte
increments). This approach means that they are capable of fast, reliable
performance while allowing you to specify which data you wish to keep. They are
less rugged than other forms of removable solid-state storage, so you should be
very careful when handling and storing them. Because of newer, smaller cards with
bigger storage capacities, such as xD-Picture Cards and Secure Digital cards,
Toshiba has essentially discontinued the production of Smart Media cards, so they're
now difficult to find.
Compact Flash cards were developed by SanDisk in 1994, and they're different
from Smart Media cards in two important ways:


They're thicker.



They utilize a controller chip.

86
Compact Flash consists of a small circuit board with flash-memory chips and a
dedicated controller chip, all encased in a rugged shell that is thicker than a Smart
Media card. Compact Flash cards are 43 mm wide and 36 mm long, and come in two
thicknesses: Type I cards are 3.3 mm thick, and Type II cards are 5.5 mm thick.

Compact Flash card
Compact Flash cards support dual voltage and will operate at either 3.3 volts or 5
volts.
The increased thickness of the card allows for greater storage capacity than Smart
Media cards. Compact Flash sizes range from 8 MB to as much as 100GB. The
onboard controller can increase performance, particularly in devices that have
slow processors. The case and controller chip add size, weight and complexity to the
Compact Flash card when compared to the Smart Media card.
How Hard Disks Work

Nearly every desktop computer and server in use today contains one or more harddisk drives. Every mainframe and supercomputer is normally connected to hundreds
of them. You can even find VCR-type devices and camcorders that use hard disks

87
instead of tape. These billions of hard disks do one thing well -- they store changing
digital information in a relatively permanent form. They give computers the ability
to remember things when the power goes out.
In this article, we'll take apart a hard disk so that you can see what's inside, and
also discuss how they organize the gigabytes of information they hold in files!
Hard Disk Basics
Hard disks were invented in the 1950s. They started as large disks up to 20 inches
in diameter holding just a few megabytes. They were originally called "fixed disks"
or "Winchesters" (a code name used for a popular IBM product). They later became
known as "hard disks" to distinguish them from "floppy disks." Hard disks have
a hard platter that holds the magnetic medium, as opposed to the flexible plastic
film found in tapes and floppies.
At the simplest level, a hard disk is not that different from a cassette tape. Both
hard disks and cassette tapes use the same magnetic recording techniques
described in How Tape Recorders Work. Hard disks and cassette tapes also share the
major benefits of magnetic storage -- the magnetic medium can be easily erased
and rewritten, and it will "remember" the magnetic flux patterns stored onto the
medium for many years.
In the next section, we'll talk about the main differences between cassette tapes
and hard disks.
Cassette Tape vs. Hard Disk
Let's look at the big differences between cassette tapes and hard disks:
The magnetic recording material on a cassette tape is coated onto a thin plastic
strip. In a hard disk, the magnetic recording material is layered onto a high-precision
aluminum or glass disk. The hard-disk platter is then polished to mirror-type
smoothness.
With a tape, you have to fast-forward or reverse to get to any particular point on the
tape. This can take several minutes with a long tape. On a hard disk, you can move
to any point on the surface of the disk almost instantly.
In a cassette-tape deck, the read/write head touches the tape directly. In a hard
disk, the read/write head "flies" over the disk, never actually touching it.
The tape in a cassette-tape deck moves over the head at about 2 inches (about
5.08 cm) per second. A hard-disk platter can spin underneath its head at speeds up
to 3,000 inches per second (about 170 mph or 272 kph)!

88
The information on a hard disk is stored in extremely small magnetic domains
compared to a cassette tape's. The size of these domains is made possible by the
precision of the platter and the speed of the medium.
Because of these differences, a modern hard disk is able to store an amazing
amount of information in a small space. A hard disk can also access any of its
information in a fraction of a second.
Capacity and Performance
A typical desktop machine will have a hard disk with a capacity of between 10 and
40 gigabytes. Data is stored onto the disk in the form of files. A file is simply a
named collection of bytes. The bytes might be the ASCII codes for the characters of
a text file, or they could be the instructions of a software application for the
computer to execute, or they could be the records of a data base, or they could be
the pixel colors for a GIF image. No matter what it contains, however, a file is simply
a string of bytes. When a program running on the computer requests a file, the hard
disk retrieves its bytes and sends them to the CPU one at a time.
There are two ways to measure the performance of a hard disk:
Data rate - The data rate is the number of bytes per second that the drive can
deliver to the CPU. Rates between 5 and 40 megabytes per second are common.
Seek time - The seek time is the amount of time between when the CPU requests a
file and when the first byte of the file is sent to the CPU. Times between 10 and 20
milliseconds are common.
The other important parameter is the capacity of the drive, which is the number of
bytes it can hold
Electronics Board
The best way to understand how a hard disk works is to take a look inside. (Note
that OPENING A HARD DISK RUINS IT, so this is not something to try at home
unless you have a defunct drive.)
Here is a typical hard-disk drive:
It is a sealed aluminum box with controller electronics attached to one side. The
electronics control the read/write mechanism and the motor that spins the platters.
The electronics also assemble the magnetic domains on the drive into bytes
(reading) and turn bytes into magnetic domains (writing). The electronics are all
contained on a small board that detaches from the rest of the drive

89

Inside: Beneath the Board
Underneath the board are the connections for the motor that spins the platters, as
well as a highly-filtered vent hole that lets internal and external air pressures
equalize:
Removing the cover from the drive reveals an extremely simple but very precise
interior:

Inside: Platters and Heads
In order to increase the amount of information the drive can store, most hard disks
have multiple platters. This drive has three platters and six read/write heads:

The mechanism that moves the arms on a hard disk has to be incredibly fast and
precise. It can be constructed using a high-speed linear motor.

90

Many drives use a "voice coil" approach -- the same technique used to move the
cone of a speaker on your stereo is used to move the arm.

In this picture you can see:
The platters - These typically spin at 3,600 or 7,200 rpm when the drive is
operating. These platters are manufactured to amazing tolerances and are mirrorsmooth (as you can see in this interesting self-portrait of the author... no easy way
to avoid that!).
The arm - This holds the read/write heads and is controlled by the mechanism in
the upper-left corner. The arm is able to move the heads from the hub to the edge
of the drive. The arm and its movement mechanism are extremely light and fast.
The arm on a typical hard-disk drive can move from hub to edge and back up to 50
times per second -- it is an amazing thing to watch!

91

Storing the Data
Data is stored on the surface of a platter in sectors and tracks. Tracks are
concentric circles, and sectors are pie-shaped wedges on a track, like this:
A typical track is shown in yellow; a typical sector is shown in blue. A sector
contains a fixed number of bytes -- for example, 256 or 512. Either at the drive or
the operating system level, sectors are often grouped together into clusters.
The process of low-level formatting a drive establishes the tracks and sectors on
the platter. The starting and ending points of each sector are written onto the
platter. This process prepares the drive to hold blocks of bytes. High-level
formatting then writes the file-storage structures, like the file-allocation table, into
the sectors. This process prepares the drive to hold files.
How FireWire Works

You have probably heard the term FireWire if you have any interest in digital video
-- or maybe you know it as Sony i. Link or as IEEE 1394, the official name for the

92
standard. FireWire is a way to connect different pieces of equipment so they can
easily and quickly share information.
Originally created by Apple and standardized in 1995 as the specification IEEE
1394 High Performance Serial Bus, FireWire is very similar to Universal Serial
Bus (USB). The designers of FireWire had several particular goals in mind when they
created the standard:


Fast transfer of data



Ability to put lots of devices on the bus



Ease of use



Hot-pluggable ability



Provision of power through the cable



Plug-and-play performance



Low cabling cost



Low implementation cost

In this article, you will learn exactly what FireWire is, how it works and why you
might want to use it.

FireWire 400 sockets
What is FireWire?
FireWire is a method of transferring information between digital devices, especially
audio and video equipment. Also known as IEEE 1394, FireWire is fast -- the latest
version achieves speeds up to 800 Mbps. At some time in the future, that number is
expected to jump to an unbelievable 3.2 Gbps when manufacturers overhaul the
current FireWire cables.

93
You can connect up to 63 devices to a FireWire bus. Windows operating systems
(98 and later) and Mac OS (8.6 and later) both support it.
Let's say you have your digital camcorder connected to your home computer. When
your computer powers up, it queries all of the devices connected to the bus and
assigns each one an address, a process called enumeration. FireWire is plug-andplay, so if you connect a new FireWire device to your computer, the operating
system auto-detects it and asks for the driver disc. If you've already installed the
device, the computer activates it and starts talking to it. FireWire devices are hot
pluggable, which means they can be connected and disconnected at any time,
even with the power on.
Now let's take a look at FireWire's specifications.
FireWire Specifications
The original FireWire specification, FireWire 400 (1394a), was faster than USB when
it came out. FireWire 400 is still in use today and features:


Transfer rates of up to 400 Mbps



Maximum distance between devices of 4.5 meters (cable length)

The release of USB 2.0 -- featuring transfer speeds up to 480 Mbps and up to 5
meters between devices -- closed the gap between these competing standards. But
in 2002, FireWire 800 (1394b) started showing up in consumer devices, and USB 2.0
was left in the dust. FireWire 800 is capable of:


Transfer rates up to 800 Mbps



Maximum distance between devices of 100 meters (cable length)

The faster 1394b standard is backward-compatible with 1394a.
In the next section, we'll get deeper into the FireWire vs. USB debate.
FireWire vs. USB
The key difference between FireWire and USB is that FireWire is intended for devices
working with a lot more data -- things like camcorders, DVD players and digital
audio equipment. FireWire and USB share a number of characteristics but differ in
some important ways.
Implementing FireWire costs a little more than USB, which led to the adoption of
USB as the standard for connecting most peripherals that do not require a highspeed bus.

94
Speed aside, the big difference between FireWire and USB 2.0 is that USB 2.0
is host-based, meaning that devices must connect to a computer in order to
communicate. FireWire is peer-to-peer, meaning that two FireWire cameras can
talk to each other without going through a computer.

FireWire Cables and Connectors
FireWire devices can be powered or unpowered. FireWire allows devices to draw
their power from their connection. Two power conductors in the cable can supply
power (8 to 30 volts, 1.5 amps maximum) from the computer to an unpowered
device. Two twisted pair sets carry the data in a FireWire 400 cable using a 6-pin
configuration.

FireWire adapter cable (9-pin configuration on left)
Some smaller FireWire-enabled devices use 4-pin connectors to save space,
omitting the two pins used to supply power.
FireWire 800 cables use a 9-pin configuration. Six of those pins are the same as the
six pins in the 1394a connector (shown above). Two of the added pins provide a
"grounded shield" to protect the other wires from interference, and the third added
pin does nothing at this time [ref].
Because FireWire 800 is backward-compatible with FireWire 400, there are a variety
of adapters available to facilitate the combination of both standards on the same
bus. There are also two types of FireWire 800 ports available: a "bilingual" port

95
accomodates both FireWire standards, while a b-only port accepts only a FireWire
800 connector.

Sending Data via FireWire
FireWire uses 64-bit fixed addressing, based on the IEEE 1212 standard. There are
three parts to each packet of information sent by a device over FireWire:


A 10-bit bus ID that is used to determine which FireWire bus the data came
from



A 6-bit physical ID that identifies which device on the bus sent the data



A 48-bit storage area that is capable of addressing 256 terabytes of
information for each node

The bus ID and physical ID together comprise the 16-bit node ID, which allows for
64,000 nodes on a system. Data can be sent through up to 16 hops (device to
device). Hops occur when devices are daisy-chained together. Look at the example
below. The camcorder is connected to the external hard drive connected to
Computer A. Computer A is connected to Computer B, which in turn is connected to
Computer C. It takes four hops for Computer C to access the camera.
Assuming all of the devices in this setup are equipped with FireWire 800, the
camcorder can be up to 400 meters from Computer C.
Now that we've seen how FireWire works, let's take a closer look at one of its most
popular applications: streaming digital video.
FireWire and Digital Video
FireWire really shines when it comes to digital video applications. Most digital video
cameras or camcorders now have a FireWire plug. When you attach a camcorder to
a computer using FireWire, the connection is amazing.
An important element of FireWire is the support of isochronous devices. In
isochronous mode, data streams between the device and the host in real-time with
guaranteed bandwidth and no error correction. Essentially, this means that a device
like a digital camcorder can request that the host computer allocate enough
bandwidth for the camcorder to send uncompressed video in real-time to the
computer. When the computer-to-camera FireWire connection enters isochronous

96
mode, the camera can send the video in a steady flow to the computer without
anything disrupting the process.
You can easily edit and create custom video projects using fast hard drives, a digital
camcorder and a computer. With the right software, the computer and the camera
communicate, and the computer can download all of the video automatically and
with perfect digital clarity. Since the content is digital from start to finish, there is no
loss of quality as you work on successive generations.
How Firewalls Work

If you have been using the Internet for any length of time, and especially if you work
at a larger company and browse the Web while you are at work, you have probably
heard the term firewall used. For example, you often hear people in companies say
things like, "I can't use that site because they won't let it through the firewall."
If you have a fast Internet connection into your home (either a DSL connection or
a cable modem), you may have found yourself hearing about firewalls for
your home network as well. It turns out that a small home network has many of the
same security issues that a large corporate network does. You can use a firewall to
protect your home network and family from offensive Web sites and potential
hackers.
Basically, a firewall is a barrier to keep destructive forces away from your property.
In fact, that's why its called a firewall. Its job is similar to a physical firewall that
keeps a fire from spreading from one area to the next. As you read through this
article, you will learn more about firewalls, how they work and what kinds of threats
they can protect you from.
What Firewall Software Does

97
A firewall is simply a program or hardware device that filters the information coming
through the Internet connection into your private network or computer system. If an
incoming packet of information is flagged by the filters, it is not allowed through.
If you have read the article, then you know a good bit about how data moves on the
Internet, and you can easily see how a firewall helps protect computers inside a
large company. Let's say that you work at a company with 500 employees. The
company will therefore have hundreds of computers that all have network cards
connecting them together. In addition, the company will have one or more
connections to the Internet through something like T1 or T3 lines. Without a firewall
in place, all of those hundreds of computers are directly accessible to anyone on the
Internet. A person who knows what he or she is doing can probe those computers,
try to make FTP connections to them, try to make telnet connections to them and so
on. If one employee makes a mistake and leaves a security hole, hackers can get to
the machine and exploit the hole.
With a firewall in place, the landscape is much different. A company will place a
firewall at every connection to the Internet (for example, at every T1 line coming
into the company). The firewall can implement security rules. For example, one of
the security rules inside the company might be:
Out of the 500 computers inside this company, only one of them is permitted to
receive public FTP traffic. Allow FTP connections only to that one computer and
prevent them on all others.
A company can set up rules like this for FTP servers, Web servers, Telnet servers and
so on. In addition, the company can control how employees connect to Web sites,
whether files are allowed to leave the company over the network and so on. A
firewall gives a company tremendous control over how people use the network.
Firewalls use one or more of three methods to control traffic flowing in and out of
the network:


Packet filtering - Packets (small chunks of data) are analyzed against a set
of filters. Packets that make it through the filters are sent to the requesting
system and all others are discarded.



Proxy service - Information from the Internet is retrieved by the firewall and
then sent to the requesting system and vice versa.



State full inspection - A newer method that doesn't examine the contents
of each packet but instead compares certain key parts of the packet to a
database of trusted information. Information traveling from inside the firewall
to the outside is monitored for specific defining characteristics, then incoming
information is compared to these characteristics. If the comparison yields a

98
reasonable match, the information is allowed through. Otherwise it is
discarded.

Firewall Configuration
Firewalls are customizable. This means that you can add or remove filters based on
several conditions. Some of these are:
IP addresses - Each machine on the Internet is assigned a unique address called
an IP address. IP addresses are 32-bit numbers, normally expressed as four "octets"
in a "dotted decimal number." A typical IP address looks like this: 216.27.61.137. For
example, if a certain IP address outside the company is reading too many files from
a server, the firewall can block all traffic to or from that IP address.
Domain names - Because it is hard to remember the string of numbers that make
up an IP address, and because IP addresses sometimes need to change, all servers
on the Internet also have human-readable names, called domain names. For
example, it is easier for most of us to remember www.howstuffworks.com than it is
to remember 216.27.61.137. A company might block all access to certain domain
names, or allow access only to specific domain names. Protocols - The protocol is
the pre-defined way that someone who wants to use a service talks with that
service. The "someone" could be a person, but more often it is a computer program
like a Web browser. Protocols are often text, and simply describe how the client and
server will have their conversation. The http in the Web's protocol. Some common
protocols that you can set firewall filters for include:


IP (Internet Protocol) - the main delivery system for information over the
Internet



TCP (Transmission Control Protocol) - used to break apart and rebuild
information that travels over the Internet



HTTP (Hyper Text Transfer Protocol) - used for Web pages



FTP (File Transfer Protocol) - used to download and upload files



UDP (User Datagram Protocol) - used for information that requires no
response, such as streaming audio and video



ICMP (Internet Control Message Protocol) - used by a router to exchange the
information with other routers



SMTP (Simple Mail Transport Protocol) - used to send text-based information
(e-mail)

99


SNMP (Simple Network Management Protocol) - used to collect system
information from a remote computer



Telnet - used to perform commands on a remote computer

A company might set up only one or two machines to handle a specific protocol and
ban that protocol on all other machines.
Ports - Any server machine makes its services available to the Internet using
numbered ports, one for each service that is available on the server (see How Web
Servers Work for details). For example, if a server machine is running a Web (HTTP)
server and an FTP server, the Web server would typically be available on port 80,
and the FTP server would be available on port 21. A company might block port 21
access on all machines but one inside the company.
Specific words and phrases - This can be anything. The firewall will sniff (search
through) each packet of information for an exact match of the text listed in the filter.
For example, you could instruct the firewall to block any packet with the word "Xrated" in it. The key here is that it has to be an exact match. The "X-rated" filter
would not catch "X rated" (no hyphen). But you can include as many words, phrases
and variations of them as you need.
Some operating systems come with a firewall built in. Otherwise, a software firewall
can be installed on the computer in your home that has an Internet connection. This
computer is considered a gateway because it provides the only point of access
between your home network and the Internet.
With a hardware firewall, the firewall unit itself is normally the gateway. A good
example is the Linksys Cable/DSL router. It has a built-in Ethernet card and hub.
Computers in your home network connect to the router, which in turn is connected
to either a cable or DSL modem. You configure the router via a Web-based interface
that you reach through the browser on your computer. You can then set any filters
or additional information.
Hardware firewalls are incredibly secure and not very expensive. Home versions
that include a router, firewall and Ethernet hub for broadband connections can be
found for well under $100.
Why Firewall Security?
There are many creative ways that unscrupulous people use to access or abuse
unprotected computers:


Remote login - When someone is able to connect to your computer and
control it in some form. This can range from being able to view or access your
files to actually running programs on your computer.

100


Application backdoors - Some programs have special features that allow
for remote access. Others contain bugs that provide a backdoor or hidden
access, that provides some level of control of the program.



SMTP session hijacking - SMTP is the most common method of sending email over the Internet. By gaining access to a list of e-mail addresses, a
person can send unsolicited junk e-mail (spam) to thousands of users. This is
done quite often by redirecting the e-mail through the SMTP server of an
unsuspecting host, making the actual sender of the spam difficult to trace.



Operating system bugs - Like applications, some operating systems have
backdoors. Others provide remote access with insufficient security controls or
have bugs that an experienced hacker can take advantage of.



Denial of service - You have probably heard this phrase used in news
reports on the attacks on major Web sites. This type of attack is nearly
impossible to counter. What happens is that the hacker sends a request to
the server to connect to it. When the server responds with an
acknowledgement and tries to establish a session, it cannot find the system
that made the request. By inundating a server with these unanswerable
session requests, a hacker causes the server to slow to a crawl or eventually
crash.



E-mail bombs - An e-mail bomb is usually a personal attack. Someone sends
you the same e-mail hundreds or thousands of times until your e-mail system
cannot accept any more messages.



Macros - To simplify complicated procedures, many applications allow you to
create a script of commands that the application can run. This script is known
as a macro. Hackers have taken advantage of this to create their own macros
that, depending on the application, can destroy your data or crash your
computer.



Viruses - Probably the most well-known threat is computer viruses. A virus is
a small program that can copy itself to other computers. This way it can
spread quickly from one system to the next. Viruses range from harmless
messages to erasing all of your data.



Spam - Typically harmless but always annoying, spam is the electronic
equivalent of junk mail. Spam can be dangerous though. Quite often it
contains links to Web sites. Be careful of clicking on these because you may
accidentally accept a cookie that provides a backdoor to your computer.



Redirect bombs - Hackers can use ICMP to change (redirect) the path
information takes by sending it to a different router. This is one of the ways
that a denial of service attack is set up.

101


Source routing - In most cases, the path a packet travels over the Internet
(or any other network) is determined by the routers along that path. But the
source providing the packet can arbitrarily specify the route that the packet
should travel. Hackers sometimes take advantage of this to make information
appear to come from a trusted source or even from inside the network! Most
firewall products disable source routing by default.

Some of the items in the list above are hard, if not impossible, to filter using a
firewall. While some firewalls offer virus protection, it is worth the investment to
install anti-virus software on each computer. And, even though it is annoying, some
spam is going to get through your firewall as long as you accept e-mail.
The level of security you establish will determine how many of these threats can be
stopped by your firewall. The highest level of security would be to simply block
everything. Obviously that defeats the purpose of having an Internet connection.
But a common rule of thumb is to block everything, then begin to select what types
of traffic you will allow. You can also restrict traffic that travels through the firewall
so that only certain types of information, such as e-mail, can get through. This is a
good rule for businesses that have an experienced network administrator that
understands what the needs are and knows exactly what traffic to allow through.
For most of us, it is probably better to work with the defaults provided by the
firewall developer unless there is a specific reason to change it.
One of the best things about a firewall from a security standpoint is that it stops
anyone on the outside from logging onto a computer in your private network. While
this is a big deal for businesses, most home networks will probably not be
threatened in this manner. Still, putting a firewall in place provides some peace of
mind.
Proxy Servers and DMZ
A function that is often combined with a firewall is a proxy server. The proxy
server is used to access Web pages by the other computers. When another
computer requests a Web page, it is retrieved by the proxy server and then sent to
the requesting computer. The net effect of this action is that the remote computer
hosting the Web page never comes into direct contact with anything on your home
network, other than the proxy server.
Proxy servers can also make your Internet access work more efficiently. If you
access a page on a Web site, it is cached (stored) on the proxy server. This means
that the next time you go back to that page, it normally doesn't have to load again
from the Web site. Instead it loads instantaneously from the proxy server.
There are times that you may want remote users to have access to items on your
network. Some examples are:

102


Web site



Online business



FTP download and upload area

In cases like this, you may want to create a DMZ (Demilitarized Zone). Although this
sounds pretty serious, it really is just an area that is outside the firewall. Think of
DMZ as the front yard of your house. It belongs to you and you may put some things
there, but you would put anything valuable inside the house where it can be
properly secured.
Setting up a DMZ is very easy. If you have multiple computers, you can choose to
simply place one of the computers between the Internet connection and the firewall.
Most of the software firewalls available will allow you to designate a directory on the
gateway computer as a DMZ.

How E-mail Works

E-mail gives us the ability to contact any person in the world in a matter of
seconds. Find out how e-mail works and how e-mail servers deliver
messages.
Every day, the citizens of the Internet send each other billions of e-mail messages. If
you're online a lot, you yourself may send a dozen or more e-mails each day without
even thinking about it. Obviously, e-mail has become an extremely popular
communication tool.

103
Have you ever wondered how e-mail gets from your computer to a friend halfway
around the world? What is a POP3 server, and how does it hold your mail? The
answers may surprise you, because it turns out that e-mail is an incredibly simple
system at its core. In this article, we'll take an in-depth look at e-mail and how it
works.
An E-mail Message
According to Darwin Magazine: Prime Movers, the first e-mail message was sent in
1971 by an engineer named Ray Tomlinson. Prior to this, you could only send
messages to users on a single machine. Tomlinson's breakthrough was the ability to
send messages to other machines on the Internet, using the @ sign to designate the
receiving machine.
An e-mail message has always been nothing more than a simple text message -- a
piece of text sent to a recipient. In the beginning and even today, e-mail messages
tend to be short pieces of text, although the ability to add attachments now makes
many messages quite long. Even with attachments, however, e-mail messages
continue to be text messages -- we'll see why when we get to the section on
attachments.
E-mail Clients
You've probably already received several e-mail messages today. To look at them,
you use some sort of e-mail client. Many people use well-known, stand-alone
clients like Microsoft Outlook, Outlook Express, Eudora or Pegasus. People who
subscribe to free e-mail services like Hotmail or Yahoo use an e-mail client that
appears in a Web page. If you're an AOL customer, you use AOL's e-mail reader. No
matter which type of client you're using, it generally does four things:


Shows you a list of all of the messages in your mailbox by displaying
the message headers. The header shows you who sent the mail, the subject
of the mail and may also show the time and date of the message and the
message size.



Lets you select a message header and read the body of the e-mail message.



Let's you create new messages and send them. You type in the e-mail
address of the recipient and the subject for the message, and then type the
body of the message.



Lets you add attachments to messages you send and save the attachments
from messages you receive.

Sophisticated e-mail clients may have all sorts of bells and whistles, but at the core,
this is all that an e-mail client does.

104

A Simple E-mail Server
Given that you have an e-mail client on your machine, you are ready to send and
receive e-mail. All that you need is an e-mail server for the client to connect to.
Let's imagine what the simplest possible e-mail server would look like in order to get
a basic understanding of the process. Then we will look at the real thing.
If you've read How Web Servers Work, then you know that machines on the Internet
can run software applications that act as servers. There are Web servers, FTP
servers, telnet servers and e-mail servers running on millions of machines on the
Internet right now. These applications run all the time on the server machine and
they listen to specific ports, waiting for people or programs to attach to the port.
The simplest possible e-mail server would work something like this:
1. It would have a list of e-mail accounts, with one account for each person who
can receive e-mail on the server. My account name might be m brain; John
Smith's might be jsmith, and so on.
2. It would have a text file for each account in the list. So, the server would have
a text file in its directory named MBRAIN.TXT, another named JSMITH.TXT,
and so on.
3. If someone wanted to send me a message, the person would compose a text
message ("Marshall, Can we have lunch Monday? John") in an e-mail client,
and indicate that the message should go to m brain. When the person
presses the Send button, the e-mail client would connect to the e-mail server
and pass to the server the name of the recipient (m brain), the name of the
sender (smith) and the body of the message.
4. The server would format those pieces of information and append them to the
bottom of the MBRAIN.TXT file. The entry in the file might look like this:
There are several other pieces of information that the server might save into the
file, like the time and date of receipt and a subject line; but overall, you can see that
this is an extremely simple process.

105

More Complex Servers
As other people sent mail to m brain, the server would simply append those
messages to the bottom of the file in the order that they arrived. The text file would
accumulate a series of five or 10 messages, and eventually I would log in to read
them. When I wanted to look at my e-mail, my e-mail client would connect to the
server machine. In the simplest possible system, it would:
1. Ask the server to send a copy of the MBRAIN.TXT file
2. Ask the server to erase and reset the MBRAIN.TXT file
3. Save the MBRAIN.TXT file on my local machine
4. Parse the file into the separate messages (using the word "From:" as the
separator)
5. Show me all of the message headers in a list
When I double-clicked on a message header, it would find that message in the text
file and show me its body.
As you can see, this is a very simple system. Surprisingly, the real e-mail system
that you use every day isn't much more complicated than this.
The Real E-mail System
For the vast majority of people right now, the real e-mail system consists of two
different servers running on a server machine. One is called the SMTP server,

106
where SMTP stands for Simple Mail Transfer Protocol. The SMTP server handles
outgoing mail. The other is either a POP3 server or an IMAP server, both of which
handle incoming mail. POP stands for Post Office Protocol, and IMAP stands for
Internet Mail Access Protocol. A typical e-mail server looks like this:
The SMTP server listens on well-known port number 25, POP3 listens on port 110
and IMAP uses port 143

The SMTP Server
Whenever you send a piece of e-mail, your e-mail client interacts with the SMTP
server to handle the sending. The SMTP server on your host may have
conversations with other SMTP servers to deliver the e-mail.
Let's assume that I want to send a piece of e-mail. My e-mail ID is brain, and I have
my account on howstuffworks.com. I want to send e-mail to
[email protected]. I am using a stand-alone e-mail client like Outlook Express.
When I set up my account at, I told Outlook Express the name of the mail server -mail.howstuffworks.com. When I compose a message and press the Send button,
here's what happens:
1. Outlook Express connects to the SMTP server at mail.howstuffworks.com
using port 25.
2. Outlook Express has a conversation with the SMTP server, telling the SMTP
server the address of the sender and the address of the recipient, as well as
the body of the message.
3. The SMTP server takes the "to" address ([email protected]) and breaks
it into two parts: the recipient name (jsmith) and the domain name
(mindspring.com). If the "to" address had been another user at
howstuffworks.com, the SMTP server would simply hand the message to the
POP3 server for howstuffworks.com (using a little program called

107
the delivery agent). Since the recipient is at another domain, SMTP needs to
communicate with that domain.
4. The SMTP server has a conversation with a Domain Name Server, or DNS ).
It says, "Can you give me the IP address of the SMTP server for
mindspring.com?" The DNS replies with the one or more IP addresses for the
SMTP server(s) that MindSpring operates.
5. The SMTP server at howstuffworks.com connects with the SMTP server at
MindSpring using port 25. It has the same simple text conversation that my email client had with the SMTP server for, and gives the message to the
MindSpring server. The MindSpring server recognizes that the domain name
for smith is at MindSpring, so it hands the message to MindSpring’s POP3
server, which puts the message in smith’s mailbox.
If, for some reason, the SMTP server at cannot connect with the SMTP server at
MindSpring, then the message goes into a queue. The SMTP server on most
machines uses a program called send mail to do the actual sending, so this queue
is called the send mail queue. Send mail will periodically try to resend the
messages in its queue. For example, it might retry every 15 minutes. After four
hours, it will usually send you a piece of mail that tells you there is some sort of
problem. After five days, most send mail configurations give up and return the mail
to you undelivered.
The SMTP server understands very simple text commands like HELO, MAIL, RCPT
and DATA. The most common commands are:


HELO - introduce yourself



EHLO - introduce yourself and request extended mode



MAIL FROM: - specify the sender



RCPT TO: - specify the recipient



DATA - specify the body of the message (To, From and Subject should be the
first three lines.)



RSET - reset



QUIT - quit the session



HELP - get help on commands



VRFY - verify an address



EXPN - expand an address

108


VERB – verbose

The POP3 and IMAP Servers
In the simplest implementations of POP3, the server really does maintain a
collection of text files -- one for each e-mail account. When a message arrives, the
POP3 server simply appends it to the bottom of the recipient's file.
When you check your e-mail, your e-mail client connects to the POP3 server
using port 110. The POP3 server requires an account name and a password. Once
you've logged in, the POP3 server opens your text file and allows you to access it.
Like the SMTP server, the POP3 server understands a very simple set of text
commands. Here are the most common commands:


USER - enter your user ID



PASS - enter your password



QUIT - quit the POP3 server



LIST - list the messages and their size



RETR - retrieve a message, pass it a message number



DELE - delete a message, pass it a message number



TOP - show the top x lines of a message, pass it a message number and the
number of lines

Your e-mail client connects to the POP3 server and issues a series of commands to
bring copies of your e-mail messages to your local machine. Generally, it will then
delete the messages from the server (unless you've told the e-mail client not to).
You can see that the POP3 server simply acts as an interface between the e-mail
client and the text file containing your messages. And again, you can see that the
POP3 server is extremely simple. You can connect to it through telnet at port 110
and issue the commands yourself if you would like to The IMAP Server
As you can see, the POP3 protocol is very simple. It allows you to have a collection
of messages stored in a text file on the server. Your e-mail client (e.g. Outlook
Express) can connect to your POP3 e-mail server and download the messages from
the POP3 text file onto your PC. That is about all that you can do with POP3.
Many users want to do far more than that with their e-mail, and they want their email to remain on the server. The main reason for keeping your e-mail on the server

109
is to allow users to connect from a variety of machines. With POP3, once you
download your e-mail it's stuck on the machine to which you downloaded it. If you
want to read your e-mail both on your desktop machine and your laptop (depending
on whether you're working in the office or on the road), POP3 makes life difficult.
IMAP (Internet Mail Access Protocol) is a more advanced protocol that solves these
problems. With IMAP, your mail stays on the e-mail server. You can organize your
mail into folders, and all the folders live on the server as well. When you search
your e-mail, the search occurs on the server machine, rather than on your machine.
This approach makes it extremely easy for you to access your e-mail from any
machine, and regardless of which machine you use, you have access to all of your
mail in all of your folders.
We'll look at IMAP problems and attachments in the next section.
IMAP Problems and Attachments
Your e-mail client connects to the IMAP server using port 143. The e-mail client
then issues a set of text commands that allow it to do things like list all the folders
on the server, list all the message headers in a folder, get a specific e-mail message
from the server, delete messages on the server or search through all of the e-mails
on the server.
One problem that can arise with IMAP involves this simple question: "If all of my email is stored on the server, then how can I read my mail if I'm not connected to the
Internet?" To solve this problem, most e-mail clients have some way to cache e-mail
on their local machine. For example, the client will download all the messages and
store their complete contents on the local machine (just like it would if it were
talking to a POP3 server). The messages still exist on the IMAP server, but you now
have copies on your machine. This allows you to read and reply to e-mail even if
you have no connection to the Internet. The next time you establish a connection,
you download all the new messages you received while disconnected and send all
the mail that you wrote while disconnected.
Attachments
Your e-mail client allows you to add attachments to e-mail messages you send, and
also lets you save attachments from messages that you receive. Attachments might
include word processing documents, spreadsheets, sound files, snapshots and
pieces of software. Usually, an attachment is not text (if it were, you would simply
include it in the body of the message). Since e-mail messages can contain only text
information, and attachments aren't text, there's a problem that needs to be solved.
In the early days of e-mail, you solved this problem by hand, using a program
called uuencode. The uuencode program assumes that the file contains binary
information. It extracts 3 bytes from the binary file and converts them to four text

110
characters (that is, it takes 6 bits at a time, adds 32 to the value of the 6 bits and
creates a text character.
to learn more about ASCII characters). What uuencode produces, therefore, is
an encoded version of the original binary file that contains only text characters. In
the early days of e-mail, you would run uuencode yourself and paste the uuencoded
file into your e-mail message.
Considering its tremendous impact on society, having forever changed the way we
communicate, and today’s e-mail system is one of the simplest things ever devised!
There are parts of the system, like the routing rules in send mail, that get
complicated, but the basic system is incredibly straightforward. The next time you
send an e-mail, you'll know exactly how it's getting to its destination.
Free and Paid E-mail Services
Whether it's for work or keeping in touch with family and friends, people rely on the
Internet to send and receive e-mail messages. According to a March 2007 study by
the Pew Internet and American Life Project, 91 percent of U.S. Internet users have
gone online to send or read e-mail. The same source reports that 56 percent of email users send or read e-mail as part of a typical day
An October 2007 study by the market research firm, The Radiate Group, reported
that 183 billion e-mails were sent daily in 2006. With numbers like that, it's no
surprise that there's a large variety of e-mail service providers to choose from.
Choices include providers like Gmail or Yahoo! who provide free e-mail service or
providers who charge a fee like America Online, Apple or NetZero.
Gmail and Yahoo! make money from advertisers who pay them to expose e-mail
account holders to their messages. It's also easy to find reviews of various free email services. Here are few descriptions of free e-mail services:


Gmail -- Gmail is Google's free e-mail service. It offers online storage that's
practically unlimited. It also provides sorting methods that allows users to
quickly organize and sift their inbox efficiently for important messages. As a
free service, Gmail exposes users to contextual advertisements, which are
based on keywords found in the user's e-mail messages. It's versatile in
handling many different attachment types and scans for spam, worms and
virus.



Yahoo! mail -- Perhaps one of the most popular free services, Yahoo! offers
unlimited online storage as well as text messaging and RSS news feeds.
Using more than a dozen filters, Yahoo! files incoming e-mails and
automatically sends junk e-mails to a spam folder and allows you to add emails to that folder. It features easy-to-use drag and drop organization tools.

111


MSN Windows Hotmail -- Another well-used free service, Hotmail is supported
by Microsoft technology and features 5 GB of online storage space. A
versatile desktop design allows users to customize the color and layout of
their mail manager. It also offers users the choice of working a classic,
familiar format and switching to an updated look with added features when
they choose. Microsoft security features coupled with familiar drag-and-drop
organization tools add further comfort-of-use for many e-mail users.

E-mail providers who charge a fee may offer additional services such as increased
storage space. Sample providers include Juno, EarthLink and Webmail. Us.
For example, it's easier to get personalized e-mail addresses -- perhaps
incorporating your actual name, for instance - using a paid service. Paid e-mail
services often allow users to keep their same e-mail address even if they change
their ISP and screen users from advertisers. They often are easier to reach on
support issues and special features such as custom spam filters, additional e-mail
accounts and mobile access.
Most ISP Internet providers can also serve as an e-mail provider for no additional
charge. Other paid e-mail services specialize in small business accounts and can
assist businesses in purchasing and maintaining a domain name.
E-Mail Etiquette
Most people wouldn't think of being rude or obnoxious when they speak to
colleagues, clients or their supervisor. But those rules can fall by the wayside when
we use e-mail.
The opportunities for rudeness when using e-mail are plentiful and not always easy
to recognize. Most people wouldn't use foul language or derogatory terms in
business communication. But what about raising one's voice? Is that possible when
using e-mail?
Here, we'll discuss some business writing rules and tips for practicing e-mail
etiquette.
People are busy, so:


Use the subject line. You might be tempted to bypass this part of the email, but just remember: everyone is in a hurry, including the recipient of
your e-mail. That person will appreciate the clue the subject line provides as
to the message content. It helps them prioritize and organize.



Be brief and concise. No matter how clever and entertaining a writer you
might be, your message recipients will appreciate brevity and clarity. Save
the puns and witty turns of phrase for after birthday cards and toasts. State

112
the message quickly followed by clear requests or instructions for any action
needed by the recipient.


Keep it personal. Routinely copying others on e-mails clogs mailboxes and
can lead to the main recipient wondering why you're doing so. Unless you
have a specific reason for copying someone, keep the conversation between
sender and recipient.



Reply quickly. Don't let e-mails sit around in your queue unanswered. Get
back to the sender, even if it's to say you need more time to respond.

People are sensitive, so:


Don't over-punctuate. Adding multiple punctuation marks, such as????
Or!!!! After a sentence makes it seem as though you are shouting or
frustrated with the recipient. Use normal punctuation rules.



Don't use all capitals. Using all caps MAKES IT SEEM LIKE YOU'RE
SHOUTING. Shouting is rude. Use normal capitalization rules. If you need to
emphasize something, write "I'd like to emphasize…"



Read it, out loud, before you send it. While you may think you're writing
exactly what you mean, it pays to read some e-mails out loud to yourself,
putting yourself in the recipient's shoes, before hitting that "send" button.
Once it's in writing, it's hard to take back. Also, never forget that the recipient
has both a printer and "forward" button. Never write something you wouldn't
want to have circulated throughout the company or even beyond.



Don't write when you're angry. Perhaps one of the most common
etiquette rules to break is firing off an e-mail to someone when you're angry,
either at them or a situation. See "Read it out loud" above. You can't take it
back once you "flame" someone, and it can come back to haunt you.

Not everyone is as hip as you are, so:


Keep the symbols to a minimum. Using "smiles" is a trendy way to
communicate mood and meaning. But do you know the difference between a
sarcastic smile and a mischievous one? And even if you're sure you do, can
you be sure your recipient does? It's easy to see the potential to
unintentionally offend someone using these symbols. Avoid using them.



Minimize abbreviated phrases. Using abbreviations such as IMHO (in my
humble opinion). FWIW (for what it's worth) and ROTFL (rolling on the floor
laughing) can frustrate and confuse the recipient.

E-mail is like as a business letter. Ignoring basic rules can show disrespect for the
recipient. Don't let informality spoil the recipient's opinion of you.

113
How Modems Work

If you are reading this article on your computer at home, it probably arrived
via modem.
In this edition of we’ll show you how a modem brings you Web pages. We'll start
with the original 300-baud modems and progress all the way through to
the ADSL configurations!

The Origin of Modems
The word "modem" is a contraction of the words modulator-demodulator. A
modem is typically used to send digital data over a phone line.
The sending modem modulates the data into a signal that is compatible with the
phone line, and the receiving modem demodulates the signal back into digital
data. Wireless modems convert digital data into radio signals and back.
Modems came into existence in the 1960s as a way to allow terminals to connect to
computers over the phone lines. A typical arrangement is shown below:
In a configuration like this, a dumb terminal at an off-site office or store could "dial
in" to a large, central computer. The 1960s were the age of timeshared computers, so a business would often buy computer time from a time-share
facility and connect to it via a 300-bit-per-second (bps) modem.
A dumb terminal is simply a keyboard and a screen. A very common dumb terminal
at the time was called the DEC VT-100, and it became a standard of the day (now
memorialized in terminal emulators worldwide). The VT-100 could display 25 lines of
80 characters each. When the user typed a character on the terminal, the modem

114
sent the ASCII code for the character to the computer. The computer then sent the
character back to the computer so it would appear on the screen.
When personal computers started appearing in the late 1970s, bulletin board
systems (BBS) became the rage. A person would set up a computer with a modem
or two and some BBS software, and other people would dial in to connect to
the bulletin board. The users would run terminal emulators on their computers to
emulate a dumb terminal.
People got along at 300 bps for quite a while. The reason this speed was tolerable
was because 300 bps represents about 30 characters per second, which is a lot
more characters per second than a person can type or read. Once people started
transferring large programs and images to and from bulletin board systems,
however, 300 bps became intolerable. Modem speeds went through a series of
steps at approximately two-year intervals:


300 bps - 1960s through 1983 or so



1200 bps - Gained popularity in 1984 and 1985



2400 bps



9600 bps - First appeared in late 1990 and early 1991



19.2 kilobits per second (Kbps)



28.8 Kbps



33.6 Kbps



56 Kbps - Became the standard in 1998



ADSL, with theoretical maximum of up to 8 megabits per second (Mbps) Gained popularity in 1999

300-bps Modems
We'll use 300-bps modems as a starting point because they are extremely easy to understand. A 300-bps
modem is a device that uses frequency shift keying (FSK) to transmit digital information over a
telephone line. In frequency shift keying, a different tone (frequency) is used for the different bits When a
terminal's modem dials a computer's modem, the terminal's modem is called the originate modem. It
transmits a 1,070-hertz tone for a 0 and a 1,270-hertz tone for a 1. The computer's modem is called the
answer modem, and it transmits a 2,025-hertz tone for a 0 and a 2,225-hertz tone for a 1. Because the
originate and answer modems transmit different tones, they can use the line simultaneously. This is
known as full-duplex operation. Modems that can transmit in only one direction at a time are known
as half-duplex modems, and they are rare.

115
Let's say that two 300-bps modems are connected, and the user at the terminal types the letter "a." The
ASCII code for this letter is 97 decimal or 01100001 binary A device inside the terminal called a UART
(universal asynchronous receiver/transmitter) converts the byte into its bits and sends them out one at a
time through the terminal's RS-232 port (also known as a serial). The terminal's modem is connected to
the RS-232 port, so it receives the bits one at a time and its job is to send them over the phone line.

Faster Modems
In order to create faster modems, modem designers had to use techniques far more
sophisticated than frequency-shift keying. First they moved to phase-shift
keying(PSK), and then quadrature amplitude modulation (QAM). These
techniques allow an incredible amount of information to be crammed into the 3,000
hertz of bandwidth available on a normal voice-grade phone line. 56K modems,
which actually connect at something like 48 Kbps on anything but absolutely perfect
lines, are about the limit of these techniques (see the links at the end of this article
for more information).
All of these high-speed modems incorporate a concept of gradual degradation,
meaning they can test the phone line and fall back to slower speeds if the line
cannot handle the modem's fastest speed.
The next step in the evolution of the modem was asymmetric digital subscriber
line (ADSL) modems. The word asymmetric is used because these modems send
data faster in one direction than they do in another. An ADSL modem takes
advantage of the fact that any normal home, apartment or office has a dedicated
copper wire running between it and phone company's nearest mux or central
office. This dedicated copper wire can carry far more data than the 3,000-hertz
signal needed for your phone's voice channel. If both the phone company's central
office and your house are equipped with an ADSL modem on your line, then the
section of copper wire between your house and the phone company can act as a
purely digital high-speed transmission channel. The capacity is something like 1
million bits per second (Mbps) between the home and the phone company
(upstream) and 8 Mbps between the phone company and the home (downstream)
under ideal conditions. The same line can transmit both a phone
conversation and the digital data.
The approach an ADSL modem takes is very simple in principle. The phone line's
bandwidth between 24,000 hertz and 1,100,000 hertz is divided into 4,000-hertz
bands, and a virtual modem is assigned to each band. Each of these 249 virtual
modems tests its band and does the best it can with the slice of bandwidth it is
allocated. The aggregate of the 249 virtual modems is the total speed of the pipe.
Point-to-Point Protocol

116
Today, no one uses dumb terminals or terminal emulators to connect to an
individual computer. Instead, we use our modems to connect to an Internet
service provider (ISP), and the ISP connects us into the Internet. The Internet lets
us connect to any machine in the world). Because of the relationship between your
computer, the ISP and the Internet, it is no longer appropriate to send individual
characters. Instead, your modem is routing TCP/IP packets between you and your
ISP.
The standard technique for routing these packets through your modem is called
the Point-to-Point Protocol (PPP). The basic idea is simple -- your computer's
TCP/IP stack forms its TCP/IP datagrams normally, but then the datagram’s are
handed to the modem for transmission. The ISP receives each datagram and routes
it appropriately onto the Internet. The same process occurs to get data from the ISP
to your computer.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close