看板 TransCSI 關於我們 聯絡資訊
※ 引述《terry751212 (沉澱)》之銘言: : 最近寫了中央資管94考古題 : 發現有ㄧ題 題目是cache access time 是2ns 且hit rate是60% : memory access time 是10ns : 在版上有看到相關算法為: : 2*0.6+0.4*(2+10)=6ns : 可是系上修的OS課程有教到另一個算法是: : (2+10)*0.6+(2+10+10)*0.4=16ns : 其觀念就是差在於兩個access time 有無包含抓取實體記憶體資料時間 : 想要請教板上各位高手 對外考試是該用哪個算法~"~ 原題目: Assume that the RAM access time is 10 ns, the cache access time is 2 ns and the hit rate is 60%, compute the expected memory access time. (5%) ┌──┐ 2ns ┌───┐ ┌────┐ │CPU │ ──→ │ Cache│ │ Memory │ └──┘ 60% └───┘ └────┘ │ └→(2+10) ↑ │ │ └────────────────┘ 10ns (1-60%) 2 * 0.6 + 12 * 0.4 = 6 圖畫出來就很明顯了吧....(為什麼會算出16ns? 這我不瞭) -- 犯人名稱 犯人化名為 上次犯案時間 犯案 次 遭逮捕 次 被竊贓款有 大洋 中原標準前時間 按End鍵可更新 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.229.12.70
antirazin:我變犯人了~= =+ 06/20 13:58
abien:這裡是公海... 06/20 14:30
terry751212:OS課本是還有個讀取分頁表,才會多一個10ns。 06/20 15:07
terry751212:說錯,應該是說考慮抓取memory資料時間,才會說10ns。 06/20 16:06
terry751212:不過謝謝你的圖^^ 06/20 16:08
biox:一樓宅宅 科科 ,感謝製圖者 這樣一目瞭然= = + 06/21 00:53