Hello
Valid/Invalid, Do all kinds of PTEs point to PFN Database entries?
If so, it means 12-31 (address)bits of the PTEs point both PFN Database entry and physical address?
Hello
Valid/Invalid, Do all kinds of PTEs point to PFN Database entries?
If so, it means 12-31 (address)bits of the PTEs point both PFN Database entry and physical address?
Huh?
The PFN is a Windows data structure used to track the use and reference to pages of physical memory.
The PTE is a used by the system’s memory management hardware.
Peter
OSR
Yes and there is a cross reference from PTE to PFN.
In figure 7 : http://www.labri.fr/perso/betrema/winnt/ntvmm.html ( written in 1992 maybe a bit outdated)
And PTE’s 20 bits is used. As i asked is it valid for all type of ptes and, this 20 bit address also used for finding physical address or physical address come from pfns?
All this diagram shows is that the PFN is indexed… not surprisingly… by physical page frame number (hence the name PFN).
If a given PTE indicates that the page is valid and resident, then that PTE has a corresponding entry in the PFN.
Peter
OSR
xxxxx@gmail.com wrote:
Yes and there is a cross reference from PTE to PFN.
In figure 7 : http://www.labri.fr/perso/betrema/winnt/ntvmm.html ( written in 1992 maybe a bit outdated)
And PTE’s 20 bits is used. As i asked is it valid for all type of ptes and, this 20 bit address also used for finding physical address or physical address come from pfns?
The PTE is a hardware structure. It is used directly by the processor
to perform virtual-to-physical translations, for each and every address
it works with. Thus, the PTE must contain the “master” version of the
physical address for this page.
The PFN is just a bookkeeping table maintained and used by the operating
system. As far as I know, its contents are not documented, and for the
most part should not be of interest.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
> Valid/Invalid, Do all kinds of PTEs point to PFN Database entries? If so,
it means 12-31 (address)bits of the PTEs point both PFN Database entry and physical address?
“Valid/Invalid” approach is meaningless here. If address is valid and page is present in RAM, regardless of its presence in WS address bits of PTE point to the physical page. Once every physical page frame has its descriptor in PFN Database you can say that these bits indirectly point to PFN Database entry (because they provide enough info to arrive to this entry). However if address is invalid, its corresponding PTE may be absolutely anything (in practice, all bits are going to be zeros), and if its valid but memory page has not yet been allocated (i.e. demand paging; data has been swapped to the disk;etc) PTE is not going to point to the physical page either…
Anton Bassov
Hmm…OK.
Thanks…
> Valid/Invalid, Do all kinds of PTEs point to PFN Database entries?
Valid PTE is interpreted by the hardware and obeys the hardware-defined scheme. It must contain the physical address, and also has the 3 bits not interpreted by the hardware (called AVL by Intel) and is used by the OS.
Invalid PTE can contain any bits the OS wants, and is not mandated to contain the physical address at all.
PTE is the structure which describes the mapping of 1 virtual page in some address space.
PFN is the Windows’s (not hardware’s) structure which describes 1 physical page.
In older Windows, the physical address divided by PAGE_SIZE was the index of the PFN entry in the global PFN entry array (MmPfnDatabase). Probably, in modern Windows, there is some translation to support discontiguous physical memory.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com