Phase 4: Memory
Memory management is one of the kernel's most critical jobs. Understanding how Linux handles RAM — virtual vs physical memory, swap, the OOM killer, and page cache — lets you diagnose memory leaks, tune systems for performance, and understand why your server ran out of memory at 3am.
What You'll Learn
1. Memory Management
Buddy allocator, slab allocator, memory overcommit — the full picture.
Intermediate2. Virtual Address Space
Why every process thinks it owns all memory — and how that works.
Intermediate3. Paging & Page Tables
Page tables, TLB, page faults — translating virtual to physical addresses.
Intermediate4. How Swap Works
When Linux uses swap, LRU eviction, swappiness, zswap/zram.
Intermediate5. Out of Memory
The sequence of events when Linux runs out of memory.
Intermediate6. OOM Killer Selection
How the kernel picks which process to kill and how to influence it.
Intermediate7. Memory-Mapped Files
How mmap() maps files directly into process address space.
Intermediate8. Huge Pages
2MB pages vs 4KB, THP, when huge pages hurt vs help.
Advanced9. /proc/meminfo
Every line of /proc/meminfo explained — what to actually look at.
IntermediateFrequently Asked Questions
What will I learn here?
This page covers the core concepts and techniques you need to understand the topic and progress confidently to the next lesson.
How should I use this page?
Start with the overview, then follow the section links to deepen your understanding. Use the table of contents on the right to jump to specific sections.
What should I read next?
Use the navigation below to continue to the next lesson or explore related topics.