RAM

From CompSciWiki
Jump to: navigation, search

COMP1260 > RAM



Introduction

What is RAM? How does a computer use RAM? Why do we use RAM? Answers to these questions and further useful information await on this page!

 

...by students

A decade ago, RAM was expensive. So expensive that it was actually RENTED instead of bought! Things have changed dramatically since then, to the point where RAM is now one of the cheapest ways to upgrade the performance of a PC.

What is RAM?

RAM stands for Random Access Memory. This is how it should be pronounced in your head! Reading about RAM (pronounce it "random access memory"!) becomes much easier when you are constantly reminded that it is memory that is being discussed.


RAM is what the computer uses to store everything it is working with.


RAM has two primary features:

  • The processor can do memory reads from RAM and memory writes to RAM much faster than the hard drive.


What is a memory read? Getting something from memory. When you load up, for example, a word document, that is a memory read. The computer is constantly doing memory reads while you are using a computer, by loading instructions behind the scenes.


What is a memory write? Storing anything in computer memory is a memory write. Anything from typing a word down to saving the word document is a memory write(Note that it can write to either RAM or the hard drive, depending on the circumstances).


  • RAM is volatile: it is wiped when the machine is turned off.


How does the computer use RAM?

Having covered the basics, we move on to cover how the computer uses RAM using a simple word document as an example:


  • When you open up the document and start typing words, those words are stored in RAM, but not on the hard drive. This is why when you shut down the computer without saving, the document is lost, because RAM is volatile.


  • When you do save, the current version of that document is written to the hard drive. This means to can shut down the computer and load the document back from the hard drive at a later time.


  • When you do load a document, what you wrote is put back in RAM from the hard drive (but not removed from the hard drive.


  • Remember that the computer will only update the hard drive with a current version of the document when you tell it too with a save. Otherwise it will simply sit in RAM until the word processor is closed or the computer is turned off, in which case it will be wiped from the RAM(RAM is volatile).


To observe this in action in Windows Vista or XP, you can open up Microsoft Word™, and then press the ctrl + alt + delete keys to open up the task manager. Under the Processes tab, look for the WINWORD.EXE process. The Mem Usage Column that corresponds to that process shows how much RAM your word document is using. Adding more words will increase the RAM it uses. Note that decreasing the words will not decrease the RAM usage, as Microsoft Word™ keeps previous document states around for it’s undo function.


ViewingRAMuse.jpg


Why do we use RAM?

Having covered how RAM is used, we move on to cover why RAM is used:


Why do we need faster memory anyways?

Computer processors nowadays are very fast. They can perform a task very quickly. However, they need things from memory to perform tasks of value. Hence, they need to be able to read and write to memory very quickly. The current performance bottleneck keeping processors from going even faster is getting things from memory for the processor to work with[1]. Even if we had a powerhouse supercomputer processor, it wouldn't be much of a performance increase because it has to wait for memory to give it things to do.


Why not use only a hard drive?

Today’s computers have very fast processors capable of doing thousands of operations in the blink of an eye. However, the processor requires memory to accomplish tasks of value, such as playing a game or writing a word document. If the processor requires something from memory, such as a number for an addition, and the memory is slow at getting it to the processor, the computer is slowed down. This is why we have RAM: it offers fast memory reads and fast memory writes.


Why not use only RAM?

We need a place to store things permanently! RAM disappears when we shut off the computer. The hard drive offers a large amount of storage that doesn’t disappear on shutdown. Another important factor is cost. A hard drive will store hundreds of times more information than RAM for the same price.

The combination of RAM and hard drive works best, using RAM for its speed and the hard drive for permanent storage.


RAM when buying a computer

RAM is one of the primary components of a personal computer, and is therefore a very important feature to consider when purchasing a PC. It is also one of the cheapest methods to increase the performance of a PC.


When purchasing a PC, you may see a line that looks something like this in it's description:

RAM: 4.0GB, DDR3-1066 SDRAM, 4 DIMMS


What does this mean? Let’s divide it into easier to understand parts:


4.0GB: This number represents how much RAM their is. In this case, there are 4 gigabytes of RAM. With RAM, having more is better. A machine with 2.0 GB of RAM will perform worse than a machine with 4.0 GB of RAM, assuming the other hardware is identical.


DDR3-1066: This is the quality of the 4.0 Gigabytes of RAM. The actual meaning behind this part is ever changing, and often requires prior knowledge or research to determine if it is of good quality. Typing this into a search engine will usually give you plenty of information.


4 DIMMS: DIMM stands for Dual In-line Memory Module. A DIMM is a “stick” of RAM. When looking at the line of information, this shows how the 4 gigabytes of RAM are divided. With 4 DIMMS, and 4 gigagytes of RAM, this means that the computer has 4 sticks of RAM with 1 gigabyte of RAM on each.


Note: If the line has less information than this, or there is no information on the RAM, it is a very good idea to do a little more research to make an informed decision. Many retailers will omit the full information to hide the fact that they are giving you low quality hardware.

Summary

In closing, remember these main things:

  • RAM is the computers workbench.
  • RAM holds what the computer is working with currently.
  • RAM is wiped when the computer is shut off.
  • RAM is used for it's speed.
  • RAM is a good, cheap method to increase computer performance.<refences/>

Further reading

  • If computer hardware interests you, the university offers several courses centered around it. Comp 2280 and Comp 3370 both deal pretty exclusively with hardware.
  • Tom's Hardware is a website devoted to selling, and more importantly, reviewing hardware components. You can see everything the site has to offer at http://tomshardware.com/.


References

  1. Manegold, S., Boncz, P., and Kersten, M. 2000. Optimizing database architecture for the new bottleneck: memory access. The VLDB Journal 9, 3 (Dec. 2000), 231-246. DOI= http://dx.doi.org/10.1007/s007780000031 .

Previous Page: CPUs

Next Page: Supercomputer