现在的位置: 首页 > 综合 > 正文

windows 虚拟地址映射到物理地址

2013年02月22日 ⁄ 综合 ⁄ 共 1095字 ⁄ 字号 评论关闭

1. The CPU’s MMU locates the page directory for the process using
the special register mentioned above.
2. The page directory index (from the first 10 bits of the virtual address)
is used to locate the PDE that identifies the page table
needed to map the virtual address to a physical one.
3. The page table index (from the second 10 bits of the virtual address)
is used to locate the PTE that maps the physical location of the virtual
memory page referenced by the address.
4. The PTE is used to locate the physical page. If the virtual page is
mapped to a page that is already in physical memory, the PTE will

contain the page frame number (PFN) of the page in physical memory
that contains the data in question. (Processors reference memory
locations by PFN.) If the page is not in physical memory, the MMU
raises a page fault, and the Windows page fault–handling code attempts
to locate the page in the system paging file. If the page can be
located, it is loaded into physical memory, and the PTE is updated to
reflect its location. If it cannot be located and the translation is a user
mode translation, an access violation occurs because the virtual address
references an invalid physical address. If the page cannot be
located and the translation is occurring in kernel mode, a bug check
(also called a blue screen) occurs.

 

抱歉!评论已关闭.