The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+43 votes
6.6k 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 ________.
asked in CO & Architecture by Veteran (400k points)
retagged by | 6.6k views
+3

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

0
this question is from basics of "local miss rate and global miss rate "

here local miss rate is asked

6 Answers

+103 votes
Best answer

Answer = $0.05$.

answered by Veteran (58k points)
edited by
+1
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 ???

+19
  • 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.
+3
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
+3
GMR(L2)=7/1400
+14 votes
total number of memory reference = 1000 * 1.4 = 1400

reference to l2 cache = .1 * 1400 = 140

now miss rate = 7/140 = .05
answered by (385 points)
+3 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
answered by Active (4k points)
0


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

0 votes
7*100/(1000*1.4) =.5
answered 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
–5 votes
miss of L2=7/1000=.007=.01
answered by (279 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
answered by (37 points)
Answer:

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
49,434 questions
53,630 answers
186,007 comments
70,898 users