Week 5,6: Memory Management

Lecture notes:
Memory management: introduction
Memory management: case studies, demand paging, resident set management
Memory management: Lecture slides (6 per page)
Paging: Lecture slides (6 per page)
Kernel memory allocation: Lecture slides (6 per page)

Part 1
memory manager, monoprogramming, multiprogramming, CPU utilization, degree of multiprogramming, position independent code, dynamically relocatable code, logical vs. real addressing, relocatable addressing, memory management unit (MMU), multiple fixed partitions, variable partitions, internal fragmentation, external fragmentation, memory compaction, segmentation, memory allocation (first fit, next fit, best fit, worst fit), paging, page frames, page offset, page table, page table base register, page translation page table entry (PTE), page fault, direct mapping, associative mapping, translation lookaside buffer (TLB), associative memory, TLB hit, TLB miss, hit ratio, address space identifier (ASID), PTE fields: page attributes (valid, read-only, execute, dirty), multilevel page tables, partial page table, inverted page table.

Part 2
Pinning PTEs in the TLB, multi-level TLB (MicroTLB, Main TLB), sharable page attribute, combined paging and segmentation, x86-64 and ARM page table hierarchy, large pages in ARM and x86-64 architecture (advantages), demand paging, page fault handling

page replacement algorithms: LRU, not frequently used (NFU), clock, nth chance

working set, resident set, thrashing, locality, working set window, page fault frequency, swapping.