Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 2 – Distributed Systems.

Similar presentations


Presentation on theme: "Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 2 – Distributed Systems."— Presentation transcript:

1 Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 2 – Distributed Systems

2 Leader election Assumptions –Ring topology –Synchronous network –No failures Goal –Exactly one process says: “I am the leader”

3 Algorithms Basic –Time: O(n) rounds –Message complexity: O(n 2 ) More complicated –Time: O(n) rounds –Message complexity: O(n log n)

4 Lower bounds - Messages Comparison based algorithms –O(n log n) messages In general –O(n) messages Asynchronous networks –O(n log n)

5 Shortest path routes Input –Connected, undirected graph –Destination Output –Shortest route to destination Model: self-stabilizing –Asynchronous –Arbitrary failures (corrupt state) –Eventual stabilization

6 Bellman-Ford Every so often: –Ask all neighbors distance –Set distance to minimum Destination always: distance=0 Stabilizes after n “rounds”

7 Consensus Input –1 or 0 to each node Output –Agreement: all nodes decide either 0 or 1 –Termination: all nodes eventually decide –Validity: if all inputs 1, then decide 1

8 Motivation Many problems equivalent to consensus –Read-Modify-Write Memory –Database commit –Transactional filesystem –Totally ordered broadcast –Distributed firing squad

9 Universality result Assume consensus service Assume non-fault tolerant sequential algorithm (date object) A Then –There exists a fault-tolerant, wait-free distributed implementation A’ of algorithm A

10 Asynchronous consensus Assume 1 stopping failure Impossible! [FLP 1985] If consensus algorithm C guarantees agreement and validity Then –There exists an execution of C that does not terminate

11 More consensus models Synchronous –f+1 rounds if f failures Asynchronous plus eventual synchrony –Eventual synchronized clocks –Eventual message delivery bound d –Consensus terminates  0((f+4)*d) after stabilization

12 Failure detectors Assume total asynchrony Assume failure detector service –Notifies node i when node j fails –Eventually… Allow solving consensus –Weakest failure-detector? –Leader-election failure-detector

13 Byzantine consensus What if some nodes lie? Synchronous model f stopping failures n nodes 2f+1 ≤ n

14 Other consensus problems Weak consensus –Not feasible Weak Byzantine consensus –Not feasible k-set consensus –f feasible Approximate consensus

15 Current research Dynamic networks –Joins/Leaves/Failures –Peer-to-peer networks –Mobile networks –Unknown participants Large scale networks –Data warehouses –Internet sized applications –Non-blocking, wait-free implementations

16 Formal methods IOA language and compiler Simulator Proof tools –Larch prover –Daikon invariant detection Java code generator (in progress)

17 Summary of results (1)

18 Summary of results (2)

19 Models Nodes –Bounded/unbounded –Unique ids –Known/unknown participants Communication –Network links  Known/unknown topology –Shared memory

20 Atomic memory Definition Motivation Algorithms?

21 Mutual exclusion Dijkstra Dining philosophers Resource allocation FINE


Download ppt "Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 2 – Distributed Systems."

Similar presentations


Ads by Google