0
4.0kviews
Explain in details Cache Coherency.
1 Answer
0
43views

Cache Coherence:

  • Cache does improves the performance of a system but it creates a problem know as cache coherence.
  • Before the cache is copied into main memory ,if the two copies one in cache and other in main memory are different.
  • This inconsistency in value of cache and main memory is called cache coherence problem.
  • In multiprocessor system, multiples copies of same data can exist in different cache simultaneously, if processors are allowerd to freely update their own copies an inconsistency may arise.
  • During a Write Operation if an item is placed in cache memory then it is required to update its copy in main memory also.

enter image description here

Strategies:

  • Software Solutions
  • Hardware Solutions
    • Snoopy Protocols.
    • Directory Protocols.

Following are the protocols to solve the cache coherence.

1) Snoopy Protocols:

  • When a number of processors are connected to a common bus and each processors has its own local cache then cache inconsistency can be maintained using,

    • Write –Invalidate Policy.
    • Write- Update Policy.
  • In Write- Invalidate Policy, whenever changes are made in local cache of processor, all remote copies with other processors are invalidate.
  • Thus, only one valid copy will remain after write invalidate.
  • The Write-Update will broadcast the new data block to all the caches containing a copy of the block.
  • Thus, all copies of data will become identified after updating in local cache.

2) MESI Protocol:

  • Write Invalidate approach is widely used in multiprocessor system.
  • Write-Invalidate protocol is also known as MESI Protocol.
Please log in to add an answer.