Virtual Memory: Worked Examples
Work through each trace before reading the explanation. Then solve the transfer task without the page open.
Example 1: Translate the offset unchanged
With 4096-byte pages, virtual address 0x2345 has page number 2 and offset 0x345. If virtual page 2 maps to physical frame 9, the physical address is 0x9345.
The page table changes the frame portion, not the within-page offset. This assumes a present entry and permitted access. A translation existing does not imply the caller has write permission.
Example 2: A TLB miss need not access storage
A translation is absent from the TLB but the page-table entry is present in memory. A page-table walk can refill the translation without reading the page from disk.
A nonresident page instead requires fault handling; it may be loaded, zero-filled, or rejected depending on the mapping. Treating every TLB miss as a disk access inflates the latency model and confuses distinct mechanisms.
Transfer and self-check
Translate 0x2FFF using the same mapping. Check: 0x9FFF. The next virtual address, 0x3000, requires page 3's mapping.
Evidence to keep
Save your first attempt, corrected reasoning, and transfer result as checkpoint evidence. A matching final answer without an explanation is insufficient. Continue with the guided lab and use the reading guide to repair a specific gap.