作者celiao (還沒想到暱稱....)
看板Grad-ProbAsk
標題[理工] 階層式記憶體
時間Fri Oct 29 00:32:57 2010
張凡書裡的練習題 :
Media applications that play audio or video files are part of a class
of workloads called "streaming" workloads; i.e., they bring in large
amounts of data but do not reuse much of it. Consider a video streaming
workload that accesses a 512 KB working set sequentially with the following
address stream:
0, 4, 8, 12, 16, 20, 24, 28, 32,...
(1)Assume a 64 KB direct-mapped cache with a 32-byte line.What is the miss
rate for the address stream above. How would you categorize the misses
this workload is experiencing, based on the 3C model.
(2)Recompute the miss rate when the cache line size is 16 bytes, 64 bytes,
and 128 bytes?What kind of locality is this workload exploiting?
解答是: (1)12.5% miss rate.
The miss rate doesn't change with cache size or working set.
These are cold misses.
(2)25%, 6.25% and 3.125% miss rates for 16-byte, 64-byte and 128-byte
blocks.
Spatial locality.
這邊感覺轉不太過來,不懂12.5%、25%、6.25%、3.125%怎麼來的...
麻煩各位版上高手了...orz
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.195.4.76
推 privatewind:這題已經被問了2~3次了,爬文吧 10/29 11:36
→ celiao:我昨天用了"階層"和"記憶體"搜尋都沒看到... 10/29 22:08
→ celiao:原來關鍵字是"memory"...囧.. 10/29 22:08
推 hunter0904:我怎麼找不到.... 是哪篇阿 我只有看到類似的 沒有算 10/29 22:56
→ hunter0904:百分比的 我解答的有錯嗎0.0? 10/29 22:56
→ celiao:恩...真的沒有算百分比= =,我剛剛只看到題目又是同一個p大 10/29 23:18
→ celiao:還以為是同樣的...~"~ 10/29 23:18
推 privatewind:#1CaGc2fd 因為我記得我回答了兩三次了XD 10/30 09:33
→ privatewind:沒有百分比是我沒有算XD 不過代換一下 也就知道答案了 10/30 09:35