Sunday, June 12, 2011

Page States

If a given Page is in the Working Set, the PTE that points to it will have the Valid Bit flag set to One. This mean that the PTE points to a valid physical page. In this case the PTE will contain the Page Frame number for the corresponding Physical Page.

Otherwise if Valid Bit flag is Zero (broadly indicate an Invalid Page), the Page can be in one of the other special Page States. The actual state can then be determined by looking at the remaining PTE fields. Following are small description for some of these other Page states:

 - Page is backed up in the Page file: PTE will contain Page File Number and Page File Offset information.
 - Demand Zero Page: When first referenced, memory manager should allocate a Zero initialized page and assign it to the given PTE. Demand Zero Page at first would look like Page file PTE but the Page File number and the Page File offset is set to Zero.
 - Transition: Although the Page might be resident, but its not in the Working Set. It could be in the Standby list, or Modified Page list, etc. PTE will contain the Page Frame number for the resident Page. The Transition and the Prototype bit flag is set to One to indicate the Transition state of this Page. In order to use it again, the memory manager will have to include this page in Working Set.
 - Zero PTE: No Page yet assigned to this PTE. When first referenced, the memory manager should check the VADs to determine the Virtual memory reserve/commit state and act accordingly. If the Virtual memory is not committed yet, the memory manager will raise Access violation.

No comments:

Post a Comment