in CO and Architecture edited by
29,444 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$
in CO and Architecture edited by
29.4k views

4 Comments

Then i don't know, how they did
0
0

This is from @Ayush Upadhyaya's comment from this question.

Hierarchical Access is being used but the formula used is above is bit simplified form of what we usually see for hierachical access.
 

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

= h1.t1+ (1-h1)h2.t1 + (1-h1)(1-h2)t1
+ (1-h1)h2.t2 + (1-h1)(1-h2)t2
+(1-h1)(1-h2)tm

= h1t1 + (1-h1)t1[h2+(1-h2)]
+(1-h1)t2[h2 + (1-h2)]
+(1-h1)(1-h2)tm

=t1 [h1 + (1-h1)]
+ (1-h1)t2
+(1-h1)(1-h2)tm

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

I hope it helps. :)

1
1

You can refer the following problems:

A cache memory needs an access time of 30 ns and main memory 150 ns, what is the average access time of CPU (assume hit ratio = 80%)?

The answer is 60 ns

What hit ratio is required to reduce the effective memory access time from 200 ns to 140 ns if the cache access time is 20 ns?

The answer is 40%

In both the problems they have given the average (or effective) memory access time as

Effective memory access time = (hit rate x cache access time) + { miss rate x (cache access time + memory access time)}

But in the present problem, they have not considered the access time of the previous levels. Why?

0
0

8 Answers

1 vote
1 vote
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
0 votes
0 votes
How m i suppose to find out if it’s simultaneous access or hierarchal...
0 votes
0 votes

…………………………………………………….

0 votes
0 votes
ignoring the search time within the cache this line clearly states that it is simultaneous access

therfore formula to be used is

=H1*tL1+(1-H1)H2tL2+(1-H1)(1-H2)tmm

by this formula answer is 12.6ns  option C
Answer:

Related questions