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

Average Memory Access Time (AMAT)

Learn the AMAT formula combining hit time, miss rate, and miss penalty to quantify cache effectiveness.

What You'll Learn

You'll learn how to use the Average Memory Access Time (AMAT) formula to calculate the overall performance cost of accessing memory with a cache.

Why AMAT Matters

Now that you understand hit rates, miss rates, and how caches work, you need a single metric to measure cache effectiveness. AMAT combines all the key factors—hit time, miss rate, and miss penalty—into one number that tells you the average time to access data.

The AMAT Formula

The formula is straightforward:

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

Where:

  • Hit Time = time to access data when it's in the cache (fast, e.g., 1 cycle)
  • Miss Rate = fraction of accesses that miss the cache (e.g., 0.05 = 5%)
  • Miss Penalty = extra time to fetch from main memory on a miss (slow, e.g., 100 cycles)

Working Through an Example

Suppose your system has:

  • Hit time: 2 cycles
  • Miss rate: 10% (0.10)
  • Miss penalty: 50 cycles
AMAT = 2 + (0.10 × 50)
AMAT = 2 + 5
AMAT = 7 cycles

Even though hits are fast (2 cycles), the occasional miss drags the average up to 7 cycles.

The Insight

AMAT shows why even a small miss rate matters. A 1% miss rate with a 100-cycle penalty adds 1 cycle to every access on average. Cache designers use AMAT to evaluate trade-offs: larger caches reduce miss rate but might increase hit time slightly.

Key Takeaway: AMAT = Hit Time + (Miss Rate × Miss Penalty) quantifies cache performance by averaging the cost of hits and misses into a single, meaningful metric.