之前有人问过了,不过我还是有点不懂的地方。
我的了解EMAT(effective memory access time)= TLB hit ratio*(TLB hit time+memory
access time)+TLB miss ratio*(TLB hit time+memory access time*2)
// memeory access time*2 是因为要一次去access memory to get the page table and
frame, plus the time to access memory to get the data.
这题又加入一个backing store(secondary store), 所以我觉得总共的时间是:
假设TLB miss ratio=p%, total page fault ratio=q%, 题目给定TLB access time= 1ns,
memory access time=20ns, backing store access and transfer time = 2000000 ns,
所以EMAT= (1-p)*(1+20)+p*(1+20*2)+p*q*(1+20+2000000)
意义就是TLB hit中了,要花TLB access time+一次memory access time, 加上如果TLB miss,
要花一次TLB access time.(do nothing)+2次memory access time, 加上如果又page
fault, 要花1次TLB access time+1次memory access time+一次backing store access
time.
所以把(B)数据带进去, p=0.001, q=0.00001
EMAT=0.999*(1+20)+0.001*(1+40)+0.001*0.00001*(2000021)=21.04, 可是答案给(B)是
对的,所以应该是我哪观念搞错了,请教一下大家,感谢