Q86.Marks: +2.0UGC NET Paper 2: Computer Science and Application 26th June 2025 Shift 1
Which of the following statements are true?
A. In the write-through policy, only the cache is updated
B. In the write-back policy, both cache and main memory are updated
C. Cache coherence problems exist in multiprocessors with private caches because of the need to share writable data
D. Cache coherence problem can be solved by means of hardware-only scheme
Choose the correct answer from the options given below:
1.A, B Only
2.B, C Only
3.C, D Only✓ Correct
4.A, B, C Only
Solution
The correct answer is option 3
Key Points
Option A: ❌ In the write-through policy, only the cache is updated: This statement is incorrect. In write-through policy, both the cache and the main memory are updated simultaneously whenever a write operation occurs.
Option B: ❌ In the write-back policy, both cache and main memory are updated: This statement is incorrect. In write-back policy, only the cache is updated immediately, and the main memory is updated later (when the cache block is evicted).
Option C: ✅ Cache coherence problems exist in multiprocessors with private caches because of the need to share writable data: This statement is correct. Cache coherence problems arise when multiple processors have private caches and need to share writable data, leading to inconsistencies between caches.
Option D: ✅ Cache coherence problem can be solved by means of hardware-only scheme: This statement is correct. Hardware-only schemes, such as snooping and directory-based protocols, are commonly used to resolve cache coherence issues.
Additional Information
Write-through policy: In this policy, every write operation updates both the cache and the main memory, ensuring consistency but with higher latency.
Write-back policy: In this policy, the cache is updated immediately, and the main memory is updated only when the cache line is evicted. This offers better performance but requires mechanisms to handle coherence issues.
Cache coherence: Ensuring that multiple caches maintain consistent copies of shared data in multiprocessor systems is critical for correctness.
Hardware-only solutions: Protocols like MESI (Modified, Exclusive, Shared, Invalid) and directory-based coherence protocols are examples of hardware solutions to address cache coherence problems.