Page Fault question....

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Sam

Page Fault question....

Post by Sam »

Hi guys!

If a memory reference is made and the present bit in the page directory is set indicating that the page table is present, but the page where the page table should be is marked not present (in another page table), what will happen??
Will CR2 contain the "original" memory reference or an address in the missing page table? ???

Does enyone know this?? Then you have the chance to prove you are a real os guru... ;D
kaos

Re:Page Fault question....

Post by kaos »

Remember that pagetables contain physical addresses rather than virtual addresses.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Page Fault question....

Post by Candy »

Sam wrote: Hi guys!

If a memory reference is made and the present bit in the page directory is set indicating that the page table is present, but the page where the page table should be is marked not present (in another page table), what will happen??
Will CR2 contain the "original" memory reference or an address in the missing page table? ???

Does enyone know this?? Then you have the chance to prove you are a real os guru... ;D
Since you cannot give an error for any page that is not there (since it isn't there, it doesn't have a fault address either), so the only logical outcome would be that CR2 always contains the address that was about to be used, and which caused the page fault itself.
Post Reply