The bully algorithm Flashcards

1
Q

when can we let processes crash during the election?

A

We can if we assume that the system is synchronous, so we can use timeouts to detect process failure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

state the Bully algorithm assumptions

A

Bully algorithm assumes that each process knows which
processes have higher identifiers, and can communicate with
each such process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name the Three types of messages in this algorithm

A

♦ election – announces an election
♦ answer – sent in response to an election message
♦ coordinator – announces identity of the elected process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how is an election initiated?

A

A process initiates an election when it notices, through timeouts,
that the current coordinator has failed – several processes may
discover this concurrently

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does Synchronous system assumptions enable?

A

construction of a reliable failure detector

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give the upper bound on the total elapsed time from sending a message to another process to receiving a response

A

T = 2 (T[trans] + T[process])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is T[trans]?

A

maximum transmission delay

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is T[process]?

A

maximum processing delay in a process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When and how can a process elect itself?

A

Process that knows it has the highest identifier can elect itself as the coordinator by sending a coordinator message to all processes with smaller identifiers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does a process with a lower identifier do? (3 things)

A

♦ Sends an election message to processes with higher identifiers and awaits an answer message in response
♦ if none arrives within time T, process considers itself the coordinator and sends a coordinator message to all processes with lower identifiers
♦ else waits T’ for a coordinator message to arrive from the new coordinator – if none arrives, it calls (begins) another election

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What happens when process p[i] receives a coordinator message?

A

If p[i] receives a coordinator message, sets elected[i]
to the identifier of the coordinator contained in the
message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens when process p[i] receives a election message?

A

If a process receives an election message, it sends

back an answer message and begins another election, unless it has begun one already

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What happens when a process is started to replace a crashed process?

A

it begins an election

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens when a process is started to replace a crashed process and that process has the highest identifier?

A

♦ if it has the highest identifier, then it will
announce itself as the new coordinator, even though the
current coordinator is functioning
♦ i.e. it “bullies” its way into being the coordinator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Performance of bully algorithm - how does it meet E2 (liveness) ?

A

E2 (liveness) is met by the assumption of reliable message delivery

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Performance of bully algorithm - how does it meet E1 (safety) ?

A

E1 (safety) is met under the assumption that no process is replaced

17
Q

Performance of bully algorithm - when does it not meet E1 (safety) ?

A

E1 (safety) is not met if processes that crash are replaced by processes with the same identifier

♦ Multiple processes may announce themselves coordinators concurrently

18
Q

If the assumed timeout values are inaccurate what does this imply?

A

The failure detector is unreliable and E1 may also be broken

19
Q

Performance of bully algorithm - Give the best case scenario in terms of:

  • number of messages
  • turnaround time
A

The second highest identifier notices coordinator’s failure, declares itself coordinator, sends N-2 messages to others;

turnaround time is 1
message transmission time

20
Q

Performance of bully algorithm - Give the worst case scenario in terms of:

  • number of messages
  • turnaround time
A

lowest identifier notices coordinator’s failure, since N-1 processes begin elections, O(N 2 ) messages; approx.

N+1 transmission times