Abstract
Several basic mutual exclusion lock algorithms are known, with one of the simplest being the Ticket Lock. We present a new mutual exclusion lock with properties similar to the Ticket Lock but using atomic_exchange() instead of atomic_fetch_add() that can be more efficient on systems without a native instruction for atomic_fetch_add(), or in which the native instruction for atomic_exchange() is faster than the one for atomic_fetch_add(). Similarly to the Ticket Lock, our lock has small memory foot print, is extremely simple, respects FIFO order, and provides starvation freedom in architectures that implement atomic_exchange() as a single instruction, like x86.
- CPP-ISO-committee. C++ Memory Order. http://en.cppreference.com/w/c/atomic/memory\_order, 2013.Google Scholar
- CPP-ISO-committee. atomic_compare_exchange. http://en.cppreference.com/w/c/atomic/atomic\_compare\_exchange, 2014a.Google Scholar
- CPP-ISO-committee. atomic_exchange. http://en.cppreference.com/w/c/atomic/atomic\_exchange, 2014b.Google Scholar
- CPP-ISO-committee. atomic_fetch_add. http://en.cppreference.com/w/c/atomic/atomic\_fetch\_add, 2014c.Google Scholar
- D. Dice. Brief announcement: a partitioned ticket lock. In Proceedings of the twenty-third annual ACM symposium on Parallelism in algorithms and architectures, pages 309--310. ACM, 2011. Google Scholar
Digital Library
- P. Magnusson, A. Landin, and E. Hagersten. Queue locks on cache coherent multiprocessors. In Parallel Processing Symposium, 1994. Proceedings., Eighth International, pages 165--171. IEEE, 1994. Google Scholar
Digital Library
- J. M. Mellor-Crummey and M. L. Scott. Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Transactions on Computer Systems (TOCS), 9(1):21--65, 1991. Google Scholar
Digital Library
Index Terms
Tidex: a mutual exclusion lock
Recommendations
Tidex: a mutual exclusion lock
PPoPP '16: Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingSeveral basic mutual exclusion lock algorithms are known, with one of the simplest being the Ticket Lock. We present a new mutual exclusion lock with properties similar to the Ticket Lock but using atomic_exchange() instead of atomic_fetch_add() that ...
Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory Multiprocessors
Most multiprocessors are multiprogrammed to achieve acceptable response time and to increase their utilization. Unfortunately, inopportune preemption may significantly degrade the performance of synchronized parallel applications. To address this ...
Strong trylocks for reader-writer locks
PPoPP '18: Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingA reader-writer lock provides basic methods for shared and exclusive lock acquisition. A thread calling one of these methods may have to wait indefinitely to enter its critical section, with no guarantee of completion.
We present two new reader-writer ...






Comments