3/28/17 1
Cache Performance
Samira Khan March 28, 2017
Agenda
- Review from last lecture
- Cache access
- Associativity
- Replacement
- Cache Performance
Cache Abstraction and Metrics
- Cache hit rate = (# hits) / (# hits + # misses) = (# hits) / (# accesses)
- Average memory access time (AMAT)
= ( hit-rate * hit-latency ) + ( miss-rate * miss-latency )
3 Address Tag Store (is the address in the cache? + bookkeeping) Data Store (stores memory blocks) Hit/miss? Data
Direct-Mapped Cache: Placement and Access
- Assume byte-addressable memory: 256 bytes, 8-byte blocks
à 32 blocks
- Assume cache: 64 bytes, 8 blocks
- Direct-mapped: A block can go to only one location
- Addresses with same index contend for the same location
- Cause conflict misses
4 Tag store Data store
Address tag index byte in block 3 bits 3 bits 2b V tag
=?
MUX
byte in block
Hit? Data 00 | 000 | 000 - 00 | 000 | 111 Memory 01 | 000 | 000 - 01 | 000 | 111 10 | 000 | 000 - 10 | 000 | 111 11 | 000 | 000 - 11 | 000 | 111 11 | 111 | 000 - 11 | 111 | 111 B A