Difference Between Virtual and Physical RAM
Virtual RAM |
Physical RAM |
---|---|
Virtual RAM is the portion of the hard drive or SSD that is used as an extension of physical RAM when the physical memory is insufficient to hold all the currently executing programs and data. |
Physical RAM is the actual hardware component inside a computer that stores data and instructions that the CPU needs to access quickly. |
Located on the hard drive or SSD. |
Located on the computer’s motherboard. |
Its speed is slower compared to physical RAM due to the slower access times of hard drives or SSDs. |
Speed is faster compared to virtual RAM, offering much lower latency and higher data transfer rates. |
It uses paging techniques. |
It uses swapping techniques. |
Virtual RAM have not direct access to the CPU. |
Physical RAM have direct access to the CPU. |
What Is a Swap File and How Does It Work?
A swap file is a file on your computer’s hard drive that works as virtual memory. It is an extension of the computer’s physical memory random-access memory (RAM) that serves as a temporary storage area for data that cannot fit in RAM. When your system’s memory becomes low, the operating system shifts less important data from RAM to the swap file, freeing up RAM for more important data.