search
Log In
0 votes
165 views
Consider a scenario, where there is 2 level cache in a memory hierarchy.

1)Now here if we take 1.4 memory accesses per instruction, that means if there are 100 instructions, then there will be 140 memory accesses. Here my question is how memory accesses can be more than number of instructions?

2)Secondly, suppose for this application, the miss rate of L1 cache is 0.1. What is meaning of miss rate here? Is miss rate on instructions or miss rate on memory accesses? If it is miss rate on memory accesses, why not we calculate it miss rate on number of instructions?

3)Here in the (level 2 cache) L2 cache experiences, on average, 6 misses per 1000 instructions. Now,  here 1000 instruction is for level 2 cache, but why we will take it as total number of instruction present in memory? I mean memory can work on 2000 instruction too, but only 1000 is for L2 cache . right?

4) What miss rate is for L1,L2 and total in this memory hierarchy? Is it not number of misses in total number of instructions?
in CO and Architecture
edited by
165 views

1 Answer

1 vote
 
Best answer

To begin with, you forgot to include a reference to the correct question, so here it is to help other readers

https://gateoverflow.in/118305/gate2017-1-25

Here is my best attempt to explain

1) A single instruction is divided into multiple stages (pipelined or non pipelined). These are

  • Instruction Fetch
  • Instruction Decode
  • Operand Fetch
  • Execute
  • Write Back the result

Our of above, memory access takes places in below

  • Instruction Fetch
  • Instruction Decode
  • Operand Fetch
  • Execute
  • Write Back the result

So, for a single instruction memory is access thrice. Depending upon the architecture and design, this may vary. 

2 ) A miss is a miss and is it always means that "something" could not be found on cache and thus a memory has to be accessed. This "something" can be an instruction and a data.

3) Nowhere the question says that L2 takes all instructions present in memory. So the assumption that L2 takes all instructions in memory is not correct. And if we take total instructions as 1000, then the instructions coming to L2 would be calculated appropriately (There is not a way that I know to do that though.)

4) From the answer to above question

  • L1 miss rate = 0.1
  • L2 miss rate = 0.05
  • What do you mean by "Total miss rate". Is it Instructions for which data could not be retrieved from cache ? Then we can find that using below

There were total 1400 memory references, out of which 140 were missed by L1 and out of these 140, 7 were missed by L2. So out of 1400 memory references, 7 were missed by both caches and so main memory reference had to be made. Which comes out to be 0.5 


edited by
0
yes , mostly understood

Related questions

0 votes
0 answers
1
266 views
Consider a two level memory hierarchy, L1 (cache) has an accessing time of 5 ns and main memory has an accessing time of 100 ns. Writing or updating contents takes 20 ns and 200 ns for L1 and main memory respectively. Assume L1 gives misses 20% of the time with 60% of the instructions are read only instructions. What is the average access time for system (in ns) if it uses WRITETHROUGH technique?
asked Nov 25, 2018 in CO and Architecture Shivangi Parashar 2 266 views
0 votes
0 answers
2
340 views
consider two level cache hierarchies with L1 and L2 cache.Programs refer memory 1000 times out of which 40 misses are in L1 cache and 10 misses are in L2 cache.If the miss penalty of L2 is 200 clock cycles,hit time of L1 is 1 clock cycle,and hit time of L2 is 15 clock cycles,the average memory access time is__________clock cycles.
asked Nov 25, 2018 in CO and Architecture Shivangi Parashar 2 340 views
0 votes
1 answer
3
135 views
in cache performace i have confusion about where to use which formula like for write through whether use H (tc) + (1-H) (tc+m) or H (tc) + (1-H) (m) and how to identify whether cache memory is hierarchical or not from question can anyone give me all formula related to cache performance with explanation
asked Aug 6, 2018 in CO and Architecture Rahul_Rathod_ 135 views
–1 vote
0 answers
4
272 views
What should be correct answer to this question? In solution it's option A in Carl hamacher text book it's B ? I am confused please help
asked Jun 13, 2018 in CO and Architecture vupadhayayx86 272 views
...