In designing a computer's cache system, the cache block (or cache line) size is an important parameter. Which one of the following statements is correct in this context?
View worked solution
Answer: D
To determine the correct statement, let us analyze each option in the context of cache design parameters:
- Option A (Incorrect): Spatial locality states that if a memory location is accessed, nearby locations are likely to be accessed soon. A larger block size brings more neighboring data into the cache on a miss, thereby exploiting spatial locality better. A smaller block size reduces this advantage.
- Options B & C (Incorrect):
Let the cache size be , block size be , and associativity be .
- The number of sets is .
- The number of index bits is .
- The number of offset bits is .
- The tag size per line is: This shows that the tag size per cache line is independent of the block size .
- However, because the block size is smaller, the number of cache lines () increases. Consequently, the total tag overhead (total tag bits across all lines) increases. Thus, B and C are incorrect.
- Option D (Correct): The cache miss penalty is the time required to bring a block from the main memory to the cache. This time consists of the memory latency (access time) plus the transfer time. Since the transfer time is directly proportional to the block size, a smaller block size requires transferring fewer bytes, which results in a lower cache miss penalty.
Free practice · Your answers on this page are not saved.
