顺序一致性是否意味着缓存连贯性?
- 阅读必须返回最新的写作。
- 最终必须通过阅读访问每个写入。
- 顺序一致性看到给定位置的写入给定位置,
所有处理器以相同的
- 所有操作的总顺序都是
- 原子。
- 总订单应遵循计划订单。
如果我们符合顺序的一致性,则可以实现缓存连贯性的每个条件。因此,我想顺序一致性意味着缓存相干性(顺序一致性比缓存相干性强)。
The definition of cache coherence says that:
- A read must return the most recent write.
- Every write must eventually be accessible via a read.
- Writes to a given location are seen in the same order by all processors
In sequential consistency
- There is a total order for all operations
- Every operation is atomic.
- The total order should follow the program order.
If we conform to the sequential consistency, every condition of cache coherence seems to be fulfilled. So I guess the sequential consistency implies cache coherence (and sequential consistency is stronger than cache coherence).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
顺序一致性的关键在于,所有处理器都会以相同的顺序看到所有事件,但是不能保证何时发生。结果,在许多情况下,您将无法获得最新的写作。
在非常一致的系统中,满足了顺序和新近度。
顺便说一句,我在某些文献中看到了顺序一致性的更弱定义 - 所有处理器都会以某种顺序看到事件,但是所有处理器的顺序都相同。这意味着,如果您有几本写作,则可以按任何顺序执行它们 - 也许不是按客户提交的顺序;但是,无论订单如何,所有处理器都将获得相同的订单。
The key in a sequential consistency is that all processors will see all events in the same order, but there is no guarantee when that will happen. As a result, in many cases you won't be able to get most recent write.
In a strongly consistent system, both order and recency are met.
Btw, I saw in some literature a weaker definition of sequential consistency - all processors will see events in SOME order, but the order is the same for all. What it means, that if you have several writes, they might be executed in whatever order - maybe not in the order a client submits them; but all processors will get the same order, whatever the order is.
是的。一致性可以看作是每个位置的顺序一致性。
因此,为了顺序一致性:如果执行结果可以通过具有以下属性的不同执行来解释:
所有位置上的加载/存储应该有一个总顺序。
这个顺序与每个核心的程序顺序一致。
读取应该按此顺序看到之前的最新写入。
那么执行顺序是一致的。
为了保持一致性,您只需要每个位置的总顺序,但除此之外,适用与顺序一致性相同的规则。
因此,任何顺序一致的执行都是连贯的。但反之则不一定成立。
Yes. Coherence can be seen as sequential consistency per location.
So for sequential consistency: if the results of the execution can be explained by a different execution with the following properties:
there should be a total order of the loads/stores over all locations.
this order is consistent with the program order of each of the cores.
a read should see the most recent write before it in this order.
then the execution is sequentially consistent.
For coherence, you only need a total order per location, but otherwise, the same rules apply as with sequential consistency.
So any execution that is sequentially consistent, is coherent. But the converse doesn't need to be true.