Black-White Bakery Algorithm

Why Trust Techopedia

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

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.