[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Black-White Bakery Algorithm

Definition - What does Black-White Bakery Algorithm mean?

The black-white bakery algorithm is an enhancement to Lamport’s bakery algorithm that satisfies all the conditions of a mutual exclusive algorithm. This algorithm preserves the original Lamport algorithm while using a finite number of atomic registers of bounded size and satisfies FIFO fairness. It is also adaptive and satisfies local spinning. The black-white bakery algorithm is designed to provide a software based solution to mutual exclusion.

Techopedia explains Black-White Bakery Algorithm

The black-white bakery algorithm primarily bounds the unbounded nature of the Lamport bakery algorithm by adding an additional bit, which will have a value of either white or black. It is the first algorithm (using only atomic registers) that satisfies both FIFO and local-spinning, and it is the first bounded space algorithm that satisfies both FIFO and adaptivity. It works on the same principle by satisfying the FIFO procedure but bounds the atomic registers through a series of different steps. It works by assigning each process a turn number and each ticket a color. Each process must wait to enter the critical section until its colored ticket number is the lowest in its group. If the color and ticket number of two processes are same, the process with the smaller identifier will enter critical state.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
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
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
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
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.