看板 Grad-ProbAsk 關於我們 聯絡資訊
求解 看了半天不知道怎麼算 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是要 怎麼看? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.134.240.203 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1665483455.A.F6D.html
takanano0528: 「Assume each page table entry is 32 bit long」 10/12 00:55
takanano0528: 這邊就告訴你,Table有多少entry(我自己會想成Pag 10/12 00:55
takanano0528: e的寬) 10/12 00:55
takanano0528: 因為這個是屬於多層分頁表,你看到two level那邊應 10/12 00:59
takanano0528: 該可以意會。每個Level的Page Table number都會對 10/12 00:59
takanano0528: 應到下層的page。所以只要找出一個page有多少Table 10/12 00:59
takanano0528: ,跟一個page的容量多大,就可以算出memory大小 10/12 00:59
che96153: 剛剛才知道page size/entry bits = number of entries 10/12 12:34
che96153: 謝謝t大,這樣我就理解了 10/12 12:35
k12795: 剛看到課程 這題老師說課本上有點小錯 答案是(0.001+1)*4 10/13 13:50
k12795: KB=4.004MB 10/13 13:50
k12795: 括號那邊是(0.001+1)K 少打單位 10/13 13:52