Let's start with RAM, which is an acronym for Random Access Memory.
Today's IBM-compatibles usually have a minimum of 1MB (that's 1 megabyte,
or the electronic equivalent of 1,048,576 characters), of which the first
640KB (Kilobytes) is available for your system's input/output and internal
operating instructions, your programs and the data they need or produce.
The next 384KB is reserved for a sort of mental scratchpad space for your
system, so it has room to keep track of things like what's supposed to
be on your display and other such things that you don't really want to
know about right now. (Trust me! You don't!) More powerful systems have
additional memory space as well (extended or expanded memory), but we won't
get into that either.
That didn't help much, did it? Let's find some analogies. Look inside
your mind (most people have one), and think about the stuff you carry around
with you in there. You've got your I/O (Input/Output) systems, which let
you make sense of what you see and hear, and tell somebody else about it.
You've got an operating system, which lets you walk around without falling
down -- and without requiring that you think very much about it, even when
chewing gum at the same time. You've got your program instructions, which
you went to school for years and years to learn, so that you know how to
solve the problems that come up from day to day without having to go dig
up a text-book. You've also got in your mind all that information that
you've picked up along the way - data like the number of ounces in a pound,
and your maiden aunt's birthdate (assuming she has one - rumour has it
that some maiden aunts are hatched). Or more important stuff, like the
approximate amount of your next paycheque, and how much of that is going
to go to the landlord for rent.
Maybe you can see some parallels between the last two paragraphs. The
first was a summary of what's in a computer's random access memory; the
second was a description of some of the departments in your mind. RAM is,
in a sense, your computer's "mind", or at least the place where it thinks
about what it's doing, and whether or not it's going to do it for you.
If you really want to know, it's contained in a bunch of multi-legged silicon
chips somewhere in your machine. Your computer can look at the data stored
on those chips VERY quickly - access times are usually rated at somewhere
under a tenth of a microsecond. Yes, you heard me right - less than a ten-millionth
of a second. And like the contents of your mind, most RAM is "volatile"
- pull the plug on it, and it's gone without a trace.
Now let's look at your hard drive. Really, it's just a floppy drive
that has awesome capacity, and uses disks you can't see or remove (but
trust me, they're there!). It's where you keep the programs and data files
you're NOT using at the moment. A hard drive holds far more than RAM -
80MB isn't a big hard drive any more, and the biggest drives for desktop
computers now run up to more than 15 times that capacity. The usual desktop
computer today has a hard drive storage capacity that is 20 to 50 times
its memory capacity. That's why the term "mass storage" is sometimes used
for hard drives, although that term generally refers to any device that
stores significantly more program/data material than can be read into RAM
at any one time - just as your filing cabinet contains far more than most
people care to remember at any one time. The information on your hard drive
is also "non-volatile" - it doesn't disappear when you switch off your
computer any more than do the contents of your filing cabinet when you
turn out the lights.
And like digging for information in your filing cabinet, it takes the
computer far longer to look at what's on your hard drive than what's in
memory. Average access times for the best hard drives today are rated around
a hundreth of a second - a figure which is about 10,000 times slower than
RAM access time. Also, it can take several seconds or more to read a whole
file, particularly if it's large and/or scattered all over the surface
of the hard drive.
There's more. You've got to read the stuff in your filing cabinet before
you can use it. You don't process the information in that cabinet without
getting it into your mind first - and it's in your mind that you do your
work. If it results in changes to the some of the contents of your filing
cabinet, first you have to put the contents of your mind on paper. Then
you put the paper in the cabinet (after you've run out of room on your
desk and the floor of your office).
Your computer works the same way. Before it can start doing work for
you, it must read an appropriate program (and maybe some data) on your
hard drive, and copy that into memory (RAM). Let's assume that you wanted
to make some changes to an existing spreadsheet. After loading Lotus 1-2-3
(or whatever), you must read the spreadsheet into memory. Then, any changes
your program makes are made to the copy in RAM, not to the file on your
hard drive. It's as if you photocopied a letter in the file cabinet that
you wanted to edit, and made your changes and your additions to the photocopy.
All those changes and additions are only in your computer's mind (and yours,
presumably) until you "save" your work. Then, most programs will simply
write the changes over the original file on your hard drive; some will
ask you if you want to save the unamended original as well as a backup.
To use the filing cabinet analogy again: many programs will electronically
throw out the original document, and put the revised one in its place under
the same name. Some will give you the option of putting the revised document
into storage along with the original under another name. But one thing
to remember is that none of this happens until you "save" your work; until
you do, what's on your hard drive is what was there when you started -
all the new stuff is in RAM alone, and will go straight to the Great Bit-Bucket
in the Sky if your computer loses power or crashes before you save your
work. (Moral? Save your work to your disk drive often - and particularly
before you print or switch tasks.)
Perhaps the best way to keep it all straight is this: think of RAM as
"memory", because that's exactly what it is. (And don't forget how easily
it can be forgotten until it's written down - in the hard drive.) Think
of your hard drive as a humongous floppy drive, because that's what it
does. It isn't memory, it's a filing cabinet. Think of your hard drive
as a storage facility that supplies programs and data to RAM on demand
- and remember how much more room it has than your computer's memory. Think
of the two that way, and you won't be likely to confuse them again - and
you won't embarrass yourself in front of the office "rocket scientist"
either!
Rob Mayhew
copyright 1992
A version of this article was published in the November, 1992 issue
of The Computer Paper (B.C. Lower Mainland edition).
Vancouver, B.C.