[理工] [計組] TLB

看板Grad-ProbAsk作者 (Steven_Shie)時間11年前 (2012/12/08 03:46), 編輯推噓0(008)
留言8則, 3人參與, 最新討論串1/1
The following table is a stream of virtual addresses as seen on a system. Assume 4 KB pages, a four-entry fully associative TLB, and true LRU replacement. If pages must be brought in from disk, increment the next largest page number. a. 4095, 31272, 15789, 15000, 7193, 4096, 8912 TLB valid Tag Physical Page Number 1 11 12 1 7 4 1 3 6 0 4 9 Page table valid physical page or in disk 1 5 0 disk 0 disk 1 6 1 9 1 11 0 disk 1 4 0 disk 0 disk 1 3 1 12 Given the address stream in the table, and the shown initial state of the TLB and page table, show the final state of the system. Also list for each reference if it is a hit in the TLB, a hit in the page table, or a page fault. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.134.2.94

12/08 12:57, , 1F
把virtual address轉成vpn跟page offset
12/08 12:57, 1F

12/08 12:58, , 2F
再用vpn去TLB逐一比較,如果TLB miss就去page table找
12/08 12:58, 2F

12/08 12:59, , 3F
有找到就更新TLB,沒找到就把largest page number加一搬上來
12/08 12:59, 3F

12/08 14:40, , 4F
如果pagefault要搬的page是最大的page號碼+1-->12+1
12/08 14:40, 4F

12/08 21:10, , 5F
他的virtual address 怎麼轉成vpn?
12/08 21:10, 5F

12/08 21:10, , 6F
是要先換成binary嗎?
12/08 21:10, 6F

12/09 01:07, , 7F
virtual address直接除以page size就是vpn
12/09 01:07, 7F

12/09 12:20, , 8F
突然豁然開朗了!
12/09 12:20, 8F
文章代碼(AID): #1GmaUcsB (Grad-ProbAsk)