Cache Memory



Answer & solution
Answer: A (no official key was published)
1. Approach. Map each memory block to block_number mod 32. Forty sequential blocks exceed the cache by eight, so identify which eight line indices are used twice rather than assuming that replacements start at line zero.
2. Derivation and interpretation. With increasing-address scans as in Q80, the array occupies blocks 68–107. Modulo 32, the first eight blocks 68–75 and final eight 100–107 both map to cache lines 4–11. Only those lines are replaced in the second scan, first by 68–75 and later by 100–107. Answer A. Lines are numbered from zero; the result is conditional on the scan-order assumption omitted from the common statement.