【发布时间】:2014-07-28 13:07:10
【问题描述】:
考虑一台具有 64 MB 物理内存和 32 位虚拟地址空间的机器。如果页面大小为 4 KB,那么页表的大概大小是多少?
我的解决方案:
Number of pages in physical memory = (size of physical memory)/(size of page)
= 64 * 2^10 / 4
= 2^14
Number of pages in virtual memory = (size of virtual memory)/(size of page)
size of virtual memory = 2^32 bits
= 2^29 bytes
= 2^19 kBytes
Number of pages in virtual memory = 2^19/4 = 2^17
=> Number of entries in page table = 2^17
Size of each entry = 17+14 =31 bits
Size of page table = 31 * 2^17 bits
= 31 * 2^14 bytes
= 31 * 2^4 KB
= 31*16
= 496 KB
但答案是 8 MB。为什么?
【问题讨论】:
标签: operating-system virtual-memory