LeaderElection Flashcards

1
Q

What are distributed algorithms used for?

A

Leader election, consensus, mutual exclusion, and global predicate evaluation.

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

What is the purpose of a leader in distributed systems?

A

To coordinate access to resources, execute specific tasks, or act as an observer for global predicate evaluation.

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

What are the two main scenarios in leader election?

A

1) All processes/agents are equally suitable. 2) Some processes/agents are better suited than others.

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

When are elections needed in distributed systems?

A

1) System initialization without a leader. 2) Current coordinator crashes or retires. 3) A specific task requires a leader.

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

What must happen when an election algorithm terminates?

A

A single process is selected as the leader, and all processes agree on its identity.

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

What is the main assumption in traditional leader election algorithms?

A

Every process has a unique ID and knows the IDs of all other processes.

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

How does the Bully Algorithm work?

A

Higher-numbered processes “bully” lower-numbered processes out of the election until only one process remains.

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

What is the complexity of the Bully Algorithm if the highest ID process starts the election?

A

n-1 messages.

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

What is the complexity of the Bully Algorithm if the lowest ID process starts the election?

A

n(n-1) messages.

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

How does the Ring Algorithm work?

A

Processes are arranged in a logical ring, and an ELECTION message circulates until it returns to the initiator, who then declares the leader.

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

What is the complexity of the Ring Algorithm?

A

2n messages (two full laps around the ring).

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

Why are traditional leader election algorithms unsuitable for wireless and dynamic systems?

A

They assume nodes know each other a priori, which excludes dynamic scenarios where processes come and go.

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

How do wireless election algorithms work?

A

Any node can initiate an election by sending an ELECTION message to its neighbors, building a spanning tree to elect the most eligible node.

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

What is distributed aggregation?

A

Computing an aggregation function (e.g., max, min, average) from the local states of processes.

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

What is gossiping in distributed aggregation?

A

Processes share and update their knowledge of the aggregation function by periodically exchanging values with neighbors.

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

How does Max/Min aggregation work?

A

The maximum or minimum value is spread from process to process, eventually reaching all nodes in the network.

17
Q

How does average aggregation work?

A

Each process continuously computes the average with its neighbors, contributing to the convergence of the algorithm.

18
Q

What are some challenges in handling dynamic values in distributed aggregation?

A

Values may change over time, and solutions include dividing time into epochs or letting aggregate values “evaporate” to recompute them.