Similar questions 2 more →
Cache Memory

Answer & solution
Official answer: 76.0
Our answer: 76
1. There are 256/2=128 sets. Block number modulo 128 puts {0,128,256} in set 0 and {1,129,257} in set 1; each set holds only two blocks.
2. For the first set-0 subsequence 0,128,256,128,0,128,256,128 the outcomes are compulsory,compulsory,compulsory,hit,conflict,hit,conflict,hit. LRU ends with 256 then 128 from least to most recent. Set 1 behaves identically.
3. Each later subsequence starts with those two survivors: accesses to its first,third,fifth,seventh entries miss, all now conflicts. Thus repetition 1 has four conflicts total, and each of nine later repetitions has eight. Total=4+9×8=76 conflicts, alongside six compulsory misses.