作者lwtistunning (嗯)
看板Grad-ProbAsk
標題[理工] [os] page table計算問題
時間Tue Mar 16 23:25:56 2010
A hardware company designs a CPU with two-level paging virtual memory.
The page size is 512 Bytes.
A page table size is equal to page size.
Each page table entry occupies 2 bytes(16 bits).
In the page table entry, there are two bits reserved for present bit
and modified bit.
All the remaining 14 bits can be used to store frame numbers.
問題如下:
1.How many bits is a logical address (virtual address) :
2.How many bits is a physical address can be?
3.What is the maximum size (in byte) of physical memory can be installed on this machine ?
4.A program with size 384KB is loaded into memory. What is the maximum number of page table(in number of pages) should be allocated
for the process?
1.我是算25bit
2.算23bit
3.算4KB
有人跟我算的一樣嗎?
另外想請問physical address是否也像virtual address一樣,有兩個level
像這樣
-------------
p1 | p2 | d |
-------------
麻煩指教一下 謝謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.139.136.22
→ privatewind:3. 4KB會不會太小... 03/17 01:06
→ privatewind:14+14+8=36, 14+8=22, 4MB 這我認為的 03/17 01:08
→ privatewind: +9=37, 14+9=23, 8MB 03/17 01:22
→ privatewind:我不認為physical 也要跟virtual一樣要兩個level XD 03/17 01:33
→ privatewind:阿 抱歉 有行我沒看到Orz 03/17 01:40