# Two Mutual Exclusion Algorithms for Shared Memory

**Authors:** Jordi Bataller Mascarell

arXiv: 1903.10402 · 2019-03-26

## TL;DR

This paper presents two formally proven mutual exclusion algorithms for shared memory systems, one with a coordinator and one without, ensuring fair access for concurrent processes.

## Contribution

Introduces two novel mutual exclusion algorithms for shared memory, with formal correctness proofs and different fairness mechanisms.

## Key findings

- Guarantee that every process trying to enter the critical section eventually does so.
- One algorithm uses a coordinator process for fairness, the other elects the next process without a coordinator.
- Both algorithms are proven correct and use specific shared variables for coordination.

## Abstract

In this paper, we introduce two algorithms that solve the mutual exclusion problem for concurrent processes that communicate through shared variables, [2]. Our algorithms guarantee that any process trying to enter the critical section, eventually, does enter it. They are formally proven to be correct. The first algorithm uses a special coordinator process in order to ensure equal chances to processes waiting for the critical section. In the second algorithm, with no coordinator, the process exiting the critical section is in charge to fairly elect the following one. In the case that no process is waiting, the turn is marked free and will be determined by future waiting processes. The type of shared variables used are a turn variable, readable and writable by all processes; and a flag array, readable by all with flag[i] writable only by process i. There is a version of the first algorithm where no writable by all variable is used. The bibliography reviewed for this paper is [4] and [3], all the rest is original work.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1903.10402/full.md

## References

4 references — full list in the complete paper: https://tomesphere.com/paper/1903.10402/full.md

---
Source: https://tomesphere.com/paper/1903.10402