Difference Between Virtual and Cache memory
In the world of computers, memory sets the limit upon which we base if we can run that program or not. If you were unlucky enough to have experienced DOS, then you know the bane of the 640k memory limit. 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) and takes out a book and brings it back to his chair. He reads it then he returns it to the bookshelf before continuing with his report. If you were the student it would really be time consuming if you have to stand up and get a book every time you need a piece of data. Practically a student would get a few books from the bookshelf and place it on the table. So that if he needs information that is in the book that he recently used, it is just within arms reach and he doesn’t have to stand and walk to get it.
In this metaphor the table is our cache memory. Whenever the processor uses data it puts the most recent data it used in cache memory for quick access in case it is needed again. Cache memory is very limited though, just like a table having limited space, so data that was not accessed the longest gets returned to memory in order to free up the cache for more recent data.
Learn more about Cache and Virtual memory.
- Difference Between Sony Cybershot S Series and W Series - December 22, 2012
- Difference Between Samsung Galaxy S3 and iPhone 5 - December 21, 2012
- Difference Between Samsung Galaxy S2 (Galaxy S II) and Galaxy S 4G - December 20, 2012
Search DifferenceBetween.net :
Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.
Fabulous explanation. I love the analogy of the student doing a report. Ben, thanks so much for your contributions to Difference Between.
dts is gud to kno it.