Semaphores Augmented with a Waiting Array
Dave Dice, Alex Kogan

TL;DR
This paper introduces a scalable, low-latency semaphore implementation by augmenting ticket semaphore algorithms with a waiting array, improving performance in multithreaded shared memory systems.
Contribution
It presents a novel augmentation of ticket semaphore algorithms with a waiting array, enhancing scalability and reducing latency in synchronization.
Findings
The TWA-semaphore is more scalable than traditional ticket-semaphore.
The TWA-semaphore maintains low latency and compactness.
The approach improves synchronization efficiency in multithreaded environments.
Abstract
Semaphores are a widely used and foundational synchronization and coordination construct used for shared memory multithreaded programming. They are a keystone concept, in the sense that most other synchronization constructs can be implemented in terms of semaphores, although the converse does not generally hold. Semaphores and the quality of their implementation are of consequence as they remain heavily used in the Linux kernel and are also available for application programming via the pthreads programming interface. We first show that semaphores can be implemented by borrowing ideas from the classic ticket lock algorithm. The resulting "ticket-semaphore" algorithm is simple and compact (space efficient) but does not scale well because of the detrimental impact of global spinning. We then transform "ticket-semaphore" into the "TWA-semaphore" by the applying techniques derived from the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDistributed systems and fault tolerance · Advanced Database Systems and Queries · Formal Methods in Verification
