Chapter 9 · SimulationPaging and Address Translation? ← Chapter 9 Size 256 512 1K 2K 4K Pages 8 Frames 6 TLB 4 1.5/sAddresses Example Locality Random 1Virtual address 2Split p | d 3TLB 4Page table 5PhysicalVirtual–➜Physical– Page tablepage · present · framePhysical memory ClosePaging and Address TranslationThe CPU generates virtual addresses. Each virtual address is split into a page number p (high bits) and an offset d (low bits). The TLB is consulted first; on a TLB miss the page table is read. A page that is present in memory supplies its frame f, and the physical address is f × page size + d. Accessing a page whose present bit is 0 causes a page fault.UsageThe top row sets the page size, the number of virtual pages, the number of physical frames and the number of TLB entries.Type virtual addresses (decimal, space-separated) or pick a preset list; the shuffle button fills the page table randomly.Play the five stages of each translation or step through them.The page table can be edited at any step: click a present bit or type a frame number.The chart button compares the hits of TLBs of size 1–8 on the same address list; clicking a bar selects that size.TermspPage number = virtual address div page size (high bits).dOffset = virtual address mod page size (low bits); copied unchanged.TLBA cache of recently used page → frame mappings; the least recently used (LRU) entry is replaced.Present1 = the page is in a frame; 0 = page fault.PAPhysical address = frame × page size + d.EditingEach frame holds at most one page (choosing an occupied frame swaps the pages). The edited page’s TLB entry is invalidated.Legend p bits d bits f bits / new TLB entry ✓ TLB hit ✗ miss / page faultKeys←→ stepSpace playHomeEnd first / lastEsc close