Brendan Ang

Search

Search IconIcon to open search

Distributed Shared Memory

Last updated Feb 8, 2023 Edit Source

# Distributed Shared Memory

# Registers

A register represents each memory location. The operations are:

# Trace

A trace is a sequence of events

# Properties

Well-formed

# Regular Register Algorithms

A regular register is one that meets the following criteria: Termination

# Fail-Stop Read-one Write-All

Uses perfect failure detector P: write(v)

  1. Update local value to v
  2. Fail Stop Broadcast v to all, and each node locally updates to v: 1 RTT needed
  3. Wait for ACK from all correct processes
  4. Return: this return means that all processes have updated locally to v, validity is ensured! read
  5. Return local value: 0 RTT needed 500 Eventually perfect failure detector will not work here as it might falsely suspect some processes as having crashed. During this time, since a write on another process only waits for ACKs from all correct processes, it could return early. A read on the falsely suspected process will incorrectly return the old value.

# Fail silent Majority voting

Make use of timestamp-value pairs, tvp = (ts, v), where the timestamp can be used to determine which value is more recent. Each process stores the value of register r with max timestamp of each register r.

Majority idea is based of quorums.

# Sequential Consistency

Allows executions whose results appear as if the operations of each processes were executed in some sequential order according to “local time” (we can reorder operations across processes but not locally):

# Liveness requirements

# Register Linearizability/Atomicity

Allows executions whose results appear as if the operations of each processes were executed in some sequential order according to “global time” (cannot reorder):

# Read/Write Majority Problem

# Read-Impose Write Majority

# Extending to N readers N writers (Read-impose Write-consult-majority)

Problem: Before writing, read from majority to get the latest timestamp (query phase before update phase): 2 RTT needed

# Eventual Consistency

State updates can be issued at any replica/correct process. All updates are disseminated via BEB, RB,…

# Strong Eventual Consistency

If state operations are commutative and processes exchange information, eventually they converge to an identical view.

# Conflict Free Replicated Data Types (CRDTs)

Data structures which implement strong eventual consistency. The join operation allows there to be a commutative operation relationship between sets. However, operations need to have a strict monotonically increasing effect on the set.

# State Based CRDT (CvRDT)

# Grow-Only Counter

# Up-Down Counter

# Or-Set

# Operation Based CRDTs (CmRDTs)

CmRDTs impose stricter assumptions. Causally dependent updates are replaced with Causal Broadcast and the join function is replaced with any commutative update function.

# Or-Set