CPUs and architecture
Which correctly describes a set-associative cache?
- AData for a given address can be placed in any of several locations (ways) within a fixed set
- BData for a given address can be placed in only one location in the cache
- CData can be placed anywhere in the cache
Show answer and explanation
Answer: A. Data for a given address can be placed in any of several locations (ways) within a fixed set
In a set-associative cache, the address selects a set, and the data can be placed in any of several ways within that set. This reduces misses caused by competition for the same location (conflict misses) compared with a direct-mapped cache, which has only one possible location. Being able to place data anywhere is a fully associative cache.
- A. Correct. It can be placed in several ways within a fixed set.
- B. Only one possible location is a direct-mapped cache.
- C. Being able to place data anywhere is a fully associative cache.