Memory vs. Disk Space (Wiki)

The content of the Security Analogies wiki is now available here, under the GNU Free Documentation License 1.2.

Thanks to Jacix for the content of this page.

Memory and Disk Space are not the same thing. Most computers have far more disk space than memory.

Information in memory is information your computer is accessing right now. Information on the disk is information your computer can access when necessary.

The Food Analogy

This can be compared to making a meal. The food that is on the counter or the table is food that is "in memory." The food that is in your refrigerator, freezer, and pantry is "stored on the disk."

You might make a meal with what is on the counter, but then realize you need something else (not on the counter) to complete the meal. So you go to the refrigerator, take out the ingredient, and put it on the counter. That is similar to a program needing some more information that is not in memory. So the computer goes to the hard disk, retrieves the information, and puts it in memory.

After you eat, you may have leftovers you don't need. At that point, you put them away in the refrigerator until a future time when you want them. That is like saving a file from memory to the hard disk and closing the file. It is no longer active (or on the counter) but it is available (in the refrigerator) when you wish to retrieve it.

The Office Analogy

This can also be compared to a table top and file cabinet. Ideally the table top (memory) holds all the documents you are currently working on and reading. You save them to the file cabinet (hard disk) when you are done.

If you don't have enough room on your table top you are constantly putting documents in the filing cabinet to free table top space. This makes things slower as it takes more time to file and retrieve things from the cabinet than to just look at them on the table top.

The Human Analogy

A computer's memory is analogous to a human's brain. It's very fast so information comes up right away, but it is limited in its capacity. Humans invented writing and books to record more information than could be held in their heads and to share with one another. Along the same lines computers have disk space. It's much slower to access and requires more work to do so, but it can hold vastly more information and it's easier to pass on to others. You hand a book to another person while a computers can use a CD, DVD, thumb drive, etc to exchange information.

An extension of this analogy would be immediate but slow communication: your speech and a computer's network. Your memory is much faster than your mouth and a computer's memory is faster than a network but both are useful for sharing smaller amounts of information than either books or computer storage.

The Tools Analogy

A computer's memory is like a toolbox containing a small number of tools and raw material. A computer's hard drive is like a shop full of tools and raw material.

When you go to a job site, you only take the tools that you will need. You select which tools from the shop you'll need to accomplish the job and place them in your toolbox. The toolbox travels with you to the job and provides you quick and easy access to the tools you need.

WebSanity Top Secret