OS_Lec16_Temp - EE2010 Lec 16 Continue virtual memory...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Transfer of a Paged Memory to Contiguous Disk Space Here we need program B to be in memory but there is no free space for it so we swap process A out of the memory and we put it into disk and then swap program B into main memory. Valid-Invalid Bit V indicates that the process is in memory. I indicate that the process is in disk. If the process is invalid i.e. I this is a page fault. Page Fault If the page was requested and this page was not in the memory i.e. it was invalid (I) this will cause a page fault and the following procedure will be done to overcome this : 1. We get an empty frame to put the required page in it. 2. We swap the page out of the disk to the frame (memory). PDF created with pdfFactory trial version www.pdffactory.com
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EE2010 3. Then we reset the table (page table). 4. Set the validation bit to V (because now that page is in memory). 5. Restart the instruction that caused the page fault. Steps in Handling a Page Fault 1. We go to the reference of the page. 2. The page wasn t found in memory i.e. it is invalid that will make a trap in the OS. 3. The OS will go to search for the page in the disk. 4. When the page is found we take it and put it in a free frame in the physical memory. 5. Then we will reset the page table (put V for the page instead of I). 6. Then we will restart the instruction that made the page fault. Performance of Demand Paging Let p be the probability of a page fault 0 p 1. if p = 0 no page faults if p = 1, every reference is a fault Effective access time (EAT) = (1-p) *memory access+ p*page of time Page of time= page fault overhead + swap page out + swap page in + restart overhead. Notes: The average page fault (page of time) may be given directly or you will have to calculate it from the previous equation. If the process wasn
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 11

OS_Lec16_Temp - EE2010 Lec 16 Continue virtual memory...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online