Distributed systems: partial orders and Lamport clocks
These are my notes for Lindsey Kupuer's spring 2020 distributed systems course.
- Lecture 3/4 - partial orders and Lamport clocks
- Lecture 5 - vector clocks
- Lecture 6 - delivery guarantees
- Lecture 7 - causal broadcast
- A synchronous network is one where message delivery time is bounded. An asynchronous network is one where it is not.
- A "happens before" relation describes the order of events in a distributed system:
- If appears before in the same process, then ;
- If is a send and is the corresponding receive, then ;
- If and , then .
- A partial order is a set with a binary relation with the following properties:
- Reflexive: ;
- Antisymmetric: if and , then ;
- Transitive: if and , then .
- The " " relation is a partial order without reflexivity.
- Lamport clocks:
- To assign Lamport clocks to events:
- Initialize counter to 0 for all processes.
- Increment the counter on each event.
- Send the counter with every message.
- When receiving a message, set counter to .
- If , then .
- To assign Lamport clocks to events: