Maximum number of page faults in two-level page table
What is the maximum number of page faults that can occur when trying to acc开发者_JAVA百科ess a single page in a two-level page table?
My guess is two. One if the second level table is not in memory and one if the page in the second level page table is not in memory.
The maximum number is 3, because page tables
themselves are are stored in virtual memory
. So you have
- one fault for the
page directory
(level 1 page table) - one fault for the
page table
referenced from the directory page (level 2 page table) - one fault for desired page
The minimum number is 0 if we have a TLB
hit and the page itself is in memory.
See also here.
精彩评论