For a given piece of code, the hit ratio of first cache is 0.1 and the hit ratio of second cache is 0.3. The time required to access the first cache is 10 nanoseconds, the second cache is 100 nanoseconds, and the time to access the underlying physical memory is 1 microsecond, what is the effective memory access time for the piece of code?

Respuesta :

Answer:

effective memory access = 658 ns

Step-by-step explanation:

GIven data:

Effective memory access time is given as

[tex] = [H_1*T_1]+[(1-H_1)*H_2*T_2]+[(1-H_1)(1-H_2)*H_m*T_m][/tex]

from the data given above we have

[tex]H_1 = 0.1[/tex]

[tex]H_2 = 0.3[/tex]

[tex]T_1 = 10 ns[/tex]

[tex]T_2 = 100 ns[/tex]

hit rate, [tex]H_m = 1 ns[/tex]

access time [tex]= T_m = 1000 ns[/tex]

Plugging all information in above formula to get the effective memory access

[tex]= 0.1\times 10 + 0.9\times 100+ 0.9 \times 0.7\times 1 \times 1000[/tex]

= 1+27+ 630

=658 ns

ACCESS MORE