 
Summary: Localspin Mutual Exclusion Using Fetchand
Primitives
James H. Anderson and YongJik Kim
Department of Computer Science
University of North Carolina at Chapel Hill
Chapel Hill, NC 275993175
Email: fanderson, kimyg@cs.unc.edu
Abstract
We present a generic fetchandbased localspin mutual exclusion algorithm, with O(1) time complexity
under the remotememoryreferences time measure. This algorithm is \generic" in the sense that it can be
implemented using any fetchand primitive of rank 2N , where N is the number of processes. The rank of
a fetchand primitive is a notion introduced herein; informally, it expresses the extent to which processes
may \order themselves" using that primitive. This algorithm breaks new ground because it shows that O(1)
time complexity is possible using a wide range of primitives. In addition, previously published fetchand
based algorithms either use multiple primitives or require an underlying cachecoherence mechanism for
spins to be local, while ours does not. By applying our generic algorithm within an arbitration tree, one can
easily construct a (log r N) algorithm using any primitive of rank r, where 2 r < N . For primitives that
meet a certain additional condition, we present a (log N= log log N) algorithm, which gives an asymptotic
improvement in time complexity for primitives of rank o(log N ). It follows from a previouslypresented lower
bound proof that this algorithm is asymptotically timeoptimal for certain primitives of constant rank.
