SPARTAN-117

Distinguished
Oct 19, 2006
225
0
18,680
As the topic implies, what does RAM actually do in a computer? I know its required to make a PC work and I know what RAM goes in what type mobo, but what does RAM actually do?

Thanks in advance for the replies!
 

antoant

Distinguished
Jun 22, 2006
27
0
18,530
RAM stands for Random Access Memory. So as the name implies it is used to store information. To be more specific RAM acts as an intermidiate memory between the hard disk and the CPU. We use RAM because it is much faster than a hard disk and thus we can reduce the bottleneck caused by disk accesses.
 

AdamBomb42

Distinguished
Dec 7, 2006
641
0
18,980
RANDOM ACCESS MEMORY (RAM): This is the working space or buffer for the information that is being manipulated. The more RAM a computer has the faster it will run. The reason for this is that the memory will buffer the information. I like to use the analogy that RAM is like a desk, the bigger the desk the more files you can put on it.
 

atp777

Distinguished
Jul 21, 2006
279
0
18,780
RAM is not an intermediary between the Hard Disk and the CPU. RAM is technically considered MAIN MEMORY, this is the data the the CPU is currently working on. Every computer device in the world has a type or RAM or ROM depending in the situation. In a PC, parts of the OS are always loaded into RAM, programs that you are running are also in RAM. The computer needs the Hard Disk for storage purposes only and it's actually considered a peripheral. The CPU can only access what's in RAM, it never get data directly from the Hard Disk.
 

zjohnr

Distinguished
Aug 19, 2006
577
1
18,980
As the topic implies, what does RAM actually do in a computer?
Hard to know just how to respond this question without knowing more about what you know or don't know.

How much do you know about how a computer works in the first place? (How much do you want to know? Or, rather, how much can you tolerate? :wink:)

Perhaps what would help is a pointer to a good tutorial on the web on how computers work?

Yes? No? Maybe?

-john, the ostensibly clueless redundant legacy dinosaur
 

chuckshissle

Splendid
Feb 2, 2006
4,579
0
22,780
Ram is basically a faster hard drive. Since the hard drive like for example, a SATA 7200rpm is not fast enough to work with the cpu, instead it sends it's information to the RAM which is a lot faster and able to work with the cpu in unison.
 

SPARTAN-117

Distinguished
Oct 19, 2006
225
0
18,680
I read the sticky about RAM FAQ's and understood it all. I do know that RAM stands for Random Access Memory and I have built my own PC. I am just curious as to what RAM does is all. More detail the better :)
 

Hangman021

Distinguished
Jan 30, 2007
2
0
18,510
I read the sticky about RAM FAQ's and understood it all. I do know that RAM stands for Random Access Memory and I have built my own PC. I am just curious as to what RAM does is all. More detail the better :)

Imagine you have a cooler next to your computer chair, you want a beer it's right there and quick to get to, but, there isn't much room in the cooler. This is your beer "cache".

Then there is your fridge in the kitchen, it has more room for your beer, but it takes more time to get, this is your "RAM".

Finally, there is the store, it has vast amounts of beer, all the beer you could ever want, but it's even slower to get, this is your "hard drive"


Once again proving beer is the answer to all of lifes problems.
 

Scooby2

Distinguished
Jun 3, 2006
142
0
18,680
The main difference apart from speed between RAM and Hard disk space is that RAM requires a voltage to retain the info. Thats why you can't power on the pc and have it be instantly sitting in the state you had before you powered it off.

NVRAM (non-volatile RAM) is obviously an exception to the above but is not used for main memory in todays pc's.
 

Inshali

Distinguished
Jan 24, 2007
39
0
18,530
I read the sticky about RAM FAQ's and understood it all. I do know that RAM stands for Random Access Memory and I have built my own PC. I am just curious as to what RAM does is all. More detail the better :)

Imagine you have a cooler next to your computer chair, you want a beer it's right there and quick to get to, but, there isn't much room in the cooler. This is your beer "cache".

Then there is your fridge in the kitchen, it has more room for your beer, but it takes more time to get, this is your "RAM".

