The Gateway to Computer Science Excellence
+48 votes
7.4k views
Consider a two-level cache hierarchy with $L1$ and $L2$ caches. An application incurs $1.4$ memory accesses per instruction on average. For this application, the miss rate of $L1$ cache is $0.1$; the $L2$ cache experiences, on average, $7$ misses per $1000$ instructions. The miss rate of $L2$ expressed correct to two decimal places is ________.
in CO and Architecture by Veteran (425k points)
retagged by | 7.4k views
+5

Although the question should have been more specific when they talk about L2 miss(7 miss per 1000 instruction) but still

8 Answers

+114 votes
Best answer

Answer = $0.05$.

by Veteran (57k points)
edited by
+2
how 1000 instructions from cpu to L1 ??
0
Actually is the 1400 Mem access request to L1 . I have showed 1000 instruction as in the question.
0

I M NOT getting .... 1.4 mem ref was given u hv done 1400... i m not getting anything..

OK...i got 1000* 1.4 = 1400

but then from L1 to L2  .. how 140 ???

+23
  • An application incurs 1.4 memory accesses per instruction on average & Total instruction are 1000 so total number of memory references = 1.4 * 1000 = 1400
  • The miss rate of L1 cache is 0.1  i.e. out of 1400 ,0.1% miss so 1400* 0.1= 140
  •  the L2 cache experiences, on average, 7 misses out of 140 miss in cache L1 = 7/140 = 0.5.
  1. Note since we are moving toward main memory and secondary memory miss rate is decreases.
  2. Miss rate =  number of misses /total number of accesses
+1
Ans is 0.05 and not 0.5 ,right?

@Debashish

miss rate of L2 means, miss rate of L2 instruction w.r.t total instruction in L1 or total instruction in main memory?

As it is given miss rate w.r.t 1000 instruction and u r calculating miss rate w. r. t L1 cache instruction
+2
because only 0.1*1400 = 140 will reach to L2. Because miss rate of L1 is 0.1.
+1
Why we are not making it as 7/1000 as 7 inst are missing out of 1000

So , out of 140 instruction

 (7/1000)*140.

Please advise.
+4
Hello krishna

140 are not instructions , they are #of memory accesses.Convert 1000 instructions into # of memory accesses for $L_{2}$ cache , $L_{2}$ cache will only be accesses when there is a miss case for $L_{1}$ cache.
+2
@Krishna 1000 instructions are there out of which total number of memory reference = 1000 * 1.4 = 1400

Now 1400 L1 have miss rate of 0.1 so

reference to l2 cache = .1 * 1400 = 140.  That is 140 instructions are referring L2 cache out of which 7 are miss.

now miss rate = 7/140 = .05
0
The answer is 0.05 not 0.5...
0

in question given .... 7 misses per 1000 instructions 

my doubt is....... how do you know that these 7 are memory references misses ?

0
When there is a  memory reference then definitely cache memory is accessed first.. If the word is not present in the cache then it is definitely the case of cache miss...
+3
They are asking Local Miss rate of $L_2$. The Global miss rate for $L_2$=0.005
0
please explain how will we calculate global miss rate

is it 7/1000

and why 0.005
+5
GMR(L2)=7/1400
+15 votes
total number of memory reference = 1000 * 1.4 = 1400

reference to l2 cache = .1 * 1400 = 140

now miss rate = 7/140 = .05
by (375 points)
+8 votes
Best explanation found

Since , it is given in question that for 1 instruction it takes 1.4 memory access(ma)

So, for 1000 instr. it will take =1000* 1.4 ma= 1400 ma

Now , it is given for l1 cache miss rate(mr) = 0.1

and since , we know mr=no. of misses/total no. of ma

so, 0.1=no. of misses/1400

thus, no. of misses of l1 =140

As , we know when there is miss in l1 , we search for data in l2

so, now for l2 cache total no. of ma=140, and it is given there is 7 miss

so , mr for l2 cache=7/140=1/20=0.05
by Active (4.6k points)
+1


As , we know when there is miss in l1 , we search for data in l2

Thank you. This clearified my doubt :)

0

@Shamim Ahmed

Welcome

+1 vote

I really think that for an exam as prestigious as GATE, this question is worded very poorly.

the L2 cache experiences, on average, 7 misses per 1000 instructions. The miss rate of L2 expressed correct to two decimal places is ....

One can argue that it is 7/1000 = 0.007

I.e. per 1000 instructions given to L2, it misses 7 of them.

But the question actually says, per 1000 instructions given to L1L2 ultimately misses 7 of them.

 

So, give L1 1000 instructions

=> 1400 memory accesses

=> Missed 140 memory accesses.

 

These 140 accesses would pe passed through L2 because of the hierarchy, and L2 would miss 7 of them.

So miss rate of L2 = 7/140 = 0.05.

 

PS: If 0.05 wasn't in the official answer key, I'd never have believed it to be the answer. One of the rare poorly worded GATE question.
by Active (2.2k points)
0 votes
7*100/(1000*1.4) =.5
by Active (1.4k points)
edited by
0
why percentage?
0
yes exactly i also got 0.005 but didnt converted it to percentage..so why percentage when they have not mentioned to input answer in %age?
+1
I dont know why i kept 0.5 in the exam
0 votes
1.4 memory access per inst so for 1000 inst. we have 1400 memory accesses.

Now,all the 1400 memory accesses will be first to L1 then if there is a miss they will go to L2.

number of memory access on L2 for 1000 instructions = 0.1 * 1400 = 140

miss rate = no. of misses/total no. of memory accesses = 7/140 = 0.05
by (97 points)
–5 votes
miss of L2=7/1000=.007=.01
by (249 points)
–5 votes
total number of memory reference = 1000 * 1.4 = 1400

so there are 7 misses for 1400 so misses for 100 = 700/1400 = 0.5

No need to multiply it with 0.1 because in question they asked miss rate of L2 only not combine.

 

So answer is 0.5
by (37 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,508 answers
195,529 comments
100,966 users