[理工] [計組]-Access time問題
例如 97年中興資科 計算機系統 第六題
題目大意如下:
it takes 10ns to access a word in the cache.
If a word is in main memory but not in the cache,
30ns are needed to load it into the cache,
and then the reference to it is started again.
If the word is not in main memory,
12ms are required to fetch the word from disk,
followed by 30ns to copy it to the cache,
and then the reference is started again.
cache hit ratio 0.9 ; main memory hit ratio 0.6
求平均access time
我看解答是寫
0.9*10ns + 0.1*0.6*(10ns+30ns+10ns)
+ 0.1*0.4*(10ns+30ns+12ms+30ns+10ns)
不過我看高銘後面的例題,95年中山電機的題目,題目一樣只是數據不一樣
高銘的解法是
0.9*10ns + 0.1*0.6*(10ns+30ns)
+ 0.1*0.4*(10ns+30ns+12ms)
請問這兩者哪一個才是正確的呢?
謝謝~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.40.205.130
→
02/17 21:12, , 1F
02/17 21:12, 1F
推
02/17 21:14, , 2F
02/17 21:14, 2F
推
02/17 21:50, , 3F
02/17 21:50, 3F
→
02/17 21:50, , 4F
02/17 21:50, 4F
→
02/17 22:21, , 5F
02/17 22:21, 5F
→
02/17 22:21, , 6F
02/17 22:21, 6F
→
02/17 22:23, , 7F
02/17 22:23, 7F
推
02/18 09:20, , 8F
02/18 09:20, 8F