Finally, there is the store, it has vast amounts of beer, all the beer you could ever want, but it's even slower to get, this is your "hard drive"


Once again proving beer is the answer to all of lifes problems.

that has to be the best analogy i have ever seen
 

av1on

Distinguished
Jan 26, 2007
12
0
18,510
Typically there are 3 types of memory in a standard computer. Those are the physical storage devices like hard drives for longer storage(coz they dont need power to store information and have by far the most capacity), RAM and the cache inside of your CPU - in that order. Each of these operate faster then the previous one by a factor of lets say 1000.
You can now begin to see the need for an intermediate type of memory between the cache(which has a capacity of about 1-8mb max) and a hard drive that has enormous amount of capacity compared.
So the typical flow of information is Hard drive->RAM->CPU cache.
hope this gives a perspective
cya
 

antoant

Distinguished
Jun 22, 2006
27
0
18,530
I could argue that virtual memory is a mapping of memory space into hard disk space. But then you would argue that when the CPU requires data from virtual memory it just moves them to the RAM and the corresponding data on the RAM are moved to the hard disk. However it is clear that a hard disk is an area on which information is stored. As such it is used as the highest level in the memory abstraction of a personal computer. (Although an even higher level could be Network Area Storage). Just because the OS or the motherboard designers designate the HD as a peripheral that does not remove it from the above stated memory abstraction. In fact you could design a personal computer that does not have any RAM, however such a device would be very slow for today's standards, but it would be a working computer nontheless.
 

zjohnr

Distinguished
Aug 19, 2006
577
1
18,980
I read the sticky about RAM FAQ's and understood it all. I do know that RAM stands for Random Access Memory and I have built my own PC. I am just curious as to what RAM does is all. More detail the better :)
As you may have guessed from the variety in the responses you've already received, the question is so basic that it can be "answered" in lots of different ways. My first instinct is to point you towards the How computers work subtopic in the Computer article on www.wikipedia.org. Probably not what you want though since if it was I'm assuming you would have just gone there directly.

But at this point I don't know enough about what you want to know to whittle it down any further. Sorry.

OK, how about this. Compare using paper and pencil to do a math calculation versus doing it with a computer. The computer memory is like the paper and the computer CPU or processor is like the pencil. The memory is where the data is held during each step of a calculation. The CPU does the actually manipulation or processing of the data. The results of any processing done by the CPU are always (eventually) "written" into the memory.

-john, the ostensibly clueless redundant legacy dinosaur
 

SPARTAN-117

Distinguished
Oct 19, 2006
225
0
18,680
I read the sticky about RAM FAQ's and understood it all. I do know that RAM stands for Random Access Memory and I have built my own PC. I am just curious as to what RAM does is all. More detail the better :)
As you may have guessed from the variety in the responses you've already received, the question is so basic that it can be "answered" in lots of different ways. My first instinct is to point you towards the How computers work subtopic in the Computer article on www.wikipedia.org. Probably not what you want though since if it was I'm assuming you would have just gone there directly.

But at this point I don't know enough about what you want to know to whittle it down any further. Sorry.

OK, how about this. Compare using paper and pencil to do a math calculation versus doing it with a computer. The computer memory is like the paper and the computer CPU or processor is like the pencil. The memory is where the data is held during each step of a calculation. The CPU does the actually manipulation or processing of the data. The results of any processing done by the CPU are always (eventually) "written" into the memory.

-john, the ostensibly clueless redundant legacy dinosaur

What I'm trying to figure out is what RAM's designated function in a computer is. Does it do any computing or does it just act as a buffer between CPU and HDD, storing data for use by CPU or use by HDD?

Sorry if the question was vague. :cry: :oops:
 

gm0n3y

Distinguished
Mar 13, 2006
3,441
0
20,780
It stores the code used by any programs currently running, some application data, operating system processes, recently accessed files, etc.

In some ways it is a buffer between the CPU and HD, but it also is even more important as a place where running programs are stored. The actual program files are on the hard drive, but when you run a program it gets loaded into memory, then as the program executes its state is changed in memory. You could run a computer without RAM (if the OS *edit* and motherboard / bios */edit* could handle it, which is doubtful), but just running a single program would be incredibly slow.

