看板 Grad-ProbAsk 關於我們 聯絡資訊
請教一下.. consider the following hardware configuration virtual address =32 bits, page size=4kbytes, and a page table entry occupies 4 bytes. How many pages should the OS allocate for the pages table of a 12Mbyte process under the following paging mechanisms? a)one-level paging b)two-level paging.(assuming that the number of entries in a first-level page table is the same as that in a second-level page table) ---- a)這題我是這樣算,2^20 * 4 = 4MB, 12MB/4MB=3個page table b)算出來答案很怪... 請教一下,b)這題要怎麼算呢? 謝謝幫忙 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.112.234.203
lightergogo:第一題好像算錯了 雖然答案對XD 03/02 13:42
ottokang:不是問Pages數目嗎? 03/02 13:54
lightergogo:page個數=12MB/4KB=3*2^10 03/02 14:10
lightergogo:page table size=3*2^10*4=12kb 03/02 14:13
lightergogo:page table佔 12KB/4kB = 3個pages 03/02 14:14
bernachom:請教一下,那B小題呢?謝謝 03/02 14:23
bensome0624:b)應該是4個,需要3個2-level page table,所以需要3個 03/02 14:28
bensome0624:1-level page entries(只需1個page)對應,故共4個 03/02 14:29
bernachom:所以這題是要算page table數?? 03/02 14:31
bensome0624:2-level剛好一個page table2^10 entries,需一個page 03/02 14:33
assassin88:算法其實沒錯 03/02 16:28