A page is the smallest unit of virtual memory management within an operating system.
- It usually has a fixed size (4 KB, 8 KB or more depending on the architecture).
- The data of a process is divided into pages that the operating system can move between RAM and disk (swap/paging file).
- When a program accesses an address that is not in RAM, a page fault occurs and the OS loads the required page from disk.
Example
- A process needs to access a variable that is not in RAM.
- The OS detects a page fault and loads from disk the entire page (e.g., 4 KB) that contains this variable.