Course contentsShow
← Computer Science
Lesson 1115 of 2,87226. Memory Hierarchy and CachingFree lesson

Effective Access Time Calculation

Computing average memory access time using hit rates, hit times, and miss penalties.

Effective Access Time Calculation

You'll learn how to compute the average time it takes to access memory when caching is involved.

Now that you understand hit rate and miss penalty, you can calculate the real-world average time it takes to retrieve data from your memory hierarchy. This is called Effective Access Time (EAT), and it combines the best-case scenario (cache hit) with the worst-case (cache miss) weighted by how often each occurs.

The Formula

The basic formula is:

EAT = (Hit Rate × Hit Time) + (Miss Rate × Miss Penalty)

Remember that Miss Rate = 1 - Hit Rate, so you can also write:

EAT = (Hit Rate × Hit Time) + ((1 - Hit Rate) × Miss Penalty)

Breaking It Down

Think of EAT like calculating your average commute time when you sometimes catch the express train (cache hit) and sometimes have to take the local (cache miss).

  • Hit Time: How fast you access data when it's in the cache (e.g., 2 nanoseconds)
  • Miss Penalty: Total time when data isn't in cache — you must go to slower memory (e.g., 100 nanoseconds)
  • Hit Rate: Percentage of accesses that find data in cache (e.g., 0.95 or 95%)

Example: If your cache has a 95% hit rate, 2ns hit time, and 100ns miss penalty:

EAT = (0.95 × 2ns) + (0.05 × 100ns) = 1.9ns + 5ns = 6.9ns

Without the cache, every access would take 100ns. With caching, your average drops to just 6.9ns!

Key Takeaway: Effective Access Time quantifies the performance benefit of caching by averaging hit time and miss penalty weighted by their probabilities—a small hit time with high hit rate dramatically reduces overall memory latency.