zoukankan      html  css  js  c++  java
  • CACHE COHERENCE AND THE MESI PROTOCOL

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

    In contemporary multiprocessor systems, it is customary to have one or two levels
    of cache associated with each processor. This organization is essential to achieve
    reasonable performance. It does, however, create a problem known as the cache

    coherence problem. The essence of the problem is this: Multiple copies of the same
    data can exist in different caches simultaneously, and if processors are allowed
    to update their own copies freely, an inconsistent view of memory can result. In
    Chapter 4 we defined two common write policies:

    • Write back: Write operations are usually made only to the cache. Main mem-
    ory is only updated when the corresponding cache line is flushed from the
    cache.
    • Write through: All write operations are made to main memory as well as to
    the cache, ensuring that main memory is always valid.

    It is clear that a write-back policy can result in inconsistency. If two caches
    contain the same line, and the line is updated in one cache, the other cache will
    unknowingly have an invalid value. Subsequent reads to that invalid line produce
    invalid results. Even with the write-through policy, inconsistency can occur unless
    other caches monitor the memory traffic or receive some direct notification of the
    update.
    In this section, we will briefly survey various approaches to the cache coher-
    ence problem and then focus on the approach that is most widely used: the MESI
    (modified/exclusive/shared/invalid) protocol. A version of this protocol is used on
    both the Pentium 4 and Power PC implementations.
    For any cache coherence protocol, the objective is to let recently used local
    variables get into the appropriate cache and stay there through numerous reads and
    write, while using the protocol to maintain consistency of shared variables that might
    be in multiple caches at the same time. Cache coherence approaches have generally
    been divided into software and hardware approaches. Some implementations adopt
    a strategy that involves both software and hardware elements. Nevertheless, the
    classification into software and hardware approaches is still instructive and is com-
    monly used in surveying cache coherence strategies.

  • 相关阅读:
    GitLab使用公钥SSH key登录
    P1305 新二叉树 /// 二叉树的先序遍历
    P1030 求先序排列 /// 二叉树的遍历
    P1020 导弹拦截 /// DP Dilworth定理 LIS、LDS优化
    USACO 2008 November Gold Cheering up the Cows /// MST oj24381
    USACO 2009 Open Grazing2 /// DP+滚动数组oj26223
    Mid-Atlantic 2008 Lawrence of Arabia /// 区间DP oj21080
    炮兵阵地 /// 状压DP oj26314
    Post Office IOI 2000 /// 区间DP oj24077
    Print Article /// 斜率优化DP oj26302
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6252291.html
Copyright © 2011-2022 走看看