Black-White Bakery Algorithm

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.

Advertisements

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.

Advertisements

Related Terms

Latest Computer Science Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…