Caches
Tom Kelliher, CS 240
Apr. 26, 1999
Due Wednesday May 5: 7.3 (12 pts.), 7.7 (13), 7.15 (6), 7.16 (6), 7.18
(13).
Pipelines, superscalar.
- Cache background.
- Cache design principles.
?
The memory hierarchy:
- Registers.
- Main memory.
- Disk.
- Tape and other off-line storage.
Properties: speed, size, cost:

- The idea behind caches: provide the size of the underlying level of
the hierarchy while hiding its latency.
- Why do we have caches?
- Where do we see them?
- Why do they work? Locality.
- The measure of cache effectiveness: hit rate.
Data cache hit rates for MediaBench:

Instruction cache hit rates for MediaBench:

Measuring effective access time.
Types of caches:
- Direct-mapped caches.
- Set-associative caches.
- Fully associative caches.
Design considerations:
- Block (or line) size. Spatial locality.
- Memory width. Interleaving.
- Replacement policies: FIFO, Optimal, LRU.
Thomas P. Kelliher
Mon Apr 26 10:54:45 EDT 1999
Tom Kelliher