楼主:
che96153 (Huazhiwan)
2022-10-12 02:17:33求解 看了半天不知道怎么算
Consider a machine with 32-bit virtual address,32bit physical addresses,
and a 4KB page size.Consider a two-level page table system where each
table occupies one full page.Assume each page table entry is 32 bits long.
To map the full virtual address space,how much memory will be used by the
page table?
answer:The number of entries in the page table = 4KB/4B = 1024
Amount of memory used = 4KB+1024*(4KB) = 4.1MB
为什么number of entries 不是VPN => 2^32/2^11,然后page table用了多少memory是要
怎么看?
作者: takanano0528 (takanono0528) 2022-10-12 08:55:00
“Assume each page table entry is 32 bit long”这边就告诉你,Table有多少entry(我自己会想成Page的宽)因为这个是属于多层分页表,你看到two level那边应该可以意会。每个Level的Page Table number都会对应到下层的page。所以只要找出一个page有多少Table,跟一个page的容量多大,就可以算出memory大小
楼主: che96153 (Huazhiwan) 2022-10-12 20:34:00
刚刚才知道page size/entry bits = number of entries谢谢t大,这样我就理解了