Re: [問題]關於memory access time
※ 引述《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
推
06/20 13:58, , 1F
06/20 13:58, 1F
推
06/20 14:30, , 2F
06/20 14:30, 2F
推
06/20 15:07, , 3F
06/20 15:07, 3F
推
06/20 16:06, , 4F
06/20 16:06, 4F
→
06/20 16:08, , 5F
06/20 16:08, 5F
推
06/21 00:53, , 6F
06/21 00:53, 6F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):