DocumentCode :
2055533
Title :
Monotonic counters: a new mechanism for thread synchronization
Author :
Thornley, John ; Chandy, K. Mani
Author_Institution :
Dept. of Comput. Sci., Virginia Univ., Charlottesville, VA, USA
fYear :
2000
fDate :
2000
Firstpage :
573
Lastpage :
582
Abstract :
Only a handful of fundamental mechanisms for synchronizing the access of concurrent threads to shared memory are widely implemented and used. These include locks, condition variables, semaphores, barriers, and monitors. In this paper, we introduce a new synchronization mechanism-monotonic counters-and make a case for its addition to this group. Unlike most other synchronization mechanisms, monotonic counters were designed primarily for multiprocessing, rather than for systems programming. Counters have a very simple definition: a counter object has a nonnegative value, an Increment operation, and a Check operation. Increment atomically increases the counter, and Check suspends until the counter reaches a specified level. We demonstrate that many practical thread synchronization patterns can be expressed more elegantly using counters than with other synchronization mechanisms. Of particular importance, the monotonicity of counters can be used to guarantee deterministic synchronization and the equivalence of multithreaded and sequential execution. In terms of implementation, counters are distinguished from traditional synchronization mechanisms, in that they have a dynamically varying number of thread suspension queues. We give several examples of multithreaded programs that use counter synchronization, and give an implementation of counters on top of locks and condition variables
Keywords :
multi-threading; synchronisation; barriers; concurrent threads; condition variables; deterministic synchronization; equivalence; monitors; monotonic counters; multiprocessing; multithreaded programs; semaphores; synchronization mechanism; thread synchronization; thread synchronization patterns; Computer science; Concurrent computing; Counting circuits; Data structures; Electrical capacitance tomography; Interference; Interleaved codes; Mechanical factors; Reactive power; Yarn;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Parallel and Distributed Processing Symposium, 2000. IPDPS 2000. Proceedings. 14th International
Conference_Location :
Cancun
Print_ISBN :
0-7695-0574-0
Type :
conf
DOI :
10.1109/IPDPS.2000.846037
Filename :
846037
Link To Document :
بازگشت