Question

Assume a two-level inclusive cache hierarchy, L1 and L2, where L2 is the larger of the two. Consider the following statements:

S1S_1: Read misses in a write through L1 cache do not result in writebacks of dirty lines to the L2.

S2S_2: 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?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2021 answer key

Solution

Evaluate the architectural behavior of inclusive cache hierarchies and cache write policies.

Evaluate statement S1S_1:
In a write-through L1 cache, every write operation immediately updates both the L1 cache block and the corresponding block in the lower level (L2). Consequently, a block in a write-through L1 cache is never dirty (modified relative to L2). When an L1 read miss occurs and a line must be evicted, it is always clean and simply overwritten without needing a writeback to L2. Thus, S1S_1 is true.

Evaluate statement S2S_2:
Write-allocate (allocating a cache line on a write miss) is traditionally paired with write-back caches to avoid repeated memory writes on subsequent writes to the same block. Write-through caches typically use no-write allocate (write-around) because writing directly to lower memory avoids bringing the block into cache on a miss. Statement S2S_2 claims the opposite, and asserts it as a mandatory requirement ('must'). Thus, S2S_2 is false.

Therefore, S1S_1 is true and S2S_2 is false, which corresponds to option A.

Final answer

A

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2021 Computer Science and Information Technology - Session 2 (CS2)
Question
37 of 65, printed as CS Q.27
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.