📜  虚拟内存和缓存内存之间的区别

📅  最后修改于: 2021-06-28 17:11:48             🧑  作者: Mango

高速缓存存储器:
高速缓存可以提高CPU的访问速度。这不是一种技术,而是一种存储单元,即存储设备。在高速缓存中,将复制最近使用的数据。每当程序准备好执行时,都会从主内存中提取该程序,然后将其复制到高速缓存中。但是,如果其副本已经存在于高速缓存中,则将直接执行该程序。

虚拟内存:
虚拟内存增加了主内存的容量。虚拟内存不是存储单元,而是一种技术。在虚拟存储器中,甚至允许执行具有比主存储器更大的大小的程序。

虚拟内存和缓存内存之间的区别:

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.