Skip to main navigation Skip to search Skip to main content

Under the hood of the bakery algorithm: Mutual exclusion as a matter of priority

Yoram Moses, Katia Patkin

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

A new approach to the study and analysis of Mutual Exclusion (ME) algorithms is presented, based on identifying the priority relation that the ME algorithm constructs. It is argued that by analyzing how a process detects that it has priority over all other processes, ME algorithms can be better understood and improved. The approach is illustrated by applying it to Lamport’s celebrated Bakery algorithm in the safe register SWMR model. By analyzing how Bakery established and detects priority, cases in which the Bakery algorithm causes processes to block unnecessarily are identified. Namely, a process that already knows that it has priority over another process is made to perform reads and wait on registers of the other process. An optimized version of the Bakery algorithm, called Boulangerie, is proposed, and is shown to be free of any unnecessary blocking. A second contribution of the approach is obtaining a clear explanation for how the Bakery algorithm uses reads from safe registers to detect that a process has priority. Our analysis provides more insight into the workings of the Bakery algorithm than is obtained by other proofs of its correctness.

Original languageEnglish
Title of host publicationStructural Information and Communication Complexity - 22nd International Colloquium, SIROCCO 2015, Post-Proceedings
EditorsChristian Scheideler
Pages399-413
Number of pages15
DOIs
StatePublished - 2015
Event22nd International Colloquium on Structural Information and Communication Complexity, SIROCCO 2015 - Montserrat, Spain
Duration: 14 Jul 201516 Jul 2015

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume9439

Conference

Conference22nd International Colloquium on Structural Information and Communication Complexity, SIROCCO 2015
Country/TerritorySpain
CityMontserrat
Period14/07/1516/07/15

Keywords

  • Bakery algorithm
  • Boulangerie algorithm
  • Mutual exclusion
  • Safe registers

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Under the hood of the bakery algorithm: Mutual exclusion as a matter of priority'. Together they form a unique fingerprint.

Cite this