cache 笔记:Memory Coherence 和 Memory Consistency

At  this  point  we  should  formally  discuss   memory  coherence and  memory consistency, terms that speak to the  ordering behavior of operations on the mem-ory  system. We  illustrate  their  defi  nitions  within  the scope of the race condition example and then discuss them  from  the  perspective  of  their  use  in  modern multiprocessor systems design. 
 
Memory Coherence(一致性):
 The principle of memory coherence indicates  that the memory system  behaves rationally. (理性的,有条理的)
For instance, a value written does not disappear (fail to be read at a later point) unless that value is explicitly overwritten. 
Write data cannot be buffered indefinitely; any write data must eventually become visible to subsequent reads unless overwritten. Finally, the system must pick an order. If it is decided 
that write X comes before write Y, then at a later point, the system may not act as if Y came before X. 
 
Memory Consistency(前后一致,连贯性)
Whereas coherence  defines rational behavior, the consistency model indicates how long and in what ways the system is allowed to behave irrationally with respect to a given set of references. A memory-consistency model indicates how the memory system inter-leaves read and write accesses, whether they are to the same memory location or not. If two refer-ences refer to the same address, their ordering is obviously important. On the other hand, if two references refer to two different addresses, there can be no data dependencies between the two, and it should, in theory, be possible to reorder them as one sees fi t. This is how modern DRAM memory controllers operate, for instance. How-ever, as the example in Figure 4.6 shows, though a data dependence may not exist between two variables, a causal dependence may nonethe-less exist, and thus it may or may not be safe to reorder the accesses. Therefore, it makes sense to defi ne allowable orderings of references to differ-ent addresses. In the race condition example, depending on ne’s   consistency model, the simple code fragment。
 
存储一致性和存储一致 ,暂时希望用这样的词汇来表述着两个概念。
存储一致性:表示着,在行为抽象上需要表现出来的一致性的特点和需要满足的规则要求,这个是一致性想要表达的。
存储一致:表示着,在行为抽象为指导的前提下,我们使用的实现这种“性质”的行为,使用这些行为约束而构建出的memory 模型。

 

转载于:https://www.cnblogs.com/maxmin26/p/6603120.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值