In computer science,Consistency ModelsAre used in distributed systems like distributed shared memory systems or distributed data stores (such as a filesystems, databases, optimistic 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 comprehenages, 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 callsuchpthread_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]
Contents [hide]
- 1 Example
- 2 types
- 3 See also
- 4 references
- 5 Further reading
- 6 external links
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
- Causal consistency
- Delta consistency
- Entry consistency
- Eventual consistency
- Fork consistency
- Linearizability (also known as strict or atomic consistency)
- One-copy serializability
- PRAM consistency (also known as FIFO consistency)
- Release consistency
- Sequential consistency
- Serializability
- Vector-field consistency
- Weak Consistency
- Strong Consistency
See also [edit]
- Cache Coherence
- Distributed Shared Memory
- Non-uniform memory access
Consistency model (the system supports a given model if operations on memory follow specific rules)