Title :
Extending Inter-process Synchronization with Robust Mutex and Variants in Condition Wait
Author :
Raghunathan, Sriram
Author_Institution :
India Software Labs., IBM India (P) Ltd., India
Abstract :
Condition variables and mutexes are synchronization mechanisms defined in the POSIX Pthreads specification and there are several implementations that address these requirements. Applications wanting to use them for inter-process communication could suffer from process hangs, in the event of unexpected termination of a mutex owning process. Also, if condition waiters need to have fairness associated with them across processes, threads should enable priority scheduling with contention scope set to system level. This could prevent a thread in another process, or in the kernel, from running and lead to starvation. To address these limitations, we present a mechanism to implement FIFO condition wait, signaling and robust mutex using system V semaphores. The paper also describes lockless condition wait, a simple mechanism implemented using compare-and-swap (CAS) atomic primitive. Since semaphores are known to be heavy weight objects, we evaluate the performance of the proposed base implementation in comparison with process shared mutexes and condition variables provided by pthread library on major UNIX platforms. The results indicate that the overheads associated with semaphores even out gradually under heavy loads (with the exception of Native POSIX Thread Library (NPTL) on Linux) on multi-CPU machines lending support to the idea that the implementation could be widely deployed by applications wanting prioritized and robust synchronization.
Keywords :
Unix; FIFO condition; POSIX; System V semaphores; UNIX platforms; compare-and-swap atomic primitive; condition variables; condition waiters; extending interprocess synchronization; multi-CPU machines; mutexes; Application software; Content addressable storage; Context-aware services; Event detection; Kernel; Libraries; Linux; Protection; Robustness; Yarn; Condition Wait; FIFO Waiters; Mutexes; Semaphores; Signaling and Synchronization;
Conference_Titel :
Parallel and Distributed Systems, 2008. ICPADS '08. 14th IEEE International Conference on
Conference_Location :
Melbourne, VIC
Print_ISBN :
978-0-7695-3434-3
DOI :
10.1109/ICPADS.2008.98