Caches

Tom Kelliher, CS 240

Apr. 26, 1999

Administrivia

Announcements

Assignment

Due Wednesday May 5: 7.3 (12 pts.), 7.7 (13), 7.15 (6), 7.16 (6), 7.18 (13).

From Last Time

Pipelines, superscalar.

Outline

  1. Cache background.

  2. Cache design principles.

Coming Up

?

Caches

The memory hierarchy:

  1. Registers.

  2. Main memory.

  3. Disk.

  4. Tape and other off-line storage.

Properties: speed, size, cost:

  1. The idea behind caches: provide the size of the underlying level of the hierarchy while hiding its latency.

  2. Why do we have caches?

  3. Where do we see them?

  4. Why do they work? Locality.

  5. The measure of cache effectiveness: hit rate.

    Data cache hit rates for MediaBench:

    Instruction cache hit rates for MediaBench:

    Measuring effective access time.

Cache Design Considerations

Types of caches:

  1. Direct-mapped caches.

  2. Set-associative caches.

  3. Fully associative caches.

Design considerations:

  1. Block (or line) size. Spatial locality.

  2. Memory width. Interleaving.

  3. Replacement policies: FIFO, Optimal, LRU.



Thomas P. Kelliher
Mon Apr 26 10:54:45 EDT 1999
Tom Kelliher