One Thousand Or One

A loop writes 1000 times to the same 64-byte cache line, which is already resident and clean. Nothing else touches it. Afterwards the line is evicted to make room for other data.

How many write transactions reach the next level of the hierarchy, under a write-through cache and under a write-back cache?

A

Write-through 1, write-back 1: both coalesce repeated writes to the same line and only the last value matters.

B

Write-through 1000, write-back 1.

C

Write-through 1000, write-back 1000: eviction has to flush each of the 1000 writes that were buffered.

D

Write-through 1, write-back 1000.