Correct option is B
A. Having multiport memory: This is
not a solution for cache coherence. Multiport memory allows multiple processors to access the same memory concurrently, but it does not address cache consistency issues directly.
B. Allow only nonshared data to be stored in cache: This is
true. By restricting the cache to store only nonshared data, the problem of maintaining coherence between shared caches is eliminated.
C. Using a snoopy cache controller: This is
true. A snoopy cache controller ensures that all processors monitor (or "snoop") a common bus to maintain coherence among caches. This is a standard approach in multiprocessor systems.
D. Using memory interleaving: This is
false. Memory interleaving is a technique used to improve memory access speed by distributing data across multiple memory modules, but it does not address cache coherence problems.
Information Booster
1.
Cache Coherence Problem:
· Occurs in multiprocessor systems when multiple caches store copies of the same memory location.
· A lack of coherence can lead to inconsistent data being used by processors.
2.
Solutions to Cache Coherence:
·
Snoopy Protocols: Caches monitor a common communication bus to ensure consistency.
·
Directory-based Protocols: A directory keeps track of the sharing status of each block of memory.
3.
Cache Coherence Protocols:
·
Write-invalidate: Ensures that when one cache writes to a shared block, other caches invalidate their copies.
·
Write-update: Ensures that when one cache writes to a shared block, other caches update their copies.
4.
Role of Snoopy Cache Controller: It helps resolve coherence by ensuring all caches monitor bus transactions and take appropriate actions (e.g., invalidate or update).