Cache memory increases the accessing speed of CPU. It is not a technique but a memory unit i.e a storage device. In cache memory, recently used data is copied. Whenever the program is ready to be executed, it is fetched from main memory and then copied to the cache memory. But, if its copy is already present in the cache memory then the program is directly executed.
Virtual Memory increases the capacity of main memory. Virtual memory is not a storage unit, its a technique. In virtual memory, even such programs which have a larger size than the main memory are allowed to be executed.
Difference between Virtual memory and Cache memory:
|S.NO||Virtual Memory||Cache Memory|
|1.||Virtual memory increases the capacity of main memory.||While cache memory increase the accessing speed of CPU.|
|2.||Virtual memory is not a memory unit, its a technique.||Cache memory is exactly a memory unit.|
|3.||The size of virtual memory is greater than the cache memory.||While the size of cache memory is less than the virtual memory.|
|4.||Operating System manages the Virtual memory.||On the other hand hardware manages the cache memory.|
|5.||In virtual memory, The program with size larger than the main memory are executed.||While in cache memory, recently used data is copied into.|
|6.||In virtual memory, mapping frameworks is needed for mapping virtual address to physical address.||While in cache memory, no such mapping frameworks is needed.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Locality of Reference and Cache Operation in Cache Memory
- Difference between Cache Memory and Register
- Difference between Virtual function and Pure virtual function in C++
- Differences between Associative and Cache Memory
- Cache Memory in Computer Organization
- Cache Memory Design
- Concept of Cache Memory Design
- Cache Hits in Memory Organization
- What's difference between CPU Cache and TLB?
- Difference between Cache and Cookies
- Difference Between APT, APT-GET, APT-CACHE and APT-CONFIG
- Difference between RAM and Cache
- Difference between Buffer and Cache
- Difference between Volatile Memory and Non-Volatile Memory
- Difference between Byte Addressable Memory and Word Addressable Memory
- Difference between Random Access Memory (RAM) and Content Addressable Memory (CAM)
- Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)
- Virtual Memory in Operating System
- Virtual Memory | Questions
- Difference Between Virtual Private Network (VPN) and Proxy
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.