Chapter 5 · OS
Memory Management & Virtual Memory
4 topics in 2 parts
Key ideas
| Kernel Dimension | User Space Perspective | Kernel Space Perspective |
|---|---|---|
| Privilege Level | Ring 3 (Restricted instruction set) | Ring 0 (Full hardware & MMU access) |
| Context Switch Cost | Zero (stays in thread context) | High (TLB flush, register save to PCB/trapframe) |
| Memory Isolation | Isolated Virtual Address Space | Direct access to physical DRAM & page tables |
| Failure Impact | Process segmentation fault (isolated termination) | Kernel panic / BSOD (system crash) |
All 4 topics in Memory Management & Virtual Memory
Memory
- Logical vs Physical Memory
- Paging & TLB Architecture
Virtual Memory
- Page Replacement (LRU, FIFO)
- Thrashing & Working Set