Skip to content

GATE CS 2022 Q14 — Memory Hierarchy: Cache, Main Memory and Secondary Storage

Explain with AI

Let WB\text{WB} and WT\text{WT} be two set associative cache organizations that use LRU\text{LRU} algorithm for cache block replacement. WB\text{WB} is a write back cache and WT\text{WT} is a write through cache. Which of the following statements is/are FALSE?\text{FALSE}?

Select all correct options
View worked solution

Answer: A;B;D

We need to identify the FALSE statements among the given options regarding Write-Back (WB\text{WB}) and Write-Through (WT\text{WT}) cache organizations.


Analysis of Statements:

  • Statement A: Each cache block in WB\text{WB} and WT\text{WT} has a dirty bit.
    Status: FALSE
    A dirty bit is used to track whether a cache block has been modified relative to main memory.
    • In a Write-Back (WB\text{WB}) cache, updates are made only to the cache, so a dirty bit is necessary.
    • In a Write-Through (WT\text{WT}) cache, every write updates both the cache and the main memory simultaneously. Since the cache and main memory are always consistent, WT\text{WT} does not require a dirty bit.
  • Statement B: Every write hit in WB\text{WB} leads to a data transfer from cache to main memory.
    Status: FALSE
    In a Write-Back (WB\text{WB}) cache, a write hit only updates the cache block and sets its dirty bit to 11. The data is transferred to main memory only when that dirty block is evicted. It does not trigger an immediate transfer on every write hit.
  • Statement C: Eviction of a block from WT\text{WT} will not lead to data transfer from cache to main memory.
    Status: TRUE
    In a Write-Through (WT\text{WT}) cache, main memory is always kept up-to-date with the cache. Therefore, when a block is evicted to make room for a new block, no data needs to be written back to main memory.
  • Statement D: A read miss in WB\text{WB} will never lead to eviction of a dirty block from WB.\text{WB}.
    Status: FALSE
    When a read miss occurs in a WB\text{WB} cache, the requested block must be brought from main memory into the cache. If the target cache set is already full, an existing block must be evicted. If the selected victim block is dirty, it must be written back to main memory. Thus, a read miss can indeed lead to the eviction of a dirty block.

Conclusion:

The false statements are A, B, and D.

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