Types of Page Fault

Types of Page Fault - not valid for this process, then...

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

View Full Document Right Arrow Icon
Types of Page Fault Page Fault Page not Resident : Page not in Physical Memory, it is in disk Protection Violation : Write or Access permission (as indicated by page bits) violated.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Processing a Page Fault 1. A program tries to read/write a location in memory that is in a non-resident page. This could happen when: fetching the next instruction to execute or trying to read/write memory not resident in RAM 2. The MMU tries to look up the VM address and finds that the page is not resident using the resident bit. Then the MMU generates a page fault, that is an interrupt from the MMU 3. Save return address and registers in the stack
Background image of page 2
Processing a Page Fault 4. The CPU looks up the interrupt handler that corresponds to the page fault in the interrupt vector and jumps to this interrupt handler 5. In the page fault handler If the VM address corresponds to a page that is
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: not valid for this process, then generate a SEGV signal to the process. The default behavior for SEGV is to kill the process and dump core Otherwise, if VM address is in a valid page, then the page has to be loaded from disk. Processing a Page Fault 6. Find a free page in physical memory. If there are no free pages, then use one that is in use and write to disk if modified 7. Load the page from disk and update the page table with the address of the page replaced. Also, clear the modified and access bits 8. Restore registers, return and retry the offending instruction Processing a Page Fault • The page fault handler retries the offending instruction at the end of the page fault • The page fault is completely transparent to the program, that is, the program will have no knowledge that the page fault occurred....
View Full Document

This note was uploaded on 01/30/2012 for the course CS 354 taught by Professor Staff during the Fall '08 term at Purdue.

Page1 / 5

Types of Page Fault - not valid for this process, then...

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