I'm trying to answer an architecture question on instruction and data caches I have found in a past exam paper ( not homework! ).
The question seems to give a lot of information which I haven't used in my solution. This makes me think I'm missing something and would be really grateful if someone could help me out!
This is the full question as asked in the paper. For a summary of key points please see below.
Calculate the miss rate for a machine S with separate instruction cache and data cache, each of n bytes. There are
I
misses perK
instructions for the instruction cache, and d misses per k instructions for the data cache.A fraction
X
of instructions involve data transfer, while a fractionY
of instructions contain instruction references, the rest contain data references. A hit takesH
cycles and the miss penalty isM
cycles.
Given :
N
bytes I
misses per K
instructions for instruction cache D
misses per K
instructions for the data cache X
of the instructions involve data transfer Y
of the instructions involve instruction references H
cycles M
cycles Calculate : Miss Rate of Machine
I originally thought that the miss rate would be (I/K)*Y + (D/K)*(1 - X - Y)
but since this doesn't use all the data provided, I don't think it can be right :(.
Any help would be awesome!
I think that you maybe interpreting the question wrong or the question is not well framed. Miss rate of cache is obviously no. of misses/total no. of accesses
no. of misses/total no. of accesses
no. of misses/total no. of accesses
. The only thing I can think of which uses all the info of the question is calculating the miss penalty for a cache miss
命中时间L1 + Miss rateL1 *(命中时间L2 + Miss rateL2 * Miss penatlyL2)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.