Consider two set-associative cache memory architectures: , which uses the write back policy, and , which uses the write through policy. Both of them use the (Least Recently Used) block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?
View worked solution
Answer: B;C
Let us analyze each option step-by-step:
- Option A: Incorrect. In a Write-Back Cache (), when a read miss occurs and the target cache set is full, a block must be evicted using the policy. If the selected victim block is dirty (i.e., its dirty bit is ), it must be written back to the main memory before the new block is loaded. Thus, a read miss in can evict a dirty block.
- Option B: Correct. In a Write-Through Cache (), every write operation updates both the cache and the main memory simultaneously. Consequently, cache blocks are never "dirty" and there is no dirty bit. When a read miss occurs and a block needs to be evicted, the victim block can simply be overwritten without any write-back operation to the main memory.
- Option C: Correct. In a Write-Back Cache (), a cache block is initially clean (dirty bit ) when loaded from main memory. If a write hit occurs on this clean block, the data is updated in the cache, and its dirty bit is modified from to . Thus, a write hit can modify the value of the dirty bit.
- Option D: Incorrect. Since maintains consistency with main memory on every write, no block in is ever dirty. Therefore, evicting a victim block in never requires writing it back to the main memory.
Hence, statements B and C are TRUE.
Free practice · Your answers on this page are not saved.
