Next Article in Journal
NewsSumm: The World’s Largest Human-Annotated Multi-Document News Summarization Dataset for Indian English
Previous Article in Journal
Evaluating Deployment of Deep Learning Model for Early Cyberthreat Detection in On-Premise Scenario Using Machine Learning Operations Framework
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

Formal Analysis of Bakery-Based Mutual Exclusion Algorithms

DIMES—Engineering Department of Informatics Modeling Electronics and Systems Science, University of Calabria, 87036 Rende, Italy
Computers 2025, 14(12), 507; https://doi.org/10.3390/computers14120507 (registering DOI)
Submission received: 21 October 2025 / Revised: 18 November 2025 / Accepted: 20 November 2025 / Published: 23 November 2025

Abstract

Lamport’s Bakery algorithm (LBA) represents a general and elegant solution to the mutual exclusion (ME) problem posed by Dijkstra in 1965. Its correctness is usually based on intuitive reasoning. LBA rests on an unbounded number of tickets, which prevents correctness assessment by model checking. Several variants are proposed in the literature to bound the number of exploited tickets. This paper is based on a formal method centered on Uppaal for reasoning about general shared-memory ME algorithms. A model can (hopefully) be verified by the exhaustive model checker (MC), and/or by the statistical model checker (SMC) through stochastic simulations. To overcome the scalability problems of SMC, a model can be reduced to actors and simulated in Java. The paper formalizes LBA and demonstrates, through simulations, that it is correct with atomic and non-atomic memory registers. Then, some representative variants with bounded tickets are studied, which prove to be accurate with atomic registers, or which confirm their correctness under atomic or non-atomic registers.
Keywords: concurrent/parallel systems; mutual exclusion; atomic and non-atomic registers; Lamport’s Bakery algorithm; variants with bounded tickets; formal reasoning; Uppaal; model checking; statistical model checking; actors; simulations concurrent/parallel systems; mutual exclusion; atomic and non-atomic registers; Lamport’s Bakery algorithm; variants with bounded tickets; formal reasoning; Uppaal; model checking; statistical model checking; actors; simulations

Share and Cite

MDPI and ACS Style

Nigro, L. Formal Analysis of Bakery-Based Mutual Exclusion Algorithms. Computers 2025, 14, 507. https://doi.org/10.3390/computers14120507

AMA Style

Nigro L. Formal Analysis of Bakery-Based Mutual Exclusion Algorithms. Computers. 2025; 14(12):507. https://doi.org/10.3390/computers14120507

Chicago/Turabian Style

Nigro, Libero. 2025. "Formal Analysis of Bakery-Based Mutual Exclusion Algorithms" Computers 14, no. 12: 507. https://doi.org/10.3390/computers14120507

APA Style

Nigro, L. (2025). Formal Analysis of Bakery-Based Mutual Exclusion Algorithms. Computers, 14(12), 507. https://doi.org/10.3390/computers14120507

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop