|
$L_1$ cache |
$L_2$ cache |
$Memory$ or $L_3$ cache |
$Access\ time\ per\ word$ |
$100\ ns/w$ |
$150\ ns/w$ |
$250\ ns/w$ |
$Words\ per\ block$ |
$1 \ W/block$ |
$4 \ W/block$ |
$8 \ W/block$ |
$Hit\ Ratio$ |
$80 \%$ |
$90 \%$ |
$100 \%$ |
So Applying heirarchial access formula we get,
$EMAT = H_{L_1}*T_{L_1} + M_{L_1}* H_{L_2}*(T_{L_1}+T_{L_2}) +M_{L_1}* M_{L_2}*(T_{L_1}+T_{L_2} + T_{memory})$
where,
$H_{L_1} = 0.8$ and $M_{L_1} = 0.2$
$H_{L_2} = 0.9$ and $M_{L_2} = 0.1$
$T_{L_1} = $ Time to read $1$ Block from $L_1$ cache = $100$ ns
$T_{L_2} = $ Time to access $1$ word(block) from $L_2$ cache and then transfer it to $L_1$ cache = $150$ ns
$T_{memory} = 1000$ ns why ?
see this line
memory access has to wait on a cache miss until a complete memory block gets transferred.
So the complete block of $L_2$ has to be accessed from main memory which consist of $4$ words and each word transfer from main memory to $L_2$ cache takes $250\ ns/word$
So total time to access a block of $4$ words from a main memory $=4*250 = 1000$ ns
Putting the values in the formula we get,
$EMAT = 0.8*100 + 0.2* 0.9*(100+150) +0.2*0.1*(100+150+ 1000)$
$= 80 + 0.2* 0.9*(250) +0.2*0.1*(1250)$
$= 80 + 45 +25$
$= 150$
So option $c.$ is correct answer.