167k views
5 votes
A system has a level 1 cache and a level 2 cache. The hit rate of the level 1 cache is 90% and the hit rate of the level 2 cache is 80%. An access to level 1 cache requires 1 cycle, an access to level 2 cache requires 4 cycles, and an access to main memory requires 50 cycles. What is the average access time?

(A) 1.32
(B) 2.22
(C) 5.26
(D) 19.32

1 Answer

0 votes

Answer:

B) 2.22

Step-by-step explanation:

In a first step, the system will look in cache number 1. If it is not found in cache number 1, then the system will look in cache number 2. Finally (if not in cache 2 also) the system will look in main memory.

The average access time will take into consideration success in cache 1, failure in cache number 1 but success in cache number 2, failure in cache number 1 and 2 but success in main memory.

Mathematically we can write it into the following equation :


AAT=(H1.T1)+(1-H1).H2.T2+(1-H1).(1-H2).Hm.Tm

Where AAT is the average access time

H1,H2 and Hm are the hit rate of cache 1,cache 2 and main memory respectively.

T1,T2 and Tm are the access time of cache 1, cache 2 and main memory respectively

Hm = 1


AAT=(0.9).(1)+(1-0.9).(0.8).(4)+(1-0.9).(1-0.8).(1).(50)=0.9+0.32+1=2.22


AAT=2.22

Therefore, option b) is the correct.

User Samuel Cole
by
6.1k points