1,639 views
0 0 votes

$h_1→L1$ hit ratio 
$h_2→L2$ hit ratio
$C_1→ L1$ access time
$C_2→ $Miss penalty to transfer information from L2 to L1
$M→$ Miss penalty to transfer information from main memory to L2

Average access time given in Carl Hamacher's book is


$t_{avg}=h_1C_1+(1-h_1)h_2C_2+(1-h_1)(1-h_2)M$

Shouldn’t it be

$t_{avg}=h_1C_1+(1-h_1)h_2(C_2\color{red}{+C_1})+(1-h_1)(1-h_2)(\color{red}{C_1+C_2’+C_2+}M)$

where $C_2’\rightarrow$ L2 access time (note that this is different from $C_2$)

When L2 miss occurs, book formula considers only $M$, that is moving data from memory to L2. Isnt this data also moved from L2 to L1 making us add $C_2$? Also $C_2$ and $M$ are duration for moving data from L2 to L1 and memmory to L2 respectively. These are penalties. But before penalties, a miss occurs which requires $C_1$ time for L1 miss and $C_2’$ time for L2 miss. But these does not seem to have added in the book formula. I have added them as highlighted in red.

Is my equation correct or book’s equation. Or something more is going on here, which I am unaware of?

Please log in or register to answer this question.

Position:
Show:

Related questions

9 9 votes
3 answers 3 answers
3.8k
3.8k views
Pooja Palod asked Jan 31, 2016
3,763 views
A system has cache main memory and disk for virtual memory. If referenced word in cache $30$ ns to access it. If it is not in cache $80$ ns to load it in cache and refere...
0 0 votes
0 0 answers
478
478 views
Harsh Kumar asked Sep 29, 2018
478 views
What events happen when we say that a cache at level i is accessed? (I am able to use the cache formulas as given in textbooks and also most of the times, I arrive at the...
0 0 votes
0 0 answers
843
843 views
Markzuck asked Dec 21, 2018
843 views
please explain how hit ratio of L2 is taken as 0.5? instead of 0.9 as 10 misses are mentionedis it like as 20 misses at levle 1 out of which only 10 missed at level 2, so...
3 3 votes
2 answers 2 answers
5.0k
5.0k views
Samujjal Das asked Jan 22, 2017
5,040 views
Assume that a system is using write-through cache. It has 70% write hits. The cache operates in look-aside mode with a read-hit ratio of 80%. The program run on the syste...