Difficulty: Easy
Correct Answer: 2
Explanation:
Introduction / Context:
Dekker’s algorithm is a landmark software-only solution to mutual exclusion on a single processor with shared memory and no special atomic instructions. Knowing its scope and limitations is part of understanding concurrency primitives and their evolution.
Given Data / Assumptions:
Concept / Approach:
Dekker’s algorithm uses intent flags and a turn variable to ensure mutual exclusion, progress, and bounded waiting for exactly two processes. Extensions and other algorithms (Peterson’s, Lamport’s bakery algorithm) address two or many processes differently, but Dekker’s classic form is for two.
Step-by-Step Solution:
Verification / Alternative check:
Standard operating systems and distributed computing texts categorize Dekker’s algorithm as the first two-process mutual exclusion algorithm; multi-process solutions use other techniques.
Why Other Options Are Wrong:
1 is trivial and does not describe mutual exclusion. 3 or 4 require different algorithms or significant redesign. “None of the above” is incorrect because two is correct.
Common Pitfalls:
Confusing Dekker’s with Peterson’s algorithm (also two-process) or Lamport’s bakery algorithm (many processes).
Final Answer:
2
Discussion & Comments