Definition
Virtual Memory
Virtual memory provides a process with an idealised abstraction of storage, creating the illusion of a large, contiguous address space decoupled from physical RAM. Virtual address space can exceed physical memory size.
Address Space
Process View
Each process sees its own virtual address space. The addresses are contiguous in appearance, even if the underlying physical frames are scattered.
Page Table
Definition
Link to originalPage Table
A page table is a data structure used in paging to store mappings between a process’s logical addresses and physical addresses in RAM.
Each entry (PTE) typically contains:
- Frame Number: Physical location of the page
- Present Bit: Indicates if page is in RAM (see Virtual Memory)
- Modified Bit (Dirty Bit): Indicates if page has been written to
- Protection Bits: Read, write, or execute permissions
Page Fault
Definition
Link to originalPage Fault
Policies
Demand Paging
Definition
Link to originalDemand Paging
Demand paging is a memory management strategy in which a page is loaded from slower storage into main memory only when it is first accessed.
A page that is not yet in main memory causes a page fault.
Benefits
Concurrency
More processes can remain in memory at once, because only active pages need to be resident.
Flexibility
A process can use a virtual address space larger than the available physical memory.
Protection
Separate address spaces isolate processes from one another, and page permissions restrict access.
Resident Set
Resident Set
The resident set is the subset of a process’s pages currently in physical memory.