Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Dekker's algorithm

Parallel and Distributed Algorithm

Dekker's algorithm is the first known correct solution to the mutual exclusion problem in concurrent programming for processes that communicate only through shared memory. Edsger Dijkstra attributed it to the Dutch mathematician Th. J. Dekker, in an unpublished paper on sequential process descriptions and in his manuscript on cooperating sequential processes. It lets two threads share a single-use resource without conflict. Each process raises a flag to announce that it wants to enter its critical section, and a shared turn variable decides who has priority when both want in; the process without priority lowers its flag and waits until the turn comes back to it. This avoids the strict alternation of a naive turn-taking scheme and guarantees mutual exclusion, freedom from deadlock and freedom from starvation. It needs no special atomic test-and-set instruction, which makes it portable, but it is limited to two processes, relies on busy waiting, and on modern out-of-order processors it needs memory barriers and careful handling of compiler optimization to stay correct.

Connections

Credited To

Source Dekker's algorithm (Wikipedia)

In Field

Source Dekker's algorithm (Wikipedia)

Invented

Source Theodorus Dekker (Wikipedia)
Sources
Dekker's algorithm (Wikipedia)
  • In Group: Concurrency and Distributed Systems Techniques, Lead
    Dekker's algorithm is the first known correct solution to the mutual exclusion problem in concurrent programming where processes only communicate via shared memory.
  • In Field: Parallel Computing, Lead
    Dekker's algorithm is the first known correct solution to the mutual exclusion problem in concurrent programming where processes only communicate via shared memory.
  • Credited To: Theodorus Dekker, Lead
    The solution was attributed to Dutch mathematician Th. J. Dekker by Edsger W. Dijkstra
View the Source
Theodorus Dekker (Wikipedia)
Invented: Theodorus Dekker, Lead
Quote, Invented: Theodorus Dekker, Lead
Dekker invented an algorithm that allows two processes to share a single-use resource without conflict
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.