Memory Management
Main memory (RAM, the fast working storage of the computer) is shared by many programs. Memory management is how the operating system gives each program its own space, keeps programs apart, and wastes as little as possible. Interviewers ask about fragmentation (wasted memory), paging (cutting memory into equal blocks), the TLB (a small fast helper for address lookups) and segmentation (cutting it into parts that follow the program's structure). The examples use made-up numbers unless a source is named.
After this section you can split an address into page number and offset, work out fragmentation, compute an effective access time, and compare paging with segmentation.
Topics in this section
- Logical and physical addresses, and the MMU
- Contiguous allocation (first, best and worst fit)
- Fragmentation and compaction
- Paging
- The TLB and effective access time
- Multilevel page tables
- Segmentation, and how it compares with paging
- Swapping