• edited by
44,283 views
82 82 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$

13 Answers

Best answer
106 106 votes

Average memory access time

$ =  h_1 \times t_1 + (1-h_1) \times h_2 \times (t_2 + x_1)  + (1-h_1) (1-h_2)  (t_m + x_1 + x_2)$

Here, $x_1$ and $x_2$ are the search times for $L_1$ and $L_2$ caches respectively and as per the question we can consider them as $0.$

So, average memory access time
$ = 0.8\times 1 + 0.2 \times 0.9 \times 10 +  0.2 \times 0.1 \times 500$
$= 12.6ns.$

Option C.

• edited by
27 27 votes

Answer must be C - 12.6ns

"ignoring the search time within the cache" means on L1 miss, we access L2, but we ignore the time it took to detect L1 miss. Similarly, on L2 miss, we access main memory, but we ignore the time it took to detect L1 miss & L2 miss.

So, Average access time of the system (ignoring the search time within the cache) = $(0.8)(1) + (0.2)(0.9)(10) + (0.2)(0.1)(500) $

=  $12.6ns$

NOTE: The above formula has nothing to do with so-called "simultaneous access" or "look-aside cache".. It's All hierarchical only.. NO famous Standard Book mentions any concept called "simultaneous access" or "look-aside cache".. These concepts exists but in theory, and NO GATE PYQ is based on them. In ALL GATE PYQs, it's Always Hierarchical access only (look through).

24 24 votes
option C

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

tm- main memory access time
14 14 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
3 3 votes
Average access time = [H1 * T1] + [(1 - H1) * Hm * Tm]
H1 = 0.8, (1 - H1) = 0.2
H2 = 0.9, (1 - H2) = 0.1
T1 = Access time for level 1 cache = 1ns
T2 = Access time for level 2 cache = 10ns
Hm = Hit rate of main memory = 1
Tm = Access time for main memory = 500ns
Average access time = [(0.8 * 1) + (0.2 * 0.9 * 10) + (0.2)(0.1) * 1 * 500]
= 0.8 + 1.8 + 10
= 12.6ns
Answer:
Position:
Show:

Related questions

61 61 votes
5 answers 5 answers
24.9k
24.9k views
Ishrat Jahan asked Nov 2, 2014
24,895 views
Consider a fully associative cache with $8$ cache blocks (numbered $0-7$) and the following sequence of memory block requests:$4, 3, 25, 8, 19, 6, 25, 8, 16, 35, 45, 22, ...
73 73 votes
10 answers 10 answers
23.7k
23.7k views
Ishrat Jahan asked Nov 2, 2014
23,708 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{R...
78 78 votes
8 answers 8 answers
38.7k
38.7k views
Ishrat Jahan asked Nov 2, 2014
38,722 views
The storage area of a disk has the innermost diameter of $10$ cm and outermost diameter of $20$ cm. The maximum storage density of the disk is $1400$ bits/cm. The disk ro...
36 36 votes
3 answers 3 answers
12.4k
12.4k views
Ishrat Jahan asked Nov 2, 2014
12,431 views
A CPU has only three instructions $I1, I2$ and $I3,$ which use the following signals in time steps $T1-T5$:$I1 : T1$ : Ain, Bout, Cin $T2$ : PCout, Bin $T...