GateAI
Cache Memory and Hierarchy

GATE CSE 2021 Set 2 · Q27

MCQ2 marksMedium

Time

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\textit{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?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) S1 is true and S2 is false

Cache Memory and Hierarchy

To determine the correctness of each statement:

  1. Statement S1S_1: In a write-through L1 cache, every write to L1 is immediately propagated to L2. As a result, the data in L1 is always consistent with the data in L2, and lines in L1 never become "dirty" (no dirty bit is required). Therefore, when an eviction occurs due to a read miss (or any miss), no dirty line writeback to L2 is ever needed. Hence, S1S_1 is true [2].

  2. Statement S2S_2: Typically, the write-allocate policy is used with write-back caches (so subsequent writes to the allocated block can be handled quickly in the cache), whereas no-write allocate is commonly paired with write-through caches [2]. Furthermore, these policies are not strictly mandatory together, and S2S_2 incorrectly swaps their standard associations while asserting that write-allocate *must* be paired with write-through. Hence, S2S_2 is false.

Therefore, S1S_1 is true and S2S_2 is false, which corresponds to Option (A).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Cache Memory and Hierarchy previous year question is Q27 of the GATE CSE 2021 Set 2 paper. Find more GATE CSE PYQs on Cache Memory and Hierarchy in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Cache Memory and Hierarchy PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Cache Memory and Hierarchy in GATE CSE

Cache Memory and Hierarchy has 47 GATE CSE PYQs across 23 papers from 2011 to 2026. 16 of them are 2-mark MCQs like this one, and GATE CSE 2021 Set 2 has 2.

How GATE tests Cache Memory and Hierarchy

More from GATE CSE 2021 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2021 Set 2 · Q27 · MCQ

Assume a two-level inclusive cache hierarchy, L1 and L2, where L2 is the larger of the two. Consider the following statements. S1 : Read misses in a write through L1 cache do not result in writebacks of dirty lines to the L2. S2 : 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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.