Question:medium

Assume a two-level inclusive cache hierarchy, L1 and L2, where L2 is the larger of the two. Consider the following statements:
\[ S_1:\ \text{Read misses in a write-through L1 cache do not result in writebacks of dirty lines to the L2.} \] \[ S_2:\ \text{Write allocate policy must be used in conjunction with write-through caches and no-write allocate policy is used with writeback caches.} \] Which of the following statements is correct?

Show Hint

Write-through caches never have dirty blocks; policy pairings like write-allocate are common but not compulsory.
Updated On: Feb 2, 2026
  • \(S_1\) is true and \(S_2\) is false
  • \(S_1\) is false and \(S_2\) is true
  • \(S_1\) is true and \(S_2\) is true
  • \(S_1\) is false and \(S_2\) is false
Show Solution

The Correct Option is A

Solution and Explanation

To determine which statement is correct, let's analyze each statement separately:

  1. Statement \( S_1 \): Read\ misses\ in\ a\ write-through\ L1\ cache\ do\ not\ result\ in\ writebacks\ of\ dirty\ lines\ to\ the\ L2.
    In a write-through cache, every write operation updates both the cache and the next level in the hierarchy immediately. Thus, by definition, there are no 'dirty' lines in a write-through cache because all changes are propagated to the next level (L2) as they occur. Therefore, read misses in a write-through L1 do not need to result in writebacks of dirty lines since such dirty lines do not exist. Hence, Statement \( S_1 \) is true.
  2. Statement \( S_2 \): Write\ allocate\ policy\ must\ be\ used\ in\ conjunction\ with\ write-through\ caches\ and\ no-write\ allocate\ policy\ is\ used\ with\ writeback\ caches.
    In cache systems, a write-allocate policy means on a write miss, the block to be written is loaded into the cache. Conversely, a no-write allocate policy means the block is written directly to the lower level and not allocated in the cache. Write-through caches do not require a write-allocate policy, as writes propagate directly to the next level; using no-write allocate with writeback caches is common to delay updates until necessary. Hence, Statement \( S_2 \) is false.

Based on the analysis above, the correct answer is that \( S_1 \) is true and \( S_2 \) is false.

Was this answer helpful?
0

Top Questions on Memory hierarchy