RAM • Memory


RAM, also called "Memory"Do not confuse the terms:
• "storage" (data in HDD/DVD/etc.)
• "memory" (data in RAM)
• "cache" (data in the CPU)
, is a temporary place to keep data.

RAM is fairly simple: it does not change the data or process it. Instead, it simply keeps data for short times.

RAM is volatile"volatile" memory is what causes you to lose your essay because your computer crashed. Your hard disk drive is non-volatile, so if you saved to the hard disk, you're usually OK., which means that it loses all its data when the power is turned off.

Why Use RAM?

To help understand RAM, it is best to know how data moves through a computer.

1. Data starts on the HDD. It moves to the RAM over the SATA "bus" (a bus is a data path in a computer).
2. From the RAM, the data moves to the CPU over the FSB (Front Side Bus).
3. Once the CPU is finished, it sends the data back to the RAM.
4. When you save a document, it goes back to the HDD.

The RAM and CPU are volatile, so when you turn on your computer, they are blank--they have no data. All the data is on the HDD (Hard Disk Drive). So the first thing your computer does is to ask the HDD for the Operating System (e.g., Windows, Mac OS, or Linux). The HDD sends the data over.

There is a problem, however: the CPU is too small to keep all of the data. The only data-storing area on the CPU is the cacheRemember the CPU cache from the last section?, and there is usually only 2 ~ 8 MB of cache on a CPU. 8 MB is not nearly enough to keep even a small part of the OS, not to mention all your programs.

Another big problem: the HDD is very slow! For example, when you turn on your computer, it takes one or two minutes to start up; that's because you are waiting for all of the data to travel from the slow HDD to the fast CPU.

Therefore, we use RAM. RAM is pretty fast, like the CPU, but it can hold a lot more data. The RAM keeps the data sent from the HDD ready for the CPU to use quickly.


The Process: Cooking Your Data

So, here is the process: when you turn on your computer, the data is sent (slowly) from the (1) HDD to the (2) RAM. Then the RAM sends to the CPU only the data necessary to do the immediate work. When the data gets to the CPU, it stays in the (3) cache until the data is needed in the (4) core, where the calculations are done.

Are you still confused? OK, let's look at it a different way. Let's say that you want to make cookies, but you have no ingedients in your kitchen. So you go to the (1) supermarket, where you buy sugar, eggs, flour, and all the other ingredients. You take them home and you put them into (2) your cabinets and refrigerator. When you start cooking, you take out only what you need immediately, and you put it on the (3) counter, until you use it in the (4) mixing bowl.

That makes sense, right? Well, it's the same process for the computer:

Now, try to understand why RAM is important: imagine trying to cook, but you have no cabinets and no refrigerator--no places to put your ingredients! You would have to go to the supermarket every time you need something new! That would take a long time.

The same thing is true for your computer: the HDD is too slow, but the CPU is too small: RAM is needed to keep data temporarily.


Traffic Jam

Here's a question: have you ever been using a computer, and when you open up a new program, it suddenly becomes very, very slow? Why does that happen?

The answer is probably that you have used up all your RAM, and there is no more space. Here is an overly-simplified example showing how it might happen:

Your computer is off, and RAM is empty.
You start up your computer; the OS is loaded into RAM.
You open MS Word, but you still have room, so you are still using the very fast RAM.
You open a browser. You have now used all the RAM, but things are still fairly fast.
You open a game. There is no more RAM left. Now your computer must access the HDD, which makes things very slow.

Hopefully you now understand why RAM is important. Of course, the real process is much more complex--operating systems have many tricks where they play with RAM to open up space and try to make things work. But the fact remains that when your RAM is filled up, your computer slows down because it much do more work and it must access the hard drive much more.

Here is an important tip: because it is so easy to remove and add RAM, computer sellers usually give you only a small amount of RAM so the computer looks cheaper. It's also a trick: after a few years, when you add and upgrade new software (which requires more RAM), your computer slows down. You think it is because you need a new computer, so you go out and buy a new one. But in fact, you probably just needed new RAM! [Note: there are other reasons a computer slows down, but this is a common reason.]

My advice: when you buy a new computer, think seriously about adding more RAM right away. Ask the seller if they can put it in for you. Most sellers will have upgrades available. Today, 4GB of RAM is a good amount. If you can get more for a reasonable price, that's great.