Knowledge

MOESI protocol

Source 📝

415: 405: 395: 385: 375: 360: 350: 330: 305: 250: 240: 195: 340: 320: 295: 285: 275: 265: 230: 220: 210: 185: 175: 165: 155: 113:
Exclusive or Modified state first, by invalidating all other cached copies. (If the cache line was Owned before, the invalidate response will indicate this, and the state will become Modified, so the obligation to eventually write the data back to memory is not forgotten.) It may also be discarded (changed to the Invalid state) at any time.
441:
While MOESI can quickly share dirty cache lines from cache, it may struggle to quickly share clean lines from cache. If a cache line is clean with respect to memory and in the shared state, then there is no obvious single candidate cache to respond to a read request, so it is normal to let the read
449:
If a processor wishes to write to an Owned cache line, it must notify the other processors which are sharing that cache line. The standard implementation simply tells them to invalidate their copies, moving its own copy to the Modified state when this is complete, but alternatively it may use a
437:
when another processor tries to read it. Instead, the Owned state allows a processor to supply the modified data directly to the other processor. This is beneficial when the communication between two CPUs is significantly better than to main memory. An example would be multi-core CPUs with
112:
be dirty with respect to memory; if it is, one cache has a copy in the Owned state, and that cache is responsible for eventually updating main memory. If no cache holds the line in the Owned state, the memory copy is up to date. The cache line may not be written, but must be changed to the
79:
the line is modified (dirty) relative to main memory, and this cache has the exclusive responsibility for ensuring main memory is eventually updated. The cache line may be changed to the Modified state after invalidating all shared copies, or changed to the Shared state by
34:
states, there is a fifth "Owned" state representing data that is both modified and shared. This avoids the need to write modified data back to main memory before sharing it. While the data must still be written back eventually, the write-back may be deferred .
38:
In order for this to be possible, direct cache-to-cache transfers of data must be possible, so a cache with the data in the modified state can supply that data to another reader without transferring it to memory.
454:, telling them to update their copies with the new contents. This is a partial write-through which does not go as far as main memory; the processor's own copy remains in the Owned state. 108:
This line is one of several copies in the system. This cache does not have permission to modify the copy. Unlike the MESI protocol, a shared cache line
522: 67:
This cache has the only valid copy of the cache line, and has made changes to that copy. The cached copy may be further modified freely.
100:
This cache has the only copy of the line, but the line is clean (unmodified). It may be written to, changing to the Modified state.
20: 30:
protocol that encompasses all of the possible states commonly used in other protocols. In addition to the four common
469:
of read requests. Because these two variants are fully compatible, they may both be used in the same system based on
529: 426:(The order in which the states are normally listed serves only to make the acronym "MOESI" pronounceable.) 75:
This line is one of several copies in the system. This cache does not have permission to modify the copy
565: 451: 560: 466: 8: 462: 125:
For any given pair of caches, the permitted states of a given cache line are as follows:
81: 482: 27: 502: 443: 473:
like the cache's estimate of the number of active readers of this cache line.
554: 497: 492: 430: 31: 121:
This block is not valid; it must be fetched to satisfy any attempted access.
487: 465:
lock; one broadcast write is less communication than separate replies to a
89: 26:
In computing, MOESI ("Modified Owned Exclusive Shared Invalid") is a full
434: 92:
request with data, to ensure the stale copy in main memory is not used.
57: 470: 523:"AMD64 Architecture Programmer's Manual Vol 2 'System Programming'" 43: 442:
request be filled from memory. (This is solved by the
429:
This protocol, a more elaborate version of the simpler
433:, avoids the need to write a dirty cache line back to 461:
there are multiple active readers of e.g. a heavily
446:, which may be combined with MOESI to make MOESIF.) 552: 46:Architecture Programmer's Manual Vol. 2 553: 21:Cache coherency protocols (examples) 13: 528:. pp. 169–172. Archived from 84:to main memory. Owned cache lines 14: 577: 457:The latter reduces cache traffic 413: 403: 393: 383: 373: 358: 348: 338: 328: 318: 303: 293: 283: 273: 263: 248: 238: 228: 218: 208: 193: 183: 173: 163: 153: 19:(For a detailed description see 515: 82:writing the modifications back 1: 508: 7: 476: 10: 582: 60:is in one of five states: 16:Cache coherence protocol 452:write-through policy 438:per-core L2 caches. 51:System Programming 566:Cache (computing) 424: 423: 573: 545: 544: 542: 540: 535:on June 19, 2017 534: 527: 519: 420: 417: 416: 410: 407: 406: 400: 397: 396: 390: 387: 386: 380: 377: 376: 365: 362: 361: 355: 352: 351: 345: 342: 341: 335: 332: 331: 325: 322: 321: 310: 307: 306: 300: 297: 296: 290: 287: 286: 280: 277: 276: 270: 267: 266: 255: 252: 251: 245: 242: 241: 235: 232: 231: 225: 222: 221: 215: 212: 211: 200: 197: 196: 190: 187: 186: 180: 177: 176: 170: 167: 166: 160: 157: 156: 128: 127: 55: 49: 42:As discussed in 581: 580: 576: 575: 574: 572: 571: 570: 561:Cache coherency 551: 550: 549: 548: 538: 536: 532: 525: 521: 520: 516: 511: 483:Cache coherency 479: 467:thundering herd 418: 414: 408: 404: 398: 394: 388: 384: 378: 374: 363: 359: 353: 349: 343: 339: 333: 329: 323: 319: 308: 304: 298: 294: 288: 284: 278: 274: 268: 264: 253: 249: 243: 239: 233: 229: 223: 219: 213: 209: 198: 194: 188: 184: 178: 174: 168: 164: 158: 154: 53: 47: 28:cache coherency 17: 12: 11: 5: 579: 569: 568: 563: 547: 546: 513: 512: 510: 507: 506: 505: 503:MESIF protocol 500: 495: 490: 485: 478: 475: 444:MESIF protocol 422: 421: 411: 401: 391: 381: 371: 370: I  367: 366: 356: 346: 336: 326: 316: 315: S  312: 311: 301: 291: 281: 271: 261: 260: E  257: 256: 246: 236: 226: 216: 206: 205: O  202: 201: 191: 181: 171: 161: 151: 150: M  147: 146: 145: I  143: 140: 137: 134: 131: 123: 122: 119: 115: 114: 106: 102: 101: 98: 94: 93: 73: 69: 68: 65: 15: 9: 6: 4: 3: 2: 578: 567: 564: 562: 559: 558: 556: 531: 524: 518: 514: 504: 501: 499: 498:MOSI protocol 496: 494: 493:MESI protocol 491: 489: 486: 484: 481: 480: 474: 472: 468: 464: 460: 455: 453: 447: 445: 439: 436: 432: 431:MESI protocol 427: 412: 402: 392: 382: 372: 369: 368: 357: 347: 337: 327: 317: 314: 313: 302: 292: 282: 272: 262: 259: 258: 247: 237: 227: 217: 207: 204: 203: 192: 182: 172: 162: 152: 149: 148: 144: 142: S  141: 139: E  138: 136: O  135: 133: M  132: 130: 129: 126: 120: 117: 116: 111: 107: 104: 103: 99: 96: 95: 91: 88:respond to a 87: 83: 78: 74: 71: 70: 66: 63: 62: 61: 59: 52: 45: 40: 36: 33: 32:MESI protocol 29: 24: 22: 537:. Retrieved 530:the original 517: 488:MSI protocol 458: 456: 448: 440: 428: 425: 124: 109: 85: 76: 50: 41: 37: 25: 18: 435:main memory 555:Categories 539:August 28, 509:References 471:heuristics 58:cache line 463:contended 97:Exclusive 477:See also 64:Modified 118:Invalid 56:, each 105:Shared 533:(PDF) 526:(PDF) 90:snoop 72:Owned 54:' 48:' 44:AMD64 541:2015 86:must 110:may 77:but 557:: 459:if 23:) 543:. 419:Y 409:Y 399:Y 389:Y 379:Y 364:Y 354:Y 344:N 334:Y 324:N 309:Y 299:N 289:N 279:N 269:N 254:Y 244:Y 234:N 224:N 214:N 199:Y 189:N 179:N 169:N 159:N

Index

Cache coherency protocols (examples)
cache coherency
MESI protocol
AMD64
cache line
writing the modifications back
snoop
MESI protocol
main memory
MESIF protocol
write-through policy
contended
thundering herd
heuristics
Cache coherency
MSI protocol
MESI protocol
MOSI protocol
MESIF protocol
"AMD64 Architecture Programmer's Manual Vol 2 'System Programming'"
the original
Categories
Cache coherency
Cache (computing)

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.