Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A computer has a two-level cache for which 80% of all memory references hit at l

ID: 3552113 • Letter: A

Question

A computer has a two-level cache for which 80% of all memory references hit at level 1,

15% hit at level 2, and 5% miss all together. Suppose the access times are 5, 15, and 60

nanoseconds, respectively, where the times for the level 2 cache and main memory first

start counting at the moment it is known they are needed (i.e., a level 2 cache access

time incurs the overhead of the level 1 cache miss, main memory is not accessed until a

level 2 cache access has failed). Also, it takes equally long to determine a miss as it

does to determine a hit.

(a) What is the expected access time?

(b) What is the relative performance gain from having the level 2 cache?

Hints: For (a) compute the weighted sum called E(X) below of hit rates (probabilities)

and access times (values). For (b) repeat without the level 2 cache and compare with

the result from (a).

Explanation / Answer

a)Expected acess time=0.8*5+0.15*15+0.05*60
                    =9.25 nanoseconds
b)if there is no level 2:
Expected acess time=0.8*5+0.2*60
                    =16 nanoseconds
Performance gain=16-9.25=6.75nanoseconds

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote