MutualExclusion Flashcards

1
Q

What is mutual exclusion in distributed systems?

A

A condition where only one process can access a shared resource or perform a specific function at any given time.

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

What is a critical section?

A

A section of code where a process accesses a shared resource. Only one process can be in the critical section at a time.

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

What are some examples of mutual exclusion in real-world systems?

A

1) Database updates in an enterprise system. 2) Actuator control in IoT systems. 3) Autonomous vehicles accessing a narrow bridge. 4) Robots recharging at a charging base.

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

What are the key requirements for a mutual exclusion algorithm?

A

1) Safety: No two processes can be in the critical section simultaneously. 2) Liveness: Every process should eventually enter the critical section. 3) Fairness: All processes should have a fair chance to enter the critical section. 4) Efficiency: Low complexity. 5) Robustness: Tolerates failures.

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

What is the centralized mutual exclusion algorithm?

A

A single coordinator manages access to the resource. Processes request access from the coordinator, which grants or denies access based on a queue.

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

What are the benefits of the centralized mutual exclusion algorithm?

A

Safe, live, fair, and low complexity (3 messages per request).

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

What are the problems with the centralized mutual exclusion algorithm?

A

Not robust: The coordinator is a single point of failure and a bottleneck.

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

What is the Token Ring algorithm?

A

A distributed mutual exclusion algorithm where processes are arranged in a logical ring, and a token circulates among them. The process holding the token can enter the critical section.

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

What are the benefits of the Token Ring algorithm?

A

Safe (only one process at a time has the token), live, and suitable for distributed resources.

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

What are the problems with the Token Ring algorithm?

A

Not fair, inefficient (token must always be transmitted), not robust (token loss requires regeneration), and not suitable for large-scale systems.

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

What is Lamport’s Mutual Exclusion Algorithm?

A

A fully distributed algorithm where each process maintains a request queue (FIFO) and uses logical clocks to order requests.

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

What are the benefits of Lamport’s Mutual Exclusion Algorithm?

A

Safe, live, and fair.

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

What are the problems with Lamport’s Mutual Exclusion Algorithm?

A

High complexity (3*(N-1) messages) and not robust (if a process dies, the algorithm is blocked).

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

What is the Ricart & Agrawala Algorithm?

A

A simplification of Lamport’s algorithm that combines REPLY and RELEASE messages to reduce message traffic.

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

What are the benefits of the Ricart & Agrawala Algorithm?

A

Safe, live, fair, and more efficient than Lamport’s (2*(N-1) messages).

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

What are the problems with the Ricart & Agrawala Algorithm?

A

Not robust (N points of failure).

17
Q

What is a decentralized mutual exclusion algorithm?

A

An approach where controllers and resources are replicated across multiple nodes. Processes request access from multiple coordinators, and access is granted based on a majority vote.

18
Q

What are the benefits of decentralized mutual exclusion algorithms?

A

More robust due to replicated coordinators, and probabilistically performs well in terms of liveness and fairness.

19
Q

What are the problems with decentralized mutual exclusion algorithms?

A

High demand can lead to many requests, and fairness is not guaranteed.

20
Q

What is the Distributed Hash Table (DHT) system structure?

A

A decentralized system structure that maps replicated controllers and resources to different nodes using a hash function.

21
Q

How does the decentralized mutual exclusion algorithm work?

A

A process requests permission from all coordinators associated with a resource’s replicas. Access is granted if a majority of coordinators approve.

22
Q

What is the main advantage of decentralized mutual exclusion algorithms over centralized ones?

A

Decentralized algorithms are more robust as they do not rely on a single coordinator.

23
Q

What are combinatorial schemes in mutual exclusion?

A

Schemes that allocate multiple resources simultaneously, often used in complex systems like cellular telephony or traffic control.

24
Q

How can mutual exclusion be achieved in systems with strategic agents?

A

Through negotiation among agents, considering cooperation, competition, or strategic reasons for accessing resources.

25
Q

What is the main trade-off in decentralized mutual exclusion algorithms?

A

They are more robust but complex and often involve probabilistic factors, which can lead to inefficiencies or unfairness.