作者gn01642884 (领域中人)
看板Grad-ProbAsk
标题Re: [理工] [计组]-清大93 page计算
时间Sun Jan 10 22:41:07 2010
※ 引述《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
a. physical:
64frame*1024word*4byte=2^18 byte
physical至少要有18bit才能够标出全部的记忆体位置
(allocation unit is one byte)
logical:
由上题得知index部分为2^12
2048page=2^11
logical至少要有11+12=23bit来标明
: b. one-level page table is used, how many bytes are required by PT
b.
pagetableㄧ个entry里面含有
1.vaild bit 2.dirty bit 3.reference bit 4.physical address(部分)
共有2048个page===>2048个entry
2048entry*(3(for vaild ,dirty,reference)+6(phycial扣掉index))
= 9*2^11bit = 9*2^8byte
: c. two-level PT is used, and first level table has 32 entries,
: what is the minimal amount of memory required by PT.
c.
32=2^5
32entry要标完2048个page==> 2048/32=2^6 L2至少要有2^6个entry
L1: 32entry*(3+6(for L2))=9*2^5bit=9*2^2byte
L2: 2^6entry*(3+6(for phycial address))=9*2^6bit=9*2^3byte
L1+L2=108byte
: 可以帮我算一下吗?(以及列式)
: 另外题目有点看不懂,是说总共2048个page?
: 每个page有1024个word? 那(4byte)又是指什麽?
1个word有4byte
: 谢谢
不一定正确 有错误请指正
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.38.100.229
1F:推 polomoss:b部分,没说明到底要加不加vilid,dirty...etc 01/10 23:31