Virtual Memory
Subject: Computer and Technology noun /ˈvɜːr.tʃu.əl ˈmɛm.ər.i/ 1 definition
- operating-systems
- memory-management
- computer-architecture
- system-performance
-
Definition (noun)
Entry #32 · UpdatedVirtual Memory is an operating system and hardware-assisted memory management capability that decouples the logical addresses used by programs from physical locations in RAM and secondary storage. Working through the CPU's Memory Management Unit (MMU) and kernel-managed page tables, it presents each running process with a private, seemingly contiguous address space that can exceed available physical RAM while isolating processes from reading or corrupting one another's data. Rather than functioning as a separate hardware memory tier, it serves as an abstraction layer whose efficiency depends on keeping active working sets in RAM to avoid excessive disk paging, known as thrashing.
Common Forms
Paged Virtual Memory: Divides virtual address spaces into fixed-size pages mapped to physical RAM frames via page tables and cached in a Translation Lookaside Buffer (TLB), eliminating external fragmentation.
Segmented Virtual Memory: Organizes a process's memory into variable-length logical segments—such as code, stack, and heap—enforcing distinct base bounds and read, write, or execute permissions per segment.
Hybrid Paged-Segmented Memory: Layers fixed-size paging underneath logical segments so programs retain structured memory isolation while the operating system allocates physical frames uniformly.
Demand-Paged Virtual Memory: Defers loading code or data pages from disk until a program accesses an unmapped virtual address, triggering a page fault so the kernel fetches required pages or writes idle pages to swap space.
Example
When a developer edits 4K video alongside dozens of browser tabs on a 16 GB laptop, the Linux kernel maps each process's 64-bit virtual address space across available RAM frames and offloads idle browser pages to an NVMe swap file. Switching back to a background tab triggers a page fault, prompting the kernel to transparently reload the required pages into RAM without either application tracking physical memory addresses.