**1.What is the primary goal of mutual exclusion in parallel and distributed systems?**

a. Maximizing hardware diversity

b. Achieving efficient load balancing

c. Ensuring only one process accesses a critical section at a time

d. Ignoring fault tolerance

Answer: c

**2.Which property is essential for a mutual exclusion algorithm to be correct?**

a. Hardware diversity

b. Progress

c. Load balancing

d. Fault tolerance

Answer: b

**3.What does the term “critical section” refer to in the context of mutual exclusion?**

a. A section of code that executes without synchronization

b. A section of code where shared resources are accessed

c. Maximizing fault tolerance

d. Ignoring load balancing

Answer: b

**4.Which algorithm is based on the idea of “turns” to achieve mutual exclusion?**

a. Dekker’s algorithm

b. Lamport’s bakery algorithm

c. Peterson’s algorithm

d. Fischer’s algorithm

Answer: c

**5.In Lamport’s bakery algorithm, what does each process take before entering the critical section?**

a. A ticket number

b. A shared lock

c. A turn variable

d. A priority number

Answer: a

**6.Which algorithm uses “flags” and “turns” to achieve mutual exclusion?**

a. Dekker’s algorithm

b. Peterson’s algorithm

c. Lamport’s bakery algorithm

d. Fischer’s algorithm

Answer: a

**7.What is the primary purpose of the “turn” variable in Peterson’s algorithm?**

a. Indicating the priority of a process

b. Ensuring progress in mutual exclusion

c. Assigning tickets to processes

d. Ignoring load balancing

Answer: b

**8.In Fischer’s algorithm, how many processes can enter the critical section simultaneously?**

a. One

b. Two

c. Three

d. Multiple

Answer: a

**9.What is the primary goal of the “test-and-set” instruction in mutual exclusion algorithms?**

a. Maximizing hardware diversity

b. Achieving efficient load balancing

c. Ensuring progress in mutual exclusion

d. Ignoring fault tolerance

Answer: c

**10.Which algorithm is based on the idea of “flags” and “waiting” to achieve mutual exclusion?**

a. Dekker’s algorithm

b. Peterson’s algorithm

c. Lamport’s bakery algorithm

d. Fischer’s algorithm

Answer: a

**11.What does the term “busy waiting” refer to in the context of mutual exclusion?**

a. A process waiting for a turn variable

b. A process repeatedly checking a condition in a loop

c. Achieving load balancing

d. Ignoring fault tolerance

Answer: b

**I12.n Lamport’s bakery algorithm, how are ties resolved between processes with the same ticket number?**

a. Based on their process ID

b. Based on their priority

c. Randomly

d. Simultaneously

Answer: a

**13.What is the role of the “interested” array in Fischer’s algorithm?**

a. Indicating which processes are interested in entering the critical section

b. Assigning priority numbers to processes

c. Managing the turn variable

d. Ignoring load balancing

Answer: a

**14.****n Peterson’s algorithm, what is the purpose of the “flag” variables?**

a. Indicating which processes are interested in entering the critical section

b. Managing the turn variable

c. Assigning priority numbers to processes

d. Ensuring progress in mutual exclusion

Answer: a

**15.Which algorithm uses a “victim” variable to achieve mutual exclusion?**

a. Dekker’s algorithm

b. Peterson’s algorithm

c. Lamport’s bakery algorithm

d. Fischer’s algorithm

Answer: a

**16.In Fischer’s algorithm, what is the role of the “num” array?**

a. Managing the turn variable

b. Indicating which processes are interested in entering the critical section

c. Assigning priority numbers to processes

d. Counting the number of processes in the critical section

Answer: d

**17.What is the primary advantage of Lamport’s bakery algorithm?**

a. Simplicity and ease of understanding

b. Minimal use of flags and turns

c. Efficient handling of ties in ticket numbers

d. Maximizing fault tolerance

Answer: a

**18.In Peterson’s algorithm, what is the significance of the “turn” variable?**

a. Indicating which processes are interested in entering the critical section

b. Managing the order in which processes enter the critical section

c. Assigning priority numbers to processes

d. Counting the number of processes in the critical section

Answer: b

**19.What is the primary disadvantage of busy waiting in mutual exclusion algorithms?**

a. Inefficient use of system resources

b. Efficient load balancing

c. Maximizing fault tolerance

d. Simplicity and ease of understanding

Answer: a

**20.In Fischer’s algorithm, what is the purpose of the “turn” variable?**

a. Indicating which processes are interested in entering the critical section

b. Managing the order in which processes enter the critical section

c. Assigning priority numbers to processes

d. Counting the number of processes in the critical section

Answer: b

**21.Which algorithm is known for its simplicity and avoidance of busy waiting?**

a. Dekker’s algorithm

b. Peterson’s algorithm

c. Lamport’s bakery algorithm

d. Fischer’s algorithm

Answer: d

**22.What is the primary purpose of the “turn” variable in Fischer’s algorithm?**

a. Indicating which processes are interested in entering the critical section

b. Managing the order in which processes enter the critical section

c. Assigning priority numbers to processes

d. Counting the number of processes in the critical section

Answer: b

**23.In Peterson’s algorithm, how are ties between processes with the same priority resolved?**

a. Based on their process ID

b. Based on the turn variable

c. Randomly

d. Simultaneously

Answer: a

**24.What is the primary focus of Lamport’s bakery algorithm?**

a. Maximizing hardware diversity

b. Efficient load balancing

c. Achieving progress in mutual exclusion

d. Avoiding busy waiting

Answer: d

**25.In Fischer’s algorithm, what is the role of the “choosing” array?**

a. Indicating which processes are interested in entering the critical section

b. Managing the order in which processes enter the critical section

c. Avoiding busy waiting

d. Assigning priority numbers to processes

Answer: c

**26.What is the primary purpose of the “interested” array in Peterson’s algorithm?**

a. Managing the order in which processes enter the critical section

b. Avoiding busy waiting

c. Indicating which processes are interested in entering the critical section

d. Assigning priority numbers to processes

Answer: c

**27.In Fischer’s algorithm, how are ties between processes with the same priority resolved?**

a. Based on their process ID

b. Based on the turn variable

c. Randomly

d. Simultaneously

Answer: a

**28.What is the primary disadvantage of busy waiting in mutual exclusion algorithms?**

a. Efficient load balancing

b. Inefficient use of system resources

c. Simplicity and ease of understanding

d. Maximizing fault tolerance

Answer: b

**29.In Peterson’s algorithm, what is the role of the “victim” variable?**

a. Managing the order in which processes enter the critical section

b. Avoiding busy waiting

c. Indicating which processes are interested in entering the critical section

d. Assigning priority numbers to processes

Answer: b

**30.Which algorithm is known for its avoidance of busy waiting and simplicity?**

a. Dekker’s algorithm

b. Peterson’s algorithm

c. Lamport’s bakery algorithm

d. Fischer’s algorithm

Answer: d

## Read More MCQs on Parallel and Distributed Computing

- Cluster design MCQs
- Algorithms in Parallel and Distributed Computing MCQs
- MPI (Message Passing Interface) MCQs
- Scalability analysis of parallel systems MCQs
- Distributed graph algorithms MCQs
- Mutual exclusion algorithms MCQs in parallel computing MCQs
- Deadlock and termination detection algorithms MCQs
- Leader election algorithms MCQs
- Predicate detection algorithms MCQs
- Total order and causal order multicast MCQs
- Search algorithms and dynamic load balancing for discrete optimization MCQs
- Parallel and Distributed Computing MCQs
- Parallel Processing MCQs