Relia eliable ble Broadc oadcas ast t (et (et al.) al.) Hoa - - PowerPoint PPT Presentation

relia eliable ble broadc oadcas ast t et et al al
SMART_READER_LITE
LIVE PREVIEW

Relia eliable ble Broadc oadcas ast t (et (et al.) al.) Hoa - - PowerPoint PPT Presentation

N ETWORK E MBEDDED S YSTEMS Relia eliable ble Broadc oadcas ast t (et (et al.) al.) Hoa Do O VERVIEW 19.04.2007 Motivation and Definition Best Effort Broadcast Regular Reliable Broadcast Lazy Reliable Broadcast Eager


slide-1
SLIDE 1

NETWORK EMBEDDED SYSTEMS

Relia eliable ble Broadc

  • adcas

ast t (et (et al.) al.)

Hoa Do

slide-2
SLIDE 2

OVERVIEW

Motivation and Definition Best Effort Broadcast Regular Reliable Broadcast

 Lazy Reliable Broadcast  Eager Reliable Broadcast

19.04.2007

2 / 28

slide-3
SLIDE 3

MOTIVATION

Client-Server Computing Point-to point communication protocols Extremely useful is protocol is reliable

19.04.2007

3 / 28

slide-4
SLIDE 4

DEFINITION

Reliability

in context of broadcast means, that “Message exchanged between two ore more processors are not lost or duplicated, and are delivered in the order in which they were sent.”

19.04.2007

4 / 28

slide-5
SLIDE 5

DEFINITION

Broadcast

“The sending of one transmission to multiple users in a defined group”

 Best-effort: delivery among all correct processes if sender does not fail  Regular Reliable: all-or-nothing delivery semantics, even if sender fails  Uniform Reliable: set of message delivered by fault processes is always

a subset of messages delivered by correct processes

 Totally ordered: delivery message follows the same global order  Termination: processes either deliver a message or eventually are

aware that they should never deliver the message.

19.04.2007

5 / 28

slide-6
SLIDE 6

DEFINITION

Multicast

“Multicast is a subset of broadcast that extends the broadcast concept of one to many by allowing "the sending of one transmission to many users in a defined group, but not necessarily to all users in that group."

19.04.2007

6 / 28

slide-7
SLIDE 7

BEST EFFORT BROADCAST

 Weak form of reliability  Process sends a message to all processes

(including itself)

 One-shot operation  Reliability is in charge of sender  Remaining processes do not have to be concerned

with enforcing the reliability of received messages

 No delivery guarantees if sender fails  Uses perfect links

19.04.2007

7 / 28

slide-8
SLIDE 8

BEST EFFORT BROADCAST

Implementation of BestEffortBroadcast (beb):

 Events:  Request:

 < bebBroadcast | m >: Used to broadcast message m to all

processes

 Indication

 < bebDeliver| src, m >: Used to deliver message m broadcast

by process src

 Uses:  PerfectPointToPointLinks (pp2p)

19.04.2007

8 / 28

slide-9
SLIDE 9

BEST EFFORT BROADCAST

Pseudo Code Implementation:

upon event < bebBroadcast | m > do forall pi  ∏ do trigger < pp2pSend | pi,m >;

upon event < pp2pDeliver | pi,m > do

trigger < bebDeliver| pi, m >:

19.04.2007

9 / 28

slide-10
SLIDE 10

BEST EFFORT BROADCAST

19.04.2007

10 / 28

slide-11
SLIDE 11

BEST EFFORT BROADCAST

PROPERTIES

 BEB1. Validity: If pi and pj are correct, then every

message broadcast by pi is eventually delivered by pj

 BEB2. No duplication: No message is delivered more

than once

 BEB3. No creation: No message is delivered unless it

was broadcast

19.04.2007

11 / 28

slide-12
SLIDE 12

BEST EFFORT BROADCAST

Proofs:

 Correctness:

derived from the properties of the underlying perfect point-to- point links (PL1: Reliable delivery)

 Validity

derived from PL1 and the fact that the sender sends the message to every other process in the system

 No Duplication

derived from PL2: No duplication

 No Creation

derived from PL3: No creation

19.04.2007

12 / 28

slide-13
SLIDE 13

BEST EFFORT BROADCAST

Performance:

Requires a single communication step Exchange of N messages (where N is the nummer of processes)

19.04.2007

13 / 28

slide-14
SLIDE 14

REGULAR RELIABLE BROADCAST

 Stronger form of reliability  Agreement is ensured even if sender fails  Correct processes agree on the set of messages

they deliver, even when the senders of the message crash during the transmission

 Sender may fail before being able to transmit the

message → no process will deliver it

 Uses perfect links  Uses perfect failure detector (optional)

19.04.2007

14 / 28

slide-15
SLIDE 15

REGULAR RELIABLE BROADCAST

Implementation of (regular) ReliableBroadcast (rb)

 Events:  Request:

 < rbBroadcast | m >: Used to broadcast message m

 Indication

 < rbDeliver| src, m >: Used to deliver message m broadcast by

process src

 Uses  BestEffortBroadcast (beb)

