1
的大小我有以下提示分配:計算頁表
The page size for a virtual memory system is 8KB.
The instruction TLB is direct-mapped with 2 sets and each block contains one translation.
^(I don't believe this is relevant for the following 3 questions, as there are two more questions about the TLB)
The number of bits in a virtual address is 20.
The number of bits in a physical address is 15.
(1) What is the number of virtual pages?
我覺得我有這個想通了。
Page size = 8 * 2^10 = 8192
,所以偏移量爲13 bits
。
虛擬頁號= 位
虛擬頁=
(2) What is the number of physical pages?
頁此處,我有點困惑。我想我應該在有效的,髒的和參考位中添加物理頁碼(這是2
,從15 - 13
)。然而5 * 2^7 = 640 bytes
,這似乎令人難以置信的小。
(3) How many bits are used in the virtual address for the page offset?
回答上面,它似乎是13 bits
。
任何人都可以指向正確的方向嗎?謝謝!
那麼物理頁面的數量簡直就是物理頁面數量的2倍?我的印象是它乘以虛擬頁面的數量。 – user1888527
物理頁面的數量是物理頁面數量的2倍,即2。或者,換一種說法,它是物理內存的大小除以頁面大小。 –