Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why MESI protocol need the Exclusive state

I am learning cache coherency now, but I don't quite understand what's the function of Exclusive state in MESI protocol, as I think MSI is also work well.

like image 420
Peter Hu Avatar asked Sep 28 '15 19:09

Peter Hu


People also ask

What is exclusive state in MESI protocol?

Exclusive (E) The cache line is present only in the current cache, but is clean - it matches main memory. It may be changed to the Shared state at any time, in response to a read request. Alternatively, it may be changed to the Modified state when writing to it.

What is the purpose of the MESI protocol?

The MESI protocol makes it possible to maintain the coherence in cached systems. It is based on the four states that a block in the cache memory can have. These four states are the abbreviations for MESI: modified, exclusive, shared and invalid.

What does lead to the development of MESI protocol?

What leads to the development of MESI and MEI protocol? Explanation: The problem of cache coherency lead to the formation of two standard mechanisms called MESI and MEI protocol.

What is the meaning of each of the four states in the MESI protocol?

Its acronym stands for modified, exclusive, shared, invalid and refers to the states that cached data can take. The MESI protocol. The MESI protocol is a formal mechanism for controlling cache coherency using snooping techniques.


1 Answers

The problem with the MSI protocol is that by default all data is loaded in the shared state even if it's not shared. When we move cache block X from the shared to the modified state we must send out a signal to the other caches to invalidate their copies of block X; if they don't have a copy of block X, then we needlessly waste bus bandwidth/cycles.

The common case of a program is to read and possibly modify data that is not shared with other threads. By introducing an exclusive state we have a way of distinguishing this non-shared (exclusive) data. We don't have to send out superfluous invalidate signals when we modify the majority of our data. MESI is functionally the same as MSI but is more optimised for the common case.

like image 155
hayesti Avatar answered Sep 19 '22 14:09

hayesti