Operating Systems

Table of Contents

Virtual memory

problem: so far memory can only be given to processes in contiguous pieces solution: another level of abstraction!

MMU (memory management unit) translation between virtual memory address and the physical memory address

but this leads to a lot of wasted memory, we are keeping around page table entries that aren’t used or don’t have many meaningful values

so we use sparse data structures, break up the page tables (and you can legit go crazy with this)

two-level page tables (x86)

four-level page tables (x86-64)

inverted page tables (IA-64)

with page tables, MMU has to translate every single memory access, leads to lower performance.

try caching previous translations in a TLB and praying to God for locality.

Translation Lookaside Buffer (TLB):