1 votes 1 votes Suppose that in 1000 memory references there are 150 misses in first level and 100 misses in second level cache. Assume that miss penalty from L2 cache to memory is 120 cycles. The hit time of L2 cache is 50 cycles. If there are 4 memory references per instruction, the average stall per instruction is Jhunjhunuwala asked Nov 26, 2015 Jhunjhunuwala 1.5k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 4 votes 4 votes Tavg stall/ints = Miss in L1/int * Hit in L2 + Miss in L2/int * Miss Penality in L2(memory access ) here 4 memory for 1 instruction so for 1000 memory = 1000/4 = 250 Miss in L1 = 150 Miss in L2 = 100 Hit time L2 = 50 Miss penalty L2 = 120 therefore Tavg stall/ints = $\frac{150}{250}$*50 + $\frac{100}{250}$*120 = 78 Umang Raman answered Nov 26, 2015 • selected Nov 29, 2015 by Jhunjhunuwala Umang Raman comment Share Follow See all 4 Comments See all 4 4 Comments reply Arjun commented Nov 27, 2015 reply Follow Share So, there is no stall if a memory reference is an L1 hit? 0 votes 0 votes Umang Raman commented Nov 28, 2015 reply Follow Share stalls are for misses i think. 0 votes 0 votes Rahul Jain25 commented Dec 9, 2016 reply Follow Share @Arjun sir, correct me if i am wrong (150/250)×50 + (150/250)(100/250)×(120) This should be the answer because memory will be accessed only when miss in L1and L2. 0 votes 0 votes phelps18 commented Jan 15, 2018 reply Follow Share why miss rate is not 100/150 here? since actually out of 150 times 100 times memory access is occuring and rest 50 times l2 cache is being accesed. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes 4 memory references → 1 instruction 1000 memory references → ? instructions. Number of instructions = 10004=250 [# # ]=[# 1# ×ℎ 2]+[# 2# × 2] =[150250×50]+[100250×120] =[30+48]=78 Paras Nath answered Sep 15, 2016 Paras Nath comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Simplest Approach! Just think how we can get stall, if I went to L1 and I get a miss then to overcome it either go to L2 and rectify it or you went to L2 and you also get a miss there. (150/250) [ 50+ (100/150)*120)= 78. Sahil Arora answered Apr 5, 2019 Sahil Arora comment Share Follow See all 0 reply Please log in or register to add a comment.