11.Coordination & Agreement Flashcards

1
Q

2 Different algorithms to implement mutual exclusion?

A
  1. ring-based election

2. bully algorithm

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

Which process is elected (with respect to it’s identifier?)

A

The process with the largest identifier

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

Who can initiate an election?

A

Any process

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

Do the processed need to know the result of the election?

A

YA

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

In ring-based election algorithm, what should a receiver do If the identifier in the message is larger than it’s own?

A

Forward it unchanged

Become participant

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

In ring-based election algorithm, what should a receiver do If the identifier in the message is smaller than it’s own?

A

Forward message but with it’s own identifier

Become participant

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

What should the receiver in the ring-based election algorithm do if it’s already a participant upon receiving the message?

A

discard the message

become participant

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

When does election happen in the ring based election algorithm?

A

When the identifier in the message is equal to the receiver id

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

What should the receiver do once it has been elected?

A

Tell all processes

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

What do the other processes do upon finding out election has happened?

A

Pass on result

Become non-participating

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

Which system is synchronous and which asynchronous out of bully and ring?

A

Bully -> synchronous (timeouts)

Ring -> asynchronous

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

What are the three types of message in the Bully algorithM?

A

initiate Election
answer (Election)
coordinator (Announce election result)

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

What are the two timeouts in the bully algorithM?

A

If election result isn’t announced in T+T

If answer isn’t receiver in T

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

Describe process of bully election

A
  • start election by sending it to each process with larger id
  • f no answer consider itself elected and send coordinator message to all lower processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly