Computing Atlas

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

Lamport's bakery algorithm

Parallel and Distributed Algorithm

Lamport's bakery algorithm is a mutual exclusion algorithm devised by the computer scientist Leslie Lamport as part of his long study of the formal correctness of concurrent systems. It addresses a common hazard in programs that run several threads at once: when two or more threads write to the same memory location, or when one thread reads a location before another has finished writing it, data can be corrupted. The bakery algorithm is one of many mutual exclusion algorithms designed to keep concurrent threads from entering critical sections of code at the same time, which removes that risk of corruption and improves the safe use of shared resources. In computing it is taught as a classic example of how threads can coordinate access to shared state using only ordinary shared memory.

Connections

Credited To

Source Lamport's bakery algorithm (Wikipedia)

In Field

Source Lamport's bakery algorithm (Wikipedia)

Invented

Source Lamport's bakery algorithm (Wikipedia)
Sources
Lamport's bakery algorithm (Wikipedia)
  • In Group: Concurrency and Distributed Systems Techniques, Lead, second paragraph
    Lamport's bakery algorithm is one of many mutual exclusion algorithms designed to prevent concurrent threads entering critical sections of code concurrently
  • Invented: Leslie Lamport, Lead, first sentence
    Lamport's bakery algorithm is a computer algorithm devised by computer scientist Leslie Lamport
  • Credited To: Leslie Lamport, Lead, first sentence
    Lamport's bakery algorithm is a computer algorithm devised by computer scientist Leslie Lamport
  • In Field: Parallel Computing, Lead, first paragraph
    intended to improve the safety in the usage of shared resources among multiple threads by means of mutual exclusion
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.