Linux OS Internals (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)
How does Virtual Memory and Page Tables work in Linux?
senior LevelSystem Design
In Simple Words: Processes never access physical RAM addresses directly; they operate in an isolated Virtual Address Space:
- Memory Management Unit (MMU): Hardware chip in the CPU that translates virtual addresses to physical RAM addresses.
- Page Tables: Multi-level lookup tables maintained by the kernel mapping 4 KB virtual pages to physical RAM Page Frames.
- Benefits: Complete memory isolation (Process A cannot read Process B's memory) and allows systems to run processes requiring more memory than physical RAM via Swapping.