VIRTUAL MEMORY
What is virtual memory?
Virtual memory is a memory management technique where secondary memory can be
used as if it were a part of the main memory. Virtual memory is a common technique
used in a computer's operating system (OS).
-compensate for physical memory shortages, temporarily transferring data from
random access memory (RAM) to disk storage..
-Virtual memory frees up RAM by swapping data that has not been used recently over
to a storage device, such as a hard drive or solid-state drive (SSD).
Virtual memory is important for improving system performance, multitasking and
using large programs. However, users should not overly rely on virtual memory, since
it is considerably slower than RAM.
While copying virtual memory into physical memory, the OS divides memory with a
fixed number of addresses into either pagefiles or swap files.
What are the benefits of using virtual memory?
The advantages to using virtual memory include:
It can handle twice as many addresses as main memory.
It enables more applications to be used at once.
It frees applications from managing shared memory and saves users from
having to add memory modules when RAM space runs out.
It has increased speed when only a segment of a program is needed for
execution.
It has increased security because of memory isolation.
It enables multiple larger applications to run simultaneously.
Allocating memory is relatively inexpensive.
It does not need external fragmentation.
CPU use is effective for managing logical partition workloads.
Data can be moved automatically.
Pages in the original process can be shared during a fork system call operation
that creates a copy of itself.