Lamport's Bakery Algorithm
Definition - What does Lamport's Bakery Algorithm mean?
Lamport’s bakery algorithm is a computing algorithm that ensures efficient use of shared resources in a multithreaded environment. This algorithm was conceived by Leslie Lamport and was inspired by the first-come-first-served, or first-in-first-out (FIFO), operational methodology of a bakery. Lamport’s bakery algorithm is a mutual exclusion algorithm that restricts two or more processes from accessing a resource simultaneously.
Techopedia explains Lamport's Bakery Algorithm
The operational principles behind Lamport’s bakery algorithm are very simple. All process threads must take a number and wait their turn to use a shared computing resource or to enter their critical section. The number can be any of the global variables, and processes with the lowest number will be processed first. If there is a tie or similar number shared by both processes, it is managed through their process ID. If a process terminates before its turn, it has to start over again in the process queue.
"Techopedia" on Twitter
Sign up for Techopedia's Free Newsletter!
Join thousands of others with our weekly newsletter
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.