PAGE TABLE WHEN SOME PAGES ARE NOT IN MAIN MEMORY 0 1 0 A 2 valid-invalid B frame bit 3 2 C 04 4 A 3 D i 5 26V E 3 6 C A B 5 4 7 59v 6 G 0 8 H 9 F E a H logical page table 10 memory 11 12 13 14 15 physical memory
PAGE TABLE WHEN SOME PAGES ARE NOT IN MAIN MEMORY
PAGE FAULT o If there is a reference to a page,first reference to that page will trap to operating system: page fault 1. Operating system looks at another table to decide: Invalid reference abort ·Just not in memory 2.Get empty frame 3.Swap page into frame 4.Reset tables 5.Set validation bit =v 6.Restart the instruction that caused the page fault
PAGE FAULT If there is a reference to a page, first reference to that page will trap to operating system: page fault 1. Operating system looks at another table to decide: Invalid reference abort Just not in memory 2. Get empty frame 3. Swap page into frame 4. Reset tables 5. Set validation bit = v 6. Restart the instruction that caused the page fault
PAGE FAULT (CONT.) o Restart instruction ·block move auto increment/decrement location
PAGE FAULT (CONT.) Restart instruction block move auto increment/decrement location
STEPS IN HANDLING A PAGE FAULT 3) page is on backing store operating system (2 reference trap ① load M 6 restart page table instruction free frame 4 reset page bring in table missing page physical memory
STEPS IN HANDLING A PAGE FAULT
PERFORMANCE OF DEMAND PAGING o Page Fault Rate0≤p≤1.0 ·ifp=0 no page faults if p=1,every reference is a fault o Effective Access Time (EAT) EAT =(1-p)x memory access +ppage fault overhead swap page out swap page in restart overhead
PERFORMANCE OF DEMAND PAGING Page Fault Rate 0 p 1.0 if p = 0 no page faults if p = 1, every reference is a fault Effective Access Time (EAT) EAT = (1 – p) x memory access + p (page fault overhead + swap page out + swap page in + restart overhead )