The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
A CPU uses two levels of caches L1 and L2. It executes two types of
jobs J1 and J2. Their details are as follows:
(A) J1 comes with a probability of 0:3 and requires 2000 memory references,
all for reading. For J1, there are 100 misses in L1 and 60
misses in L2.
(B) J2 comes with a probability of 0:7 and requires 3000 memory references,
all for reading. For J2, there are 50 misses in L1 and 70
misses in L2
The L1 hit time is 2 cycles and the L2 hit time is 10 cycles. The L2 miss
penalty is 200 cycles. What is the average memory access time?


Please Sir help me with this .. I am really getting confused about how to approach for this question .
posted May 2, 2016 in CO & Architecture by (25 points) | 338 views


It is very easy to solve - if you have not studied any formula and knows how cache works. You can see numerous questions of this type being answered here:

Now, try solving this.
As far as I understand, Average memory access time in this case should be,

$ (0.3 * 2000 + 0.7 * 3000)* \{(1 - \frac{100}{2000}) * 2 + (\frac{100}{2000}) * (1 - \frac{60}{2000}) * 10 + (\frac{100}{2000} * \frac{60}{2000} ) * 200\}$

I am not sure if we should include for example, L1 access time when it has a miss and eventually finds the content in L2 instead?
Yes, we should include by default as most caches work sequentially.
ans is 5907ms

0.3(2000(99*2/100+(1/100((59*10/60)+200/60)))) for j1

0.7(3000(49*2/50+(1/50(69*10/70 +(200/70)))))  for j2

thus j1+j2=5907ms
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

36,136 questions
43,587 answers
42,832 users