language-icon Old Web
English
Sign In

Causal consistency

Causal consistency is known as one of the main weak memory consistency models that can be used to assign consistency restrictions to all memory accesses for distributed implementations of data structures in the domain of concurrent programming. For example, in distributed shared memory and distributed transactions. Causal consistency is known as one of the main weak memory consistency models that can be used to assign consistency restrictions to all memory accesses for distributed implementations of data structures in the domain of concurrent programming. For example, in distributed shared memory and distributed transactions. Other stronger consistency models like sequential consistency and linearizability have downsides such as: they take too long and require more space; also in terms of implementation, they are unattainable in some situations. Due to those reasons, causal consistency was proposed in the nineties as a weaker consistency model in order to improve the performance and gain in efficiency when defining the semantics of memory accesses in shared memory models. In causality, distributed executions are represented as partial orders based on Lamport's concept of potential causality. Causal consistency can be defined as a model that captures the causal relationships between operations in the system and guarantees that each process can observe those causally related operations in common causal order. In other words, all processes in the system agree on the order of the causally related operations. For instance, If there is an operation or event A that causes another operation B, then causal consistency provides an assurance that each other process of the system observes operation A before observing operation B. Therefore, causally related operations and concurrent operations are distinguishable in the causal consistency model. In more detail, if one write operation influences another write operation, then these two operations are causally related, one relies on the other. Concurrent operations are the ones that are unrelated by causality or causally independent. In particular, concurrent writes are independent operations, no one causes or influences the other. Thus, a system provides causal consistency if this following condition holds: write operations that are related by potential causality are seen by each process of the system in common order. Also, concurrent writes can occur in any order and can be seen in different orders by the processes in the system. Subsequently, causal consistency model is weaker than sequential consistency, which expects all processes to observe not just causally related writes but all write operations in common order. However, causal consistency is stronger than PRAM consistency, which requires only the write operations that are done by a single process to be observed in common order by each other process. It follows that when a system is sequentially consistent, it is also causally consistent. Additionally, causal consistency implies PRAM consistency, but not vice versa. Here is an example of causal consistency.

[ "Strong consistency", "Sequential consistency", "Consistency (statistics)", "Processor consistency", "PRAM consistency", "Geo-replication" ]
Parent Topic
Child Topic
    No Parent Topic