Question:

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

Updated On: Jan 22, 2025
  • A read miss in \( WBC \) never evicts a dirty block
  • A read miss in \( WTC \) never triggers a write-back operation of a cache block to main memory
  • A write hit in \( WBC \) can modify the value of the dirty bit of a cache block
  • A write miss in \( WTC \) always writes the victim cache block to main memory before loading the missed block to the cache
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Analyze the write-back policy (WBC).
In a write-back cache, the dirty bit is set whenever a write modifies the cached data. The modified data is not written back to the main memory until the block is evicted. Therefore:
A write hit in \( WBC \) modifies the value of the dirty bit, making statement (3) true.
A read miss in \( WBC \) may evict a dirty block if required by the LRU policy, making statement (1) false. Step 2: Analyze the write-through policy (WTC).
In a write-through cache, every write operation immediately updates both the cache and the main memory. Therefore:
A read miss in \( WTC \) does not trigger a write-back operation, as all writes have already updated the main memory. Hence, statement (2) is true.
A write miss in \( WTC \) does not necessarily write the victim cache block to the main memory, as the cache contents are always consistent with the main memory. Hence, statement (4) is false. Final Answer: \[ \boxed{(2), (3)} \]
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions