Professional Documents
Culture Documents
CSCE 668
DISTRIBUTED ALGORITHMS AND
SYSTEMS
CSCE 668
Spring 2014
Prof. Jennifer Welch
Distributed Systems
2
share resources
communicate
increase performance
speed
fault tolerance
Characterized by
Uncertainty in Distributed
Systems
cf. NP-completeness
Application Areas
6
operating systems
(distributed) database systems
software fault-tolerance
communication networks
multiprocessor architectures
cloud computing
mobile computing,
Set 1: Introduction CSCE 668
message passing
shared memory
synchronous
asynchronous
asynchronous
Yes
Shared memory
No
Yes
10
12
13
Relationship of Theory to
Practice
mutual exclusion
deadlock
14
Relationship of Theory to
Practice
Failure models:
Message-Passing Model
15
Message-Passing Model
16
p3
1 p
0
3
2
2
p2
1
2
p1
17
18
outbuf[2]
p1's local
variables
p2's local
variables
outbuf[1]
inbuf[2]
Configuration
19
Deliver Event
20
p1
m3 m2 m1
m3 m2
p2
m1
p2
Computation Event
21
Computation Event
22
b
a
c
old
local
state
d e
new
local
state
Execution
23
Format is
config, event, config, event, config,
in first config: each processor is in initial
state and all inbufs are empty
for each consecutive (config, event, config),
new config is same as old config except:
Admissibility
24
Asynchronous Executions
25
Example: Flooding
26
Example: Flooding
27
p0
p2
M
deliver event
at p1 from p0
p1
p0
p0
p2
p1
p0
M
p2
p1
M
computation
event by p1
M
deliver event
at p2 from p1
p2
p1
M
computation
event by p2
M
M
p0
M
M
p2
deliver event
at p1 from p2
p1
M
M
M
M
p2
M
p1
deliver event
at p0 from p1
p1
M
p0
M
p2
p0
p2
p0
computation
event by p1
M
p1
etc. to
deliver
rest of
msgs
Nondeterminism
29
Termination
30
31
Termination of Flooding
Algorithm
32
Message Complexity
Measure
33
Message Complexity of
Flooding Algorithm
35
Time Complexity of
Flooding Algorithm
36
37
38
Example of Synchronous
Model
deliver M to p1 from p0
deliver M to p2 from p0
p0 does nothing (as it has no incoming messages)
p1 receives M, turns green and sends M to p0 and
p1
p2 receives M, turns green and sends M to p0 and
p1
Set 1: Introduction CSCE 668
39
Example of Synchronous
Model
Round 2:
deliver M to p0 from p1
deliver M to p0 from p2
deliver M to p1 from p2
deliver M to p2 from p1
p0 does nothing since its color variable is already
green
p1 does nothing since its color variable is already
green
p2 does nothing since its color variable is already
green
Set 1: Introduction CSCE 668
40
Example of Synchronous
Model
p
M
p0
p2
M
p1
M
round 1
events
p2
M M
p1
round 2
events
p0
p2
p1
Set 1: Introduction CSCE 668
41
Complexity of Synchronous
Flooding Algorithm