Process Groups and Message Ordering
Process Groups and Message Ordering
If processes belong to groups, certain algorithms can be used that depend on group properties
membership
create
t ( name ),
) kill ( name )
join ( name, process ), leave ( name, process )
internal structure?
NO ( peer structure ) failure tolerant,
tolerant complex protocols
YES ( a single coordinator and point of failure ) simpler protocols
e.g. all join requests must go to the coordinator concurrent joins avoided
closed or open?
p
OPEN a non-member can send a message to the group
CLOSED only members can send to the group
failures?
a failed process leaves the group without executing leave
robustness
leave, join and failures happen during normal operation algorithms must be robust
application
process
message service
OS comms. interface
total order = every process receives all messages in the same order (including its own).
own)
We first consider causal order
time
m
P2
m
P3
P3
application
process
the message service can postpone the delivery
of messages to the application process
message service
OS comms. interface
application processes
1,0,0
2,1,0
P1
0,1,0
1,2,0
P2
P3
1,0,1
1,1,2
vector notation:
- fixed number of processes N
- each processs message service keeps a vector of dimension N
- for each process, each entry records the most up-to-date value of the state counter
delivered to the application process,
process for the process at that position
2,1,0
P1
P2
0,1,0
3,3,0
4,3,4
1,2,0 1,3,0
1,4,4
P3
1,0,1
1,1,2
1,3,3
1,3,4
2,2,0
P1
P2
110
1,1,0
P3
120
1,2,0
? = message service
000
0,0,0
P3s vector is at (0,0,0) and a message with timestamp (1,2,0) arrives from P2
i.e. P2 has received a message from P1 that P3 hasnt seen.
More detail of P3s message service:
receiver vector
sender sender vector decision new receiver vector
000
0,0,0
P2
120
1,2,0
buffer
0,0,0
000
P3 is missing a message from P1 that sender P2 has already received
0,0,0
P1
1,0,0
deliver
1,0,1
1,0,1
P2
1,2,0
deliver
1,2,2
In each case: do the sender and receiver agree on the state of all other processes?
If the sender has a higher state value for any of these others, the receiver is missing a
message so buffer the message
message,
Message ordering Process groups
2,0,2,0
P1
P2
P3
?
1,0,1,0
P4
1,0,2,0
1,0,0,1
1,0,2,2
P2
m1
P3
1,0,1,0
P4
3,2,2,0
2,2,0,0
P1
1100
1,1,0,0
1200
1,2,0,0
1320
1,3,2,0
m2
m3
1,0,2,0
1,0,0,1
1,0,2,2
1,2,3,0
1,2,2,3
10
11
2 3
P3
3
ACKs
12