How to explain the results from different block sizes

cache

I vary the D-cache block size for a program. I test different block sizes for the D-cache, block sizes from 1 to 8. Size = 128 words, and blocks in sets (associativity) = 1.

Block size     1     2     4     8
Access time   30    20    15    12
Hit rate      1%    50%   75%   87%
Cycle count 34921 24241 18901 15769

Please help me explain the measurement values for hit rate and cycle count. Why does the hit rate suddently improve so much as a increase the block sizes?

Best Answer

Are these homework questions of some sort?

The hit rate goes up with block size because the first miss in a block essentially "prefetches" the rest of the block, and as long as the other items in the block get used before it is replaced (very common with sequential accesses for both instructions and data), they are automatic "hits" in the cache.

The cycle count goes down because a cache miss takes more cycles than a cache hit.