Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Lord of the Cache Project 3. Caches Three common cache designs: Direct-Mapped store in exactly one cache line Fully Associative store in any cache.

Similar presentations


Presentation on theme: "The Lord of the Cache Project 3. Caches Three common cache designs: Direct-Mapped store in exactly one cache line Fully Associative store in any cache."— Presentation transcript:

1 The Lord of the Cache Project 3

2 Caches Three common cache designs: Direct-Mapped store in exactly one cache line Fully Associative store in any cache line Set Associative store in a small set of cache lines

3 VTagBlock Tag Index Offset = hit? data word select 32bits Byte offset Direct-mapped Cache

4 VTagBlock word select hit? data line select ==== 32bits 64bytes Tag Offset Fully Associative Cache

5 word select hit?data line select == 32bits 64bytes TagIndexOffset 2-way Set Associative Cache

6 word select hit?data line select === 32bits 64bytes TagIndexOffset 3-way Set Associative Cache

7 Cache Misses Cold (aka Compulsory) Miss Line is being referenced for the first time Avoid by prefetching Conflict Miss Line was in the cache, but has been evicted because of another access with the same index Avoid by increasing cache associativity Capacity Miss line was in the cache, but has been evicted because the cache is too small Avoid by increasing cache size

8 Cache Write Policies Write-Through Updates to a block in cache are immediately written through to memory Write-Back Updates to a block in cache are only written back to memory when that block is evicted


Download ppt "The Lord of the Cache Project 3. Caches Three common cache designs: Direct-Mapped store in exactly one cache line Fully Associative store in any cache."

Similar presentations


Ads by Google