之前有人問過了,不過我還是有點不懂的地方。
我的了解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)是
對的,所以應該是我哪觀念搞錯了,請教一下大家,感謝