There are many factors that define a Cache Architecture. Here is a framework to follow.
Where can a Block be placed?
| Scheme Name | Number of Sets | Blocks per Set |
|---|
| Direct Mapped | Number of blocks in Cache | 1 |
| Set Associative | Number of blocks in cache/Associativity | Associativity (typically 2-16) |
| Fully Associative | 1 | Number of blocks in Cache |
How is a Block found?
| Scheme Name | Location Method | Comparisions 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 |
Which Block is replaced?
| Policy | Replacement |
|---|
| Random | Pseudorandom block numbers |
| FIFO | Oldest block |
| NMRU | Randomly selected from all blocks except the LRU |
| LRU | Block that has been unused for the longest time |
What happens on a Write?
| Scheme | Changes | Allocate |
|---|
| Write-through | Update Cache and Memory | No-write Allocate |
| Write-back | Update only Cache | Write Allocate |
Design Changes
| Design Change | Effect on Miss Rate | Possible negative perfor- mance effect |
|---|
| Increase Cache Size | Decreases Capacity Misses | May increase Access Time |
| Increase Associativity | Decreases Miss Rate due to Conflict Misses | May increase Access Time |
| Increase Block Size | Decreases miss Rate for a wide range of Block Sizes due to Spatial Locality | Increases Miss Penalty. Very large Block could increase Miss Rate |