Cache Memory


Answer & solution
Answer: C (no official key was published)
1. Approach. Convert the starting address to a block number and count all touched blocks, including the partial final block. For the second scan, identify conflicts modulo the 32 cache lines instead of treating all 40 blocks as compulsory misses again.
2. Derivation and interpretation. Assuming each complete pass reads the array in increasing memory-address order, the 2500-byte array begins at 0x1100=4352, a 64-byte boundary. It spans ceil(2500/64)=40 blocks, numbered 68 through 107. The cold first pass misses 40 times. In the 32-line direct-mapped cache, blocks 68–75 and 100–107 compete for lines 4–11. In the second pass, loading 68–75 evicts 100–107, so both groups miss again, while the other 24 blocks hit. Total 40+8+8=56, option C. Merely saying the complete array is accessed does not specify traversal order; different orders can produce different miss counts.