|
Abstract : |
We present a "fine-grained " solution to the mutual exclusion problem. A program is finegrained if it uses only single-reader, single-writer boolean variables and if each of its atomic operations has at most one occurrence of at most one shared variable. In contrast to other fine-grained solutions that have appeared in the literature, processes in our solution do not busy-wait, but wait on one another only by executing await statements. Such statements can be implemented in practice either by means of context switching or by means of "local " spinning. We show that our algorithm is correct even if shared variables are accessed nonatomically. Keywords: Busy-waiting, mutual exclusion, nonatomic operations, shared data, synchronization primitives. CR Categories: D.4.1, D.4.2, F.3.1 1, |