Title :
An assertional proof of a lock synchronization algorithm using fetch and store atomic instructions
Author :
Huang, Ting-Lu ; Lin, Jann-Hann
Author_Institution :
Dept. of Comput. Sci. & Inf. Eng., Nat. Chiao Tung Univ., Hsinchu, Taiwan
Abstract :
A new lock synchronization algorithm, proposed independently by Craig and the authors, not only eliminates memory contention caused by process spinning but also preserves first in first out property. A previous result, the MCS lock algorithm, requires both compare and swap and fetch and store instructions, or the FIFO property is lost and hence starvation may occur. The new one requires only fetch and store. We provide an assertional proof for the new algorithm. Most of behavioral proofs of concurrent programs are error-prone since it is difficult and tedious to take all possibilities of interleaving among the processes into consideration. An assertional proof replaces a large number of possibilities of interleaving by a small number of invariants. New techniques in this proof are: an assertional characterization of token bit accessibility; the definition of effective assignments that brings about the notion of token creation/destruction; the definition of token count that derives the mutual exclusion theorem; and the constructing procedure of a token-list that faithfully records the arrival time sequence of lock requests so that FIFO ordering can be enforced
Keywords :
parallel algorithms; processor scheduling; shared memory systems; storage management; synchronisation; FIFO property; MCS lock algorithm; arrival time sequence; assertional proof; atomic instructions; concurrent programs; error-prone; fetch instructions; first in first out; lock requests; lock synchronization algorithm; memory contention; mutual exclusion theorem; process spinning; shared memory systems; store instructions; token bit accessibility; token count; token creation; token destruction; token-list; Computer science; Data structures; Interleaved codes; Multiprocessing systems; Queueing analysis; Spinning; Stochastic processes;
Conference_Titel :
Parallel and Distributed Systems, 1994. International Conference on
Conference_Location :
Hsinchu
Print_ISBN :
0-8186-6555-6
DOI :
10.1109/ICPADS.1994.590470