[問題] OS-memory計算

看板Grad-ProbAsk作者 (小那)時間17年前 (2009/03/20 03:53), 編輯推噓6(602)
留言8則, 5人參與, 最新討論串1/1
Consider a system with following properties: ●A 64K byte logical address space. ●A physical memory of 16K bytes ●A simple (one-level)page table address translation implementation using page size of 4096 byte ●The page tables are stored in physical memory. ●The access time of physical memory is 100μs. (a) How many bits wide is a logical address ? 我算是 14bits 2^16 byte / 2^12 byte = 4=2^2 so p+d = 2+12 = 14 這樣對嗎 ? (b)What is the min number of bits a pointer in a C program compiled for this machine would need to occupy? 這題怎麼算啊 ?? (c)Assuming it also needs to hold a vaild bit, a reference bit and a modified bit , what is the min number of bits wide a page table entry need to be? 我算出來是 5bit耶,好奇怪喔!很懷疑我有沒有算錯?! physical page number 我算是2^14 / 2^12 = 2^2 所以 3+2 = 5 !! 如果我有算錯,請您指正!謝謝你。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.139.157.70

03/20 04:06, , 1F
a.16 b.14 c.17
03/20 04:06, 1F

03/20 10:00, , 2F
A.16 B.16 C.9(含Page Number)
03/20 10:00, 2F

03/20 10:05, , 3F
a.64K=2^16=>16bit
03/20 10:05, 3F

03/20 10:21, , 4F
喔,對,我真是熬夜熬昏了>"<
03/20 10:21, 4F

03/20 15:21, , 5F
c也是算5
03/20 15:21, 5F

03/20 16:15, , 6F
C是五沒錯,我也昏頭了...
03/20 16:15, 6F

03/20 16:17, , 7F
那B呢?(我的C也是5)
03/20 16:17, 7F

03/20 16:24, , 8F
thank you all!
03/20 16:24, 8F
文章代碼(AID): #19mgApsF (Grad-ProbAsk)