I do remember in school, in one of my hardware classes, we turned off the CPU cache (which is similar to RAM, as mentioned), and I can't remember how long it took to boot into the OS, but it was a long time (I think 1 hour+).
 

gm0n3y

Distinguished
Mar 13, 2006
3,441
0
20,780
Also, it should be mentioned, that there is one more layer below the CPU cache, the CPU registers.

So I guess its CPU registers -> CPU cache -> RAM -> HD

I don't think that Networked Storage applies here since it is different data entirely and the main HD is not a buffer for access to it.

As for virtual memory, that is just an OS extension of RAM, so any running programs and their data that won't fit in RAM, can be written temporarily to the HD, although logically (in this case), they are still in the RAM layer.
 

zjohnr

Distinguished
Aug 19, 2006
577
1
18,980
What I'm trying to figure out is what RAM's designated function in a computer is. Does it do any computing or does it just act as a buffer between CPU and HDD, storing data for use by CPU or use by HDD?
The latter. All the data the computer processor works on must (pretty much) be in the RAM memory before the processor can do anything with it or to it.

If you want to call memory a "buffer between the CPU and the HDD" I suppose that's a valid perspective. I guess what troubles me about looking at it that way is it seems to minimize just how fundamental the RAM in a computer is to its operation. I tend to view the HDD as "just" a place to more permanently store the stuff that's in the computer memory. :wink:

FWIW, remember you can boot a computer to its BIOS without having any hard drives installed. You cannot do this without having any memory installed.

(I expect I'm going to get torn apart a bit on that last remark. Oh, well. Could be possibly interesting).

-john, the ostensibly clueless redundant legacy dinosaur
 

zjohnr

Distinguished
Aug 19, 2006
577
1
18,980
You could run a computer without RAM (if the OS *edit* and motherboard / bios */edit* could handle it, which is doubtful), but just running a single program would be incredibly slow.
I think I see what you were trying to say here and I don't want to go as far as saying you are wrong. I certainly do not know that this cannot be done. But I do doubt it could be done with "off the shelf" components. That is, it strikes me as much more of a theoretical assertion than a practical one.

I don't see how anyone could build a "PC" using current processors that did not include some form of RAM. No?

-john
 

gm0n3y

Distinguished
Mar 13, 2006
3,441
0
20,780
Yes, I did mean that in a theoretical way. It would be bloody difficult (probably not impossible though), to get a modern PC to run without RAM. I was basically trying to show why RAM is necessary for a PC.
 

Mondoman

Splendid
...

I don't see how anyone could build a "PC" using current processors that did not include some form of RAM. No?

-john
Not sure if you consider ROM to be "RAM". There does need to be someplace for the program counter to point at and read in the program, but the program could be contained in ROM (e.g. current BIOSes). You can certainly manipulate data in the CPU registers and read/write using I/O ports, thus avoiding RAM, but you'd need to design a storage device to be on the other side of those I/O ports. Even embedded CPUs typically have at least a few hundred bytes of RAM.
 

zjohnr

Distinguished
Aug 19, 2006
577
1
18,980
Not sure if you consider ROM to be "RAM".
Well, looking at "RAM" as just an acronym for Random Access Memory I'd have to say that, yes, ROM is very much also RAM. Reasonable?

Even embedded CPUs typically have at least a few hundred bytes of RAM.
That's sounds like the line of reasoning I was guessing along. I'd expect any current system implementation to use RAM because that's definitely the path of least resistance at this time. While I don't know processor architecture well enough to site an example, I'd bet that all current PC (at least) processors are designed with an address and data bus that expects to be connected to some form of ROM and/or RAM.

Of course I guess one could posit replacing the (for example) Intel FSB Memory Controller (Northbridge) with some specialized chipset that connected to some non-RAM form of storage and bridged between that and the CPU address/data view of the world. Putting it that way makes it sound more feasible than I thought at first.

Unlikely to ever happen though. Well, at least not this year I think I'm safe in saying. :)

-john, the ostensibly clueless redundant legacy dinosaur