Scheme Name | Number of Sets | Blocks per Set |
---|---|---|
Direct mapped | Number of blocks in cache | 1 |
Set associative | Number of blocks in the cache / Associativity | Associativity (typically 2-16) |
Fully associative | 1 | Number of blocks in the cache |
The largest gains are obtained in going from direct mapped to two-way set associative. Smaller caches obtain a significantly larger absolute benefit from associativity because the base miss rate of a small cache is larger. |
Associativity | Location Method | Comparisons Required |
---|---|---|
Direct mapped | Index | 1 |
Set associative | Index the set, search among elements | Degree of associativity |
Fully associative | Search all cache entries | Size of the cache |
Separate lookup table | 0 |