Distributed Algorithms

Table of Contents

Intro

Distributed vs uniprocessor

Communication in distributed system

Main paradigms:

Asynchronous communication: sending and receiving are independent events (synchronous is the opposite)

Communication protocol detects and corrects errors during message passing

Assumptions we make:

Directed vs bidirectional channels

complexity measures:

Big O notation

Transition systems

Execution: sequence γ₀ γ₁ γ₂… of configurations that

States and events

Assertion:

Invariants:

Causal order

Computations

Clocks

Lamport’s clock

Vector clock

Vector clock diagram

Snapshots

snapshot of execution of distributed algorithm should return configuration of execution in the same computation

distinguish: basic messages of underlying distributed algorithm, control messages of snapshot algorithm

snapshot of basic execution contains

meaningful snapshot: if configuration of execution in same computation as actual execution

Chandy-Lamport algorithm

decentralised. assumes directed network with FIFO channels.

  1. Some node takes a snapshot, starts recording on channels, then sends out marker messages across all channels before any other mesages
  2. When a node receives the marker control message:
    • if this is the first one it received:
      • take a snapshot (record its own state)
      • mark the corresponding channel as empty
      • start recording on all other channels
      • send out marker messages on all channels, before any other messages
    • else:
      • stop recording the corresponding channel
      • set that channel’s state to all messages received since the snapshot

This is a very good explanation

Complexity:

Lai-Yang algorithm

allows that channels are non-FIFO