Virtual memory is the partition of logical memory from physical memory. This
partition supports large virtual memory for programmers when only limited
physical memory is available.
Virtual memory can give programmers the deception that they have a very
high memory although the computer has a small main memory. It creates
the function of programming easier because the programmer no longer
requires to worry about the multiple physical memory available.
Virtual memory works similarly, but at one level up in the memory hierarchy.
A memory management unit (MMU) transfers data between physical
memory and some gradual storage device, generally a disk. This storage area
can be defined as a swap disk or swap file, based on its execution. Retrieving
data from physical memory is much faster than accessing data from the swap
disk.
There are two primary methods for implementing virtual memory are as
follows −