# Computing average access time

A computer has a cache memory and a main memory with the following features:


- Memory cache access time: 4 ns - Main memory access time: 80 ns - The time needed to load a line in cache is 120 ns. - Write-through policy. If the hit ratio in this computer is 95 % and the 90% of the memory accesses are read operations, what is the average access time?

It seems a bit weird to me since I have read through this site calculate the effective (average) access time (E AT) of this system but I still do not know how to do it. I would appreciate any help. Thanks!

This is just a single-level cache, then? That means just two possibilities when accessing: a hit or a miss, with hit rate + miss rate = 100%. It follows that the average is simply the time spent with hits and the time spent with misses, which comes out to:

hit rate * hit time + miss rate * miss time