- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Virtual memory and Cache memory
In case of a computer system, memory is one of the most important parts of the system. Computer memory is entirely responsible for storing data, information, instructions, etc. in the system and it also defines the performance of the system. There are several types of computer memories available. But in this article, we only discuss about cache memory and virtual memory, and the important differences between them.
What is Virtual Memory?
Virtual Memory is a technique to increase the main memory capacity. It uses data swap technology and hard disk area is used as virtual memory. As its name implies, the virtual memory is not a physical memory in the computer system rather it is technique that allows the computer to run a large program which cannot be completely stored in the main memory. Therefore, virtual memory is an imaginary space used to assist the main memory.
The concept of virtual memory allows us to execute such programs whose size is larger than the capacity of the main memory. Virtual memory also increases the ability of multiprogramming of the system. Hence, the virtual memory is responsible for increasing the CPU utilization. However, the major disadvantage of the virtual memory is that it places the parts of a program in the hard disk which reduces the performance of the system.
What is Cache Memory?
Cache Memory is the memory area which contains recently used data and it is used by CPU to increase speed. Whenever a program is to be executed, it is copied to cache memory and then CPU executes it. If it is already present, then program is executed.
Practically, the cache memory is implemented on the CPU chip itself. The chief function of the cache memory is to increase the speed of the CPU. Cache memory holds only those parts of data and instruction that the CPU uses most frequently.
Difference between Virtual Memory and Cache Memory
The following table highlights all the important differences between Cache Memory and Virtual Memory −
|Factor||Virtual Memory||Cache Memory|
|Objective||Virtual memory increase main memory capacity.||Cache memory increase CPU access speed.|
|Memory Unit||Virtual memory is a technique and involves hard disk and is slower to access.||Cache memory is a memory unit and is very fast to access.|
|Management||Operating System manages virtual memory.||CPU and related hardware manages cache memory.|
|Size||Size of virtual memory is much larger than cache memory.||Cache memory is small in size.|
|Operation||Virtual memory keeps the programs which are not getting accommodated in main memory.||Cache memory keeps recently used data.|
|Mapping Structure||Mapping structures are required in the virtual memory to map virtual addresses to physical addresses.||There is no need of mapping structures in the cache memory.|
The most significant difference between cache memory and virtual memory is that the cache memory is used to increase the speed of the CPU, whereas the virtual memory is used to increase the capacity of the main memory of the system.
- Related Articles
- Difference between Cache Memory and Virtual Memory
- Difference Between Virtual and Cache Memory in OS
- Difference between Cache Memory and Register
- Difference between Virtual Memory and Job Pool
- What is Cache Memory? (Functions and Types of Cache Memory)
- Difference between Volatile Memory and Non-Volatile Memory
- Difference between Byte Addressable Memory and Word Addressable Memory
- What is the relationship between Address and Memory Space in a Virtual Memory System?
- Difference between Memory and Storage
- Difference Between Register and Memory
- What is Virtual Memory?
- Difference Between RAM and ROM Memory
- Difference Between Primary and Secondary Memory
- Difference between Hard Drive and Memory
- What is Cache Memory in Computer Architecture?