看板 Grad-ProbAsk 關於我們 聯絡資訊
A virtual memory system often implements a TLB to speed up the virtual-to-physical address translation. A TLB has the following characteristics. Assume each TLB entry has a valid bit, a dirty bit, a tag, and the page number. Determine the exact total number of bits to implement this TLB. -It is direct-mapped. -It has 16 entries. -The page size is 4K bytes. -The virtual address space is 4G bytes. -The physical memory is 1G bytes. 求解 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.136.111.245
A4P8T6X9:(1+1+16+18)*16 01/04 09:54
PTT007:我的答案跟你一樣,但解答給(1+1+18+20)*16 01/04 13:29
※ 編輯: PTT007 來自: 220.136.111.245 (01/04 13:30)
patabon:VA是32bit PA是30bit offset是12bit 減下來不是18.20嗎 01/04 15:18
patabon:還是我想法錯了 @@ 01/04 15:18
A4P8T6X9:direct代表都有固定地方,所以需要index,才會覺得需要 01/04 15:33
A4P8T6X9:把20在扣4,剩下當tag,因為TLB通常都是用full associate 01/04 15:33
A4P8T6X9:的,所以才平常的tag就是全部的虛擬頁碼,換成這樣應該要 01/04 15:33
A4P8T6X9:扣。 01/04 15:33
patabon:感謝樓上解釋,看到TLB都會想到直接用full associative 01/04 16:04
patabon:有指定direct-mapped那的確要扣Index才合理 xd 01/04 16:05
leosnake:一樓正解 :) 01/07 11:05