Pretend there's 16GB (2^34 bytes) of physical memory
Goal: translate virtual page numbers to physical page numbers
Q: How many virtual pages are there?
Q: How many bits are in a virtual page number?
Q: How many physical pages are there?
Suppose a process's page table is a contiguous array
of 72-bit entries (64 for the physical page number,
and 8 for miscellaneous flags). How much space does the
page table require?
Two-level page table structure
Pretend all of the above
Pretend there's a top-level page table with 4K entries (2^12 = 4096).
Each of those entries points to a second-level page table.
Q: How many second-level page tables are there?
Q: How many entries does each second-level page table have?
Q: How much virtual address space does each second-level page table represent?
Q: Assuming each second-level page table's entries are 72 bits long,
how much space does each second-level page table take up?
Q: Given the address ADDR = 0x5678FEDC1234ABCD
what virtual page number is this address on?
what index in the top-level page table does ADDR refer to?
what index in the second-level page table does ADDR refer to?
Revisiting the layers of abstraction
Where have we spent our time?
What would be next?
Deeper into the OS
Digital logic
Hardware
Operating system notes
Where does the code live?
Interrupts and interrupt handlers
Kernel mode
Scheduler
System call table
Wednesday & Friday
A quick spin through digital logic and CPU architecture