What is page table entry size?

前端 未结 7 1169
灰色年华
灰色年华 2020-12-24 16:00

I found this example.

Consider a system with a 32-bit logical address space. If the page size in such a system is 4 KB (2^12), then a page table may

7条回答
  •  囚心锁ツ
    2020-12-24 16:09

    So, the entry refers to page table entry (PTE). The data stored in each entry is the physical memory address (PFN). The underlying assumption here is the physical memory also uses a 32-bit address space. Therefore, PTE will be at least 4 bytes (4 * 8 = 32 bits).

    In a 32-bit system with memory page size of 4KB (2^2 * 2^10 B), the maximum number of pages a process could have will be 2^(32-12) = 1M. Each process thinks it has access to all physical memory. In order to translate all 1M virtual memory addresses to physical memory addresses, a process may need to store 1 M PTEs, that is 4MB.

提交回复
热议问题