edited by
29,286 views
53 votes
53 votes
Consider a system with $2$ level cache. Access times of Level $1$ cache, Level $2$ cache and main memory are $1$ $ns$, $10$ $ns$, and $500$ $ns$ respectively. The hit rates of Level $1$ and Level $2$ caches are $0.8$ and $0.9$, respectively. What is the average access time of the system ignoring the search time within the cache?
  1. $13.0$
  2. $12.8$
  3. $12.6$
  4. $12.4$
edited by

8 Answers

Best answer
80 votes
80 votes

By default we consider hierarchical access - because that is the common implementation and simultaneous access cache has great practical difficulty. But here the question is a bit ambiguous -- it says to ignore search time within the cache - usually search is applicable for an associative cache but here no such information given and so we can assume it is the indexing time in to the cache block.

Access time for hierarchical access, 

$ =  t_1 + (1-h_1) \times t_2 + (1-h_1) (1-h_2) t_m$
$ = 1 + 0.2 \times 10 +  0.2 \times 0.1 \times 500$
$= 13ns.$

Option A.

PS: We should follow simultaneous access only when explicitly mentioned in question as hierarchical access is the default in standard books.

edited by
20 votes
20 votes
option C

t1 * h1 + (1- h1) h2 t2 + (1-h1) (1-h2) tm

tm- main memory access time
9 votes
9 votes
given  " ignoring the search time within the cache " it is applicable for associative and set associative mapping any way we will ignore it :
hierarchical access time : h1t1 + (1−h1)×h2×(t1+t2) + (1−h1)(1−h2)(tm+t1+t2)
                                              ans  13ns
simultaneous access time :  h1t1 + (1−h1)×h2×(t1) + (1−h1)(1−h2)(tm)
                                          ans 12.6ns
2 votes
2 votes

Tavg=h1xT1+(1-h1)xh2xT2+(1-h1)(1-h2)Tm

Tavg=1x0.8+0.2*0.9*10+0.2*0.1*500=12.6ns

Answer:

Related questions

34 votes
34 votes
3 answers
1
43 votes
43 votes
6 answers
2
Ishrat Jahan asked Nov 2, 2014
12,130 views
Consider the following schedule $S$ of transactions $T1$ and $T2:$$${\begin{array}{l|l}\textbf{T1}& \textbf{T2} \\\hline\text{Read(A)} \\\text{A = A – 10}\\& \text...