NUNIT 2
NUNIT 2
Chapter 6
Message ordering and group communication: Message ordering paradigms –
Asynchronous execution with synchronous communication –Synchronous program
order on an asynchronous system –Group communication – Causal order (CO) - Total
order.
Message ordering paradigms
• Notations
• ) Network (N, L); event set (E, ≺)
• ) message mi : send and receive events si and r i
• ) send and receive events: s and r .
• ) M, send (M), and receive(M)
• ) Corresponding events: a ∼ b denotes a and b occur at the same process
• ) send-receive pairs T = {(s, r ) ∈ Ei × Ej | s corresponds to r }
Message ordering paradigms
distributed program.
• The programmer can then code the program logic with respect to this
behaviour
Asynchronous executions
• On any logical link in the system, messages are necessarily delivered in the
• Although the logical link is inherently non- FIFO, most network protocols
• The receiver uses a buffer to order the incoming messages as per the
s1 r2 r3 r2 s3 r2
P1
m3
m1 m3
m2 s1s3 m2 r3 m2
P2 2
s r1 m1 s1
m1
P3
s2 r1 s2 r1
(a) (b) (c)
Figure 6.5: Illustration of non-RSC A-executions and crowns.
Fig 6.5(a): crown is ((s1, r 1), (s2, r 2 )) as we have s1 ≺ r 2 and s2 ≺ r1
Fig 6.5(b) (b) crown is ((s1, r 1), (s2, r 2 )) as we have s1 ≺ r 2 and s2 ≺ r 1
Fig 6.5(c): crown is ((s1, r 1), (s3, r 3), (s2, r 2 )) as we have s1 ≺ r 3 and s3 ≺ r 2 and s2 ≺ r 1
Fig 6.2(a): crown is ((s1, r 1), (s2, r 2), (s3, r 3 )) as we have s1 ≺ r 2 and s2 ≺ r 3 and s3 ≺ r 1.
Crown criterion
An A-computation is RSC, i.e., it can be realized on a system with synchronous communication, iff
it contains no crown.
Crown test complexity: O(|E |) (actually, # communication events)
SYNC
CO
A
FIFO
SYNC
(a) (b)
Figure 6.7: Hierarchy of message ordering paradigms. (a) Venn diagram (b) Example executions.
• Rendezvous
• Algorithm for binary rendezvous
Synchronous program order on an asynchronous system
2 If a request(M’) arrives from a lower priority process Pk , Pi executes send(permission(M’)) to Pk and blocks waiting for the
message M r . When M r arrives, the RECEIVE(M’) event is executed.
3 When the permission(M) arrives, Pi knows partner Pj is synchronized and Pi executes send(M). The SEND(M) now completes.