11 - Coordination Flashcards

1
Q

Mutual Exclusion

A

Processes share a resource which must be exclusive access

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

Centralised algorithm

A

Single coordinator stores a queue and grants permission when applicable

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

Distributed Algorithm

A

Process sends message to all other processes (with res name, pID and logical timestamp)

Process returns OK if no interest in resource or is waiting with lower priority. Reply is deferred otherwise

High knowledge and comms requirement. Every process is a point of failure. Not scalable

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

Token Ring

A

Processes organised in logical ring
Token passed between them

Some topology knowledge. High comms due to constant passing of token. Problematic fault tolerance and limited scalability

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

Election Algorithm Requirements

A

Uniqueness (of a leader)
Termination (must end)
Agreement (for all processes)

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

Bully algorithm Strong assumptions

A

Each process knows all higher pID processes
Synchronous Comms - timeouts useful
Reliable message delivery
Processes allowed to crash

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

Bully algorithm

A

Elect active process with highest ID

Pk: ELECTION message is sent to all processes with higher IDs.
If no response then Pk wins and sends COORDINATOR message to all others.
If OK response, then Pk waits for COORDINATOR message or restarts election if timeout

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

Rough number of messages in bully algorithm

A

N^2

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

Ring Algorithm Assumptions

A

Processes in ring (knows successor)
Async comms enough
Reliable message delivery
Processes allowed to crash

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

Ring algorithm election

A

Any process starts by sending ELECTION to successor with a list
Receiver ACKs, passes it on with itself in the list
Once message returns, it sends COORDINATOR message around with list of all living processes
Highest pID is new coordinator

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

num of messages in ring algorithm

A

N messages

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

Election in Wireless assumtpions

A

Processes know current neighbors
Async comms enough (if neighbours are known, comms reliable and no crashing)
Reliable message delivery
Processes should not crash

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

Wireless Net Election

A

Elect most suitable process (eg with highest battery capacity)

Any process can broadscast ELECTION

if received for first time:
- set sender as parent
- Broadcast to neighbourhood N, not parent
- Wait until every process has ACK broadcast
- ACK to parent
- Recive info from each child
- Determine best process and send info to parent

Otherwise:
- ACK

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