The GATE Grind

GATE 2024 CS (CS1) – Question 53

Computer Organization and Architecture · Memory Interfacing and Hierarchy · 2 marks · Multiple select

Consider two set-associative cache architectures: WBC (write back policy) and WTC (write through policy). Both use LRU replacement. The cache is connected to main memory. Which of the following statements is/are TRUE?

  1. A read miss in WBC never evicts a dirty block
  2. A read miss in WTC never triggers a write back operation of a cache block to main memory
  3. A write hit in WBC can modify the value of the dirty bit of a cache block
  4. A write miss in WTC always writes the victim cache block to main memory before loading the missed block to the cache

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) A read miss in WTC never triggers a write back operation of a cache block to main memory; (C) A write hit in WBC can modify the value of the dirty bit of a cache block

Explanation

A write-through cache never holds dirty blocks so a read miss never triggers a write back. In write-back, a write hit sets the dirty bit. A read miss in WBC can evict a dirty block, and WTC victims are never dirty.