→ polomoss:3Q 01/10 23:31
※ 引述《polomoss (小澤)》之銘言:
: Consider a logical address of 2048 pages of 1024 words (4byte) each,
: mapped onto a physical of 64 frames. Assume the smallest memory
: allocation unit is one byte
: a. How many bits in the logical and physical address
: b. one-level page table is used, how many bytes are required by PT
: c. two-level PT is used, and first level table has 32 entries,
: what is the minimal amount of memory required by PT.
: 可以幫我算一下嗎?(以及列式)
: 另外題目有點看不懂,是說總共2048個page?
: 每個page有1024個word? 那(4byte)又是指什麼?
: 謝謝
題目說是byte addressing.
一個page size = 1024*4 = 2^12 bytes -> offset = 12bits;
logical space有2^11個pages -> page index = 11bits;
physical space有2^6個frames -> frame index = 6bits;
(1) logical address需11+12 = 23bits; physical address需6+12 = 18bits.
(2) 假設PT entry size = 6bits( 題目沒說有哪些特殊位元, 不考慮 ),
PT size = 2^11*6bits = 1.5KB.
(3) outer PT有32個entries -> P1 = 5bits; 因此P2 = 23-5-12 = 6bits,
一個inner PT size = 2^6 * 6bits = 48bytes;
outer PT的size = 32*6bits = 24bytes; 所以答案是24bytes.
(這小題不太確定)
有錯請更正~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.174.28.67