Multiprogramming needs resident supervisor software (the OS) to switch programs and set up translation.
$\text{Physical Address} = \text{Base} + \text{Logical Address}$
register + immediate + data base to two numbers in one full-adder layer0x4000, bound = 0x1000. What happens on a load at logical 0x1000? At 0x0500?
0x1000 ≥ 0x1000: bounds violation. 0x0500: passes, physical = 0x4500.Virtual address = [ Page number | Offset ]
| 32-bit VA, 4 KB pages, 4 B PTE | 64-bit VA, 1 MB pages, 8 B PTE | |
|---|---|---|
| Offset bits | 12 | 20 |
| PTEs | $2^{20}$ | $2^{44}$ |
| Table size per process | $2^{20} \times 4 = $ 4 MB | $2^{44} \times 8 = 2^{47}$ = 128 TiB |
satp holds the root: one 4 KB L1 table of 1,024 PTEssatp, different tables, different physical pages| V | R | W | D | tag (VPN) | PPN |
|---|
$\text{TLB Reach} = \text{entries} \times \text{page size}$
| Software-managed (MIPS, Alpha) | Hardware-managed (SPARC v8, x86, PowerPC, RISC-V) | |
|---|---|---|
| Who walks | OS exception handler, in untranslated mode | MMU page-table walker from satp |
| Pipeline | Exception flushes the pipeline: costly on OoO superscalars | Refills without a flush |
| Page missing | Handler deals with it | Walker gives up and raises a page fault |