Skip to main content

Posts

Showing posts from February 11, 2018

Linux Memory management Deep Dive

Focussing on Linux memory management for Feb 2018 The main idea is as follows Main Idea 1. MM hierarchy deals with segmenting discovered machine memory into pages. 2. It also provides memory algorithms like SLAB, SLUB, SLOB 3. Provides page related functions like allocation, deallocation etc 4. Provides abstraction and interfaces to swapping, virtual memory etc I'll be working at several small workflows and will iterate them here. Here's an initial list Core Workflows (All these workflows will be studied) 1. Initialize all discovered memory 2. Allocating a page from user space 3. Allocating a page from kernel space 4. Deallocating both user and kernel space pages 5. Number of free pages fall below lowest watermark 6. SLUB,SLOB, SLAB algorithm working (I can start here) 7. Page Fault Handling 8. Swap In and Swap Out modules 9. Virtual memory working Open Question 1. Tracing: How do I validate above workflows in practice??