(only Lazy Reliable Broadcast:

 PerfectFailureDetector  )

19.04.2007

15 / 28

slide-16
SLIDE 16

REGULAR RELIABLE BROADCAST

2 Implementations:

 Lazy Reliable Broadcast  Eager Reliable Broadcast

19.04.2007

16 / 28

slide-17
SLIDE 17

LAZY RELIABLE BROADCAST

 Uses Best Effort Broadcast to disseminate

message

 Adds some protocol headers to the message

exchanged

 If sender does not crash, message will be delivered

to all correct processes.

 If sender crashes, other process can detect that

crash and relays the message to all

 Relays only a copy of the message and not the

message itself

19.04.2007

17 / 28

slide-18
SLIDE 18

LAZY RELIABLE BROADCAST

 Algorithm is said to be lazy in the sense that it

retransmits a message only if the original sender has been detected to have crashed Two kinds of events can force a process to retransmit a message:

 Process detects the crash of the source  Process delivers a message and realizes that the

source has already been detected to have crashed

19.04.2007

18 / 28

slide-19
SLIDE 19

LAZY RELIABLE BROADCAST

Implementation of (Lazy) ReliableBroadcast (rb):

upon event < Init > do: delivered := Ø; correct := ∏; forall pi  ∏ do from [pi] := Ø; upon event < rbBroadcast | m > do trigger < bebBroadcast | [DATA, self, m] >; upon event < bebDeliver | pi, [DATA, sm, m] > do if ( m deliver ) then deliver := deliver  {m}; trigger < rbDeliver | sm,m >; from [pi] := from [pi]  {(sm,m )}; if (pi  correct) then trigger < bebBroadcast | [DATA, sm, m] >; upon event <crash | pi > do correct := correct \ {pi}; forall (sm,m)  from [pi] do trigger <bebBroadcast | [DATA, sm, m] >;

19.04.2007

19 / 28

slide-20
SLIDE 20

LAZY RELIABLE BROADCAST

PROPERTIES

 RB1 = BEB1. Validity: If pi and pj are correct, then every

message broadcast by pi is eventually delivered by pj

 RB2 = BEB2. No duplication: No message is delivered more

than once

 RB3 = BEB3. No creation: No message is delivered unless it

was broadcast

 RB4. Agreement: For any message m, if a correct

process delivers m, then every correct process delivers m

19.04.2007

20 / 28

slide-21
SLIDE 21

LAZY RELIABLE BROADCAST

Performance:

 If sender does not crash, the algorithm requires

a single communication step and N messages

 Otherwise N2 messages and in the worst case

(process crashes in sequence) N steps are required

19.04.2007

21 / 28

slide-22
SLIDE 22

EAGER RELIABLE BROADCAST

 If accuracy property of the failure detector is not

satisfied, process might be relaying messages when it is not really necessary → Waste of resource but does not impact correctness

 If completeness property of the failure detector is

not satisfied, process might not be relaying messages that they should be relaying → Might violate agreement Circumvent the need of a failure detector by adopting an eager scheme

19.04.2007

22 / 28

slide-23
SLIDE 23

EAGER RELIABLE BROADCAST

 Every process that gets a message relays it

immediately

 We consider the worst case → sender might have

crashed → we relay every message

 This relaying phase is exactly what guarantees the

agreement property of reliable broadcast. The resulting algorithm is called Eager Reliable Broadcast.

 Algorithm assumes fail silent model and does not

use any failure detector.

19.04.2007

23 / 28

slide-24
SLIDE 24

EAGER RELIABLE BROADCAST

Implementation of (Eager) ReliableBroadcast (rb): upon event < Init > do: delivered := Ø; upon event < rbBroadcast | m > do deliver := deliver  {m}; trigger < rbDeliver | self, m >; trigger <bebBroadcast | [DATA, self, m] >; upon event < bebDeliver | pi, [DATA, self, m] > do if m deliver do deliver := deliver  {m}; trigger <rbDeliver | sm, m] >; trigger < bebBroadcast | [DATA, sm, m] >;

19.04.2007

24 / 28

slide-25
SLIDE 25

EAGER RELIABLE BROADCAST PROPERTIES

 RB1 = BEB1.  RB2 = BEB2.  RB3 = BEB3.  RB4: Agreement: For any message m, if a correct process

delivers m, then every correct process delivers m

19.04.2007

25 / 28

slide-26
SLIDE 26

EAGER RELIABLE BROADCAST PROPERTIES

Performance:

In best case algorithm requires a single communication step and N2 messages In worst case (process crashes in sequence) N steps and N2 messages are required

19.04.2007

26 / 28

slide-27
SLIDE 27

COMPARISON

19.04.2007

27 / 28

 Reliability in charge if

sender

 only ensures delivery

among all correct processors

 Uses perfect links  All-or-nothing semantic  Agreement is ensured

even if the sender fails

 Uses perfect failure

detector

Best Effort Broadcast Regular Reliable Broadcast

slide-28
SLIDE 28

THE END

Thank you for your attention! Questions?

19.04.2007

28 / 28