作者muta22 (回歸)
看板Grad-ProbAsk
標題Re: [問題] OS-memory reference time
時間Wed Apr 1 17:09:52 2009
昨天看的太快,原po給的寫法也對,還是稍微整理一下:
EAT = p*(TLB + MA) + (1-p)*(TLB + 2MA) ; 比較直覺的做法
p :TLB hit ration
MA:記憶體存取時間 (存取page table 或是 存取data)
觀念是兩個情況:
1.TLB hit:欲存取的page在TLB找到,則到記憶體存取data
2.TLB miss:欲存取的page在TLB沒找到,此時到page table尋找,
之後才到記憶體存取data,故需要兩次MA
兩種寫法:75%*(0+100) + (1-75%)*(100+100) = 125 ; 比較直覺的寫法
75%*0 + (1-75%)*100 + 100 = 125 ; 失誤代價的寫法
↑ ↑
TLB 失誤代價 存取data時間
我是習慣第一個寫法,看個人嘍
※ 引述《bernachom (Terry)》之銘言:
: If we add associative registers , and 75 percent of all page-table
: reference are found in the associative registers, what is teh effective
: memory reference time? justify your answer.
: (Assume that finding a page-table entry in the asociative registers takes
: zero time, if the entry is there. memory reference takes 100ns. )
: 解答寫:
: 75%*0+(1-75%)*100+100=125
: 請教一下,這是不是應該75%*100才對?
: 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.87.226.213
推 bernachom:所以其實兩個都可以?! 04/01 17:20
→ muta22:恩,考試就看你習慣怎麼寫就好,或是註解一下你的想法 04/01 17:22
推 bernachom:謝謝^^ 04/01 18:15