Skip to content

GATE CS 2008 Q35 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI

For inclusion to hold between two cache levels L1L_1 and L2L_2 in a multi-level cache hierarchy, which of the following are necessary?

  1. L1L_1 must be write-through cache

  2. L2L_2 must be a write-through cache

  3. The associativity of L2L_2 must be greater than that of L1L_1

  4. The L2L_2 cache must be at least as large as the L1L_1 cache

Choose one option
View worked solution

Answer: A

The inclusion property in a multi-level cache hierarchy (L1L_1 and L2L_2) states that all data present in the L1L_1 cache must also be present in the L2L_2 cache (L1⊆L2L_1 \subseteq L_2).

Let us evaluate each statement to determine if it is a necessary condition:

  • Statement IV (The L2L_2 cache must be at least as large as the L1L_1 cache): This is necessary. If the capacity of L2L_2 is smaller than L1L_1, then L2L_2 cannot physically hold all the blocks that L1L_1 can hold when L1L_1 is fully utilized. Therefore, Capacity(L2)≥Capacity(L1)Capacity(L_2) \ge Capacity(L_1) is a fundamental requirement.
  • Statements I & II (L1L_1 / L2L_2 must be write-through): These are not necessary. Write policies (write-through vs. write-back) manage how updates are propagated to lower levels of the memory hierarchy. Inclusion can be maintained with write-back caches by tracking dirty states and coordinating write-backs during evictions.
  • Statement III (The associativity of L2L_2 must be greater than that of L1L_1): This is not necessary. Although higher associativity in L2L_2 reduces conflict evictions, inclusion can still be strictly enforced with any associativity by using back-invalidation. When a block is evicted from L2L_2, an invalidation signal is sent to L1L_1 to evict the corresponding block if it exists there.

Thus, only statement IV is a necessary condition.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Memory Hierarchy: Cache, Main Memory and Secondary Storage questions