Wednesday, December 29, 2010

Difference Between Virtual and Cache memory

Nowadays memory seems to be almost infinite and nobody actually gets the “not enough memory” messages of yester-year. How did they accomplish that?
The answer to that is a very smart memory management procedure. By placing some parts that should be in memory inside your hard-disk they can extend the memory capacity of a computer way beyond what is installed; this is called virtual memory. So let’s say that your computer only has 1GB of memory and you launch a few programs whose total memory consumption is at around 1.5GB. Without virtual memory, you are not allowed to do that. But with virtual memory, the operating system assigns a portion of the hard-disk as a part of memory and keeps the data there. So in the above example let’s say that the virtual memory is also 1GB. 1GB actual memory + 1GB virtual memory = 2GB system memory. That way even though your memory is limited you can still use memory extensive applications.
There is a disadvantage to virtual memory though. Reading data from a hard disk is substantially slower than reading from memory. So the more information that is stored in your hard-disk the slower your system becomes making it seem sluggish.

Cache memory on the other hand doesn’t extend the amount of memory you have, it merely lessens the amount of time needed to access data. So that you can understand the concept easily, let’s say that the processor is a student doing a report. Whenever he needs data he goes to the bookshelf (the bookshelf being the memory, and the books are the data) ,that is called Cache memory.

No comments:

Post a Comment