We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Hardware

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is Cache Coherence?

By Adrem Siratt
Updated: May 16, 2024

Cache coherence is the natural problem that develops when a system's data set is accessed and altered by multiple agents. The primary area of computer architecture where this becomes a problem is in multiprocessor computers. Each processor in a multiprocessor computer has its own cache that loads and stores information from the random access memory (RAM). When two processors are accessing the same area of memory, cache coherence would be lost if certain precautions were not taken.

Without cache coherence, a multiprocessor system would be unable to function. There are several methods that have been developed in order to address this issue and avoid potential problems. Directory-based coherence, snooping and snarfing are three methods that are used to prevent the loss of cache coherence.

Directory-based coherence works as a filter in order to ensure coherence. Data is placed within a portion of memory that is accessible to all of the processors. When the information that is stored within that area of memory is changed, the system will either update the caches or invalidate them.

Snooping requires the processor to monitor all of the accesses to the memory locations that have been cached. This enables the processor to know when a write operation has occurred. By knowing when a write operation occurs, the processor can update its cache.

Snarfing is quite similar to snooping. Snarfing involves not only monitoring the accesses to memory locations that have been cached but also monitoring the actual information that is stored in the memory. When a memory write occurs, the cache can be updated with the new information.

Directory-based coherence systems have a relatively high latency, resulting in slower processing. Lower bandwidth requirements enable directory-based coherence systems to be practical in large scale applications of cache coherence. The more processors that a system uses, the more advantages it can have from using a directory-based coherence system.

Snooping is a much faster method. This method requires more bandwidth than the directory-based approach. This method is able to be used effectively in systems that have relatively few processors.

Snarfing is not usually used as a method of maintaining cache coherence. This is primarily because snarfing requires more resources to be used as compared to both snooping and directory-based methods. In order for a snarfing system to work, it must keep track of both the memory addresses and the data stored in those areas of memory. The amount of bandwidth and processing that is taken up by this method makes it undesirable for most applications of maintaining cache coherence.

EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Discussion Comments
Share
https://www.easytechjunkie.com/what-is-cache-coherence.htm
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.