VMIVME-7750-466000 Associate the cache with a four-way group
In order from simple to complex:
Direct mapping cache – good at best, unpredictable at worst
Bidirectional group association cache
Bidirectional skew association cache [13]
Four-way group association cache
Eight way group association cache, a common choice for later implementation
A 12-way group is associated with a cache, similar to an 8-way group
Full association cache – the best no hit ratio, but only for a small number of entries
Map the cache directly
In this cache organization, each location in main memory can enter only one entry in the cache. Therefore, a direct mapped cache can also be called a “unidirectional group association” cache. It does not have such a placement policy because it is impossible to choose which cache entry’s contents to evict. This means that if two locations are mapped to the same entry, they may constantly weed each other out. Although simpler, a directly mapped cache needs to be much larger than an associative cache to provide comparable performance, and it is less predictable. Let x be the block number in the cache, y be the block number in memory, and n be the number of blocks in the cache, then map x=y to modern n using the following equation.