The Mutual Exclusion Problem for Unreliable Processes
Author(s)
Rivest, Ronald L.; Pratt, Vaughan R.
DownloadMIT-LCS-TM-084.pdf (5.734Mb)
Metadata
Show full item recordAbstract
Consider n processes operating asynchronously in parallel, each of which maintains a single "public" variable which can be read (but not written) by the other processes. We show that the processes can synchronize their actions by the basic operations of (1) reading each other's public variables, and (2) setting their own public variable to some value. A process may "die" (fail) at any time, when its public variable is (automatically) set to a special "dead" value. A dead process may revive. Reading a public variable which is being simultaneously updated returns either the old or the new value. Each process may be in a certain "critical" state (which it leaves if it dies). We present a synchronization scheme with the following properties. (1) At most one process is ever in its critical state at a time. (2) If a process wants to enter its critical state, it may do so before any other process enters its critical state more than once. (3) The public variables assume only a finite number of values. (4) A process wanting to enter its critical state can always make progress towards that goal. (5) The various processes may run arbitrary speeds relative to one another. By the definition of the problem, no process can prevent another from entering its critical state by repeatedly failing and restartying. In the case of two processes, what makes our solution of particular interest is its remarkable simplicity when compared with the extant solutions to this problem. Our n-process solution uses the two-process solution as a subroutine, and is not quite as elegant as the two-process solution.
Date issued
1977-04Series/Report no.
MIT-LCS-TM-084