Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Cache coherence
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Coherence mechanisms == {{main|Cache coherency protocols (examples)}} The two most common mechanisms of ensuring coherency are ''[[Bus sniffing|snooping]]'' and ''[[Directory-based cache coherence|directory-based]]'', each having their own benefits and drawbacks.<ref>{{cite book |title=Computer Architecture A Quantitative Approach |last1=Patterson |first1=David A. |last2=Hennessy |first2=John L. |isbn=1-55860-069-8 |date=1990 |pages=467β468 |publisher=Morgan Kaufmann Publishers}}</ref> Snooping based protocols tend to be faster, if enough [[Memory bandwidth|bandwidth]] is available, since all transactions are a request/response seen by all processors. The drawback is that snooping isn't scalable. Every request must be broadcast to all nodes in a system, meaning that as the system gets larger, the size of the (logical or physical) bus and the bandwidth it provides must grow. Directories, on the other hand, tend to have longer latencies (with a 3 hop request/forward/respond) but use much less bandwidth since messages are point to point and not broadcast. For this reason, many of the larger systems (>64 processors) use this type of cache coherence. === Snooping === {{main|Bus snooping}} : First introduced in 1983,<ref>{{Cite journal|title=Ravishankar, Chinya; Goodman, James (February 28, 1983). "Cache Implementation for Multiple Microprocessors"|url=https://www.cs.ucr.edu/~ravi/Papers/NWConf/ravishankar_83.pdf|journal=Proceedings of IEEE COMPCON: 346β350.}}</ref> snooping is a process where the individual caches monitor address lines for accesses to memory locations that they have cached.<ref name=":3" /> The ''write-invalidate protocols'' and ''write-update protocols'' make use of this mechanism. : For the snooping mechanism, a snoop filter reduces the snooping traffic by maintaining a plurality of entries, each representing a cache line that may be owned by one or more nodes. When replacement of one of the entries is required, the snoop filter selects for the replacement of the entry representing the cache line or lines owned by the fewest nodes, as determined from a presence vector in each of the entries. A temporal or other type of algorithm is used to refine the selection if more than one cache line is owned by the fewest nodes.<ref>Rasmus Ulfsnes (June 2013). [http://www.diva-portal.org/smash/get/diva2:649627/FULLTEXT01.pdf "Design of a Snoop Filter for Snoop-Based Cache Coherency Protocols"] {{Webarchive|url=https://web.archive.org/web/20140201160231/http://www.diva-portal.org/smash/get/diva2:649627/FULLTEXT01.pdf |date=2014-02-01 }} (PDF). ''diva-portal.org''. Norwegian University of Science and Technology. Retrieved 2014-01-20.</ref> === Directory-based === {{main|Directory-based cache coherence}} : In a directory-based system, the data being shared is placed in a common directory that maintains the coherence between caches. The directory acts as a filter through which the processor must ask permission to load an entry from the primary memory to its cache. When an entry is changed, the directory either updates or invalidates the other caches with that entry. [[Distributed shared memory]] systems mimic these mechanisms in an attempt to maintain consistency between blocks of memory in loosely coupled systems.<ref>{{cite web |title=Lecture 18: Snooping vs. Directory Based Coherency |url=https://people.eecs.berkeley.edu/~pattrsn/252F96/Lecture18.pdf |website=Berkeley.edu |access-date=14 May 2023}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)