作者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
1F:推 bernachom:所以其实两个都可以?! 04/01 17:20
2F:→ muta22:恩,考试就看你习惯怎麽写就好,或是注解一下你的想法 04/01 17:22
3F:推 bernachom:谢谢^^ 04/01 18:15