码迷,mamicode.com
首页 > 其他好文 > 详细

Consistency model(The system supports a given model if operations on memory follow specific rules)

时间:2014-08-25 11:53:34      阅读:359      评论:0      收藏:0      [点我收藏+]

标签:des   style   http   color   java   os   io   strong   for   

In computer scienceconsistency models are used in distributed systems like distributed shared memory systems or distributed data stores (such as a filesystemsdatabasesoptimistic replication systems or Web caching). The system supports a given model if operations on memory follow specific rules. The data consistency model specifies a contract between programmer and system, wherein the system guarantees that if the programmer follows the rules, memory will be consistent and the results of memory operations will be predictable.

High level languages, such as C, C++, and Java, partially maintain the contract by translating memory operations into low-level operations in a way that preserves memory semantics. To hold to the contract, compilers may reorder some memory instructions, and library calls such as pthread_mutex_lock() encapsulate required synchronization.[1]

Verifying sequential consistency is undecidable in general, even for finite-state cache-coherence protocols.[2]

Consistency models define rules for the apparent order and visibility of updates, and it is a continuum with tradeoffs.[3]

Example[edit]

Assume that the following case occurs:[3]

  • The row X is replicated on nodes M and N
  • The client A writes row X to node N
  • After a period of time t, client B reads row X from node M

The consistency model has to determine whether client B sees the write from client A or not.

Types[edit]

A non-exhaustive list of consistency models are

See also[edit]

Consistency model(The system supports a given model if operations on memory follow specific rules)

标签:des   style   http   color   java   os   io   strong   for   

原文地址:http://blog.csdn.net/aigoogle/article/details/38818033

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!