[問題] OS-memory計算
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
03/20 04:06, 1F
推
03/20 10:00, , 2F
03/20 10:00, 2F
推
03/20 10:05, , 3F
03/20 10:05, 3F
→
03/20 10:21, , 4F
03/20 10:21, 4F
推
03/20 15:21, , 5F
03/20 15:21, 5F
推
03/20 16:15, , 6F
03/20 16:15, 6F
推
03/20 16:17, , 7F
03/20 16:17, 7F
→
03/20 16:24, , 8F
03/20 16:24, 8F