In: Computer Science
Solution:
Given,
=>Access time of cache(C) = 6 ns
=>Access time of main memory(M) = 40 ns
=>Hit ratio(H) = 0.9
Explanation:
Principle of cache improves the performance of memory access:
=>Some frequently accessed addresses are kept inside cache memory so when CPU requests those frequent addresses then it can be directly retrieved from cache memory without checking in main memory. If the address is not available in cache memory then it is called cache miss and then address is accessed from main memory. This is how performance of main memory increases because effective access time decreases.
Calculating effective access time(EAT):
=>By default heirarchial access is used.
=>Effective access time(EAT) = H*(C) + (1-H)*(C+M)
=>Effective access time(EAT) = 0.9*6 ns + (1-0.9)*(6 ns + 40 ns)
=>Effective access time(EAT) = 5.4 ns + 0.1*46 ns
=>Effective access time(EAT) = 5.4 ns + 4.6 ns
=>Effective access time(EAT) = 10 ns
=>Hence effective access time(EAT) = 10 ns
I have explained each and every part with the help of statements attached to the answer above.