22

Fair Mutual Exclusion for N Processes (extended version)

Abstract

Peterson's mutual exclusion algorithm for two processes has been generalized to NN processes in various ways. As far as we know, no such generalization is starvation free without making any fairness assumptions. In this paper, we study the generalization of Peterson's algorithm to NN processes using a tournament tree. Using the mCRL2 language and toolset we prove that it is not starvation free unless weak fairness assumptions are incorporated. Inspired by the counterexample for starvation freedom, we propose a fair NN-process generalization of Peterson's algorithm. We use model checking to show that our new algorithm is correct for small NN. For arbitrary NN, model checking is infeasible due to the state space explosion problem, and instead, we present a general proof that, for N4N \geq 4, when a process requests access to the critical section, other processes can enter first at most (N1)(N2)(N-1)(N-2) times.

View on arXiv
Comments on this paper