TWA -- Ticket Locks Augmented with a Waiting Array
Dave Dice, Alex Kogan

TL;DR
TWA enhances classic ticket locks by adding a waiting array, reducing global spinning and cache invalidation, which improves scalability and performance under high contention while maintaining simplicity under light load.
Contribution
The paper introduces TWA, a novel variation of ticket locks that uses a waiting array to improve scalability and performance during high contention scenarios.
Findings
TWA outperforms classic ticket locks under high contention.
TWA maintains comparable performance to ticket locks under light load.
TWA reduces cache invalidation overhead, improving scalability.
Abstract
The classic ticket lock consists of ticket and grant fields. Arriving threads atomically fetch-and-increment ticket and then wait for grant to become equal to the value returned by the fetch-and-increment primitive, at which point the thread holds the lock. The corresponding unlock operation simply increments grant. This simple design has short code paths and fast handover (transfer of ownership) under light contention, but may suffer degraded scalability under high contention when multiple threads busy wait on the grant field -- so-called global spinning. We propose a variation on ticket locks where long-term waiting threads wait on locations in a waiting array instead of busy waiting on the grant field. The single waiting array is shared among all locks. Short-term waiting is accomplished in the usual manner on the grant field. The resulting algorithm, TWA, improves on ticket locks by…
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
TopicsAdvanced Data Storage Technologies · Caching and Content Delivery · Distributed systems and fault tolerance
