TWA – Ticket Locks Augmented with a Waiting Array
The classic ticket lock is simple and compact, consisting of ticket and grant fields. Arriving threads atomically fetch-and-increment ticket to obtain an assigned ticket value, and then wait for grant to become equal to that value, at which point the thread holds the lock. The corresponding unlock o...
Saved in:
Published in | Euro-Par 2019: Parallel Processing Vol. 11725; pp. 334 - 345 |
---|---|
Main Authors | , |
Format | Book Chapter |
Language | English |
Published |
Switzerland
Springer International Publishing AG
2019
Springer International Publishing |
Series | Lecture Notes in Computer Science |
Subjects | |
Online Access | Get full text |
Cover
Loading…
Abstract | The classic ticket lock is simple and compact, consisting of ticket and grant fields. Arriving threads atomically fetch-and-increment ticket to obtain an assigned ticket value, and then wait for grant to become equal to that value, 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 – those with an assigned ticket value far larger than grant – 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 limiting the number of threads spinning on the grant field at any given time, reducing the number of remote caches requiring invalidation from the store that releases the lock. In turn, this accelerates handover, and since the lock is held throughout the handover operation, scalability improves. Under light or no contention, TWA yields performance comparable to the classic ticket lock. Under high contention, TWA is substantially more scalable than the classic ticket lock, and provides performance on par or beyond that of scalable queue-based locks such as MCS by avoiding the complexity and additional accesses incurred by the MCS handover operation while also obviating the need for maintaining queue elements.
We provide an empirical evaluation, comparing TWA against ticket locks and MCS for various user-space applications, and within the Linux kernel. |
---|---|
AbstractList | The classic ticket lock is simple and compact, consisting of ticket and grant fields. Arriving threads atomically fetch-and-increment ticket to obtain an assigned ticket value, and then wait for grant to become equal to that value, 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 – those with an assigned ticket value far larger than grant – 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 limiting the number of threads spinning on the grant field at any given time, reducing the number of remote caches requiring invalidation from the store that releases the lock. In turn, this accelerates handover, and since the lock is held throughout the handover operation, scalability improves. Under light or no contention, TWA yields performance comparable to the classic ticket lock. Under high contention, TWA is substantially more scalable than the classic ticket lock, and provides performance on par or beyond that of scalable queue-based locks such as MCS by avoiding the complexity and additional accesses incurred by the MCS handover operation while also obviating the need for maintaining queue elements.
We provide an empirical evaluation, comparing TWA against ticket locks and MCS for various user-space applications, and within the Linux kernel. |
Author | Kogan, Alex Dice, Dave |
Author_xml | – sequence: 1 givenname: Dave orcidid: 0000-0001-9164-7747 surname: Dice fullname: Dice, Dave email: dave.dice@oracle.com – sequence: 2 givenname: Alex orcidid: 0000-0002-4419-4340 surname: Kogan fullname: Kogan, Alex |
BookMark | eNo1kE1OwzAQhQ0URFt6Axa-gGE8dmJ7GVX8SZXYFHVpOanbhpYkxKkQO-7ADTkJTgurGc3ozbz3jcigqitPyDWHGw6gbo3STDAQwNBIAKYsyhMyEnFyGCSnZMhTzpkQ0pz9L4QxekCGfc-MkuKCjDhHNIgyVZdkEsIrACCCAS6HRMwXGf35-qbzstj6js7qYhtotl-_-arzS_pRdhvq6MKVXVmtada27vOKnK_cLvjJXx2Tl_u7-fSRzZ4fnqbZjDUoRcccyNzkHgymzrmcy1W05rWRqJdC6TR6gDTRmgtEviq08JqDUg5znRbocjEmeLwbmjY-963N63obLAfbA7IRkBU2JrUHHrYHFEXyKGra-n3vQ2d9rypinNbtio1rOt8GmxjkiZRWoLIRn_gFu9pjoQ |
ContentType | Book Chapter |
Copyright | Springer Nature Switzerland AG 2019 |
Copyright_xml | – notice: Springer Nature Switzerland AG 2019 |
DBID | FFUUA |
DEWEY | 4.3499999999999996 |
DOI | 10.1007/978-3-030-29400-7_24 |
DatabaseName | ProQuest Ebook Central - Book Chapters - Demo use only |
DatabaseTitleList | |
DeliveryMethod | fulltext_linktorsrc |
Discipline | Computer Science |
EISBN | 3030294005 9783030294007 |
EISSN | 1611-3349 |
Editor | Yahyapour, Ramin |
Editor_xml | – sequence: 1 fullname: Yahyapour, Ramin – sequence: 1 givenname: Ramin orcidid: 0000-0002-9057-4395 surname: Yahyapour fullname: Yahyapour, Ramin email: ramin.yahyapour@gwdg.de |
EndPage | 345 |
ExternalDocumentID | EBC5921544_327_349 |
GroupedDBID | 38. AABBV AEDXK AEJLV AEKFX ALMA_UNASSIGNED_HOLDINGS AYMPB BBABE CXBFT CZZ EXGDT FCSXQ FFUUA I4C IEZ LDH MGZZY NSQWD OORQV SBO TPJZQ TSXQS Z5O Z7R Z7S Z7U Z7V Z7W Z7X Z7Y Z7Z Z81 Z82 Z83 Z84 Z87 Z88 -DT -GH -~X 1SB 29L 2HA 2HV 5QI 875 AASHB ABMNI ACGFS ADCXD AEFIE EJD F5P FEDTE HVGLF LAS P2P RIG RNI RSU SVGTG VI1 ~02 |
ID | FETCH-LOGICAL-p243t-a04b9be0926aaab14f998e89428d37862200658813221fc83e81077a2b86c2ab3 |
ISBN | 3030293998 9783030293994 |
ISSN | 0302-9743 |
IngestDate | Wed Nov 06 06:29:56 EST 2024 Fri Jul 26 00:32:43 EDT 2024 |
IsPeerReviewed | true |
IsScholarly | true |
LCCallNum | QA76.758 |
Language | English |
LinkModel | OpenURL |
MergedId | FETCHMERGED-LOGICAL-p243t-a04b9be0926aaab14f998e89428d37862200658813221fc83e81077a2b86c2ab3 |
OCLC | 1122922467 |
ORCID | 0000-0001-9164-7747 0000-0002-4419-4340 |
PQID | EBC5921544_327_349 |
PageCount | 12 |
ParticipantIDs | springer_books_10_1007_978_3_030_29400_7_24 proquest_ebookcentralchapters_5921544_327_349 |
PublicationCentury | 2000 |
PublicationDate | 2019 |
PublicationDateYYYYMMDD | 2019-01-01 |
PublicationDate_xml | – year: 2019 text: 2019 |
PublicationDecade | 2010 |
PublicationPlace | Switzerland |
PublicationPlace_xml | – name: Switzerland – name: Cham |
PublicationSeriesSubtitle | Theoretical Computer Science and General Issues |
PublicationSeriesTitle | Lecture Notes in Computer Science |
PublicationSeriesTitleAlternate | Lect.Notes Computer |
PublicationSubtitle | 25th International Conference on Parallel and Distributed Computing, Göttingen, Germany, August 26-30, 2019, Proceedings |
PublicationTitle | Euro-Par 2019: Parallel Processing |
PublicationYear | 2019 |
Publisher | Springer International Publishing AG Springer International Publishing |
Publisher_xml | – name: Springer International Publishing AG – name: Springer International Publishing |
RelatedPersons | Hartmanis, Juris Gao, Wen Bertino, Elisa Woeginger, Gerhard Goos, Gerhard Steffen, Bernhard Yung, Moti |
RelatedPersons_xml | – sequence: 1 givenname: Gerhard surname: Goos fullname: Goos, Gerhard – sequence: 2 givenname: Juris surname: Hartmanis fullname: Hartmanis, Juris – sequence: 3 givenname: Elisa orcidid: 0000-0002-4029-7051 surname: Bertino fullname: Bertino, Elisa – sequence: 4 givenname: Wen surname: Gao fullname: Gao, Wen – sequence: 5 givenname: Bernhard surname: Steffen fullname: Steffen, Bernhard – sequence: 6 givenname: Gerhard surname: Woeginger fullname: Woeginger, Gerhard – sequence: 7 givenname: Moti surname: Yung fullname: Yung, Moti |
SSID | ssj0002209014 ssj0002792 |
Score | 1.9951365 |
Snippet | The classic ticket lock is simple and compact, consisting of ticket and grant fields. Arriving threads atomically fetch-and-increment ticket to obtain an... |
SourceID | springer proquest |
SourceType | Publisher |
StartPage | 334 |
SubjectTerms | Concurrency control Locks Mutexes Mutual exclusion Synchronization |
Title | TWA – Ticket Locks Augmented with a Waiting Array |
URI | http://ebookcentral.proquest.com/lib/SITE_ID/reader.action?docID=5921544&ppg=349 http://link.springer.com/10.1007/978-3-030-29400-7_24 |
Volume | 11725 |
hasFullText | 1 |
inHoldings | 1 |
isFullTextHit | |
isPrint | |
link | http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwnV07b9swECaadCk69I2mL3DoJrCQSOrBoYNRpAgCN-iQNNkIUqKCAoUd2MrSqf8h_zC_pHd8yJabJV0EgRBk8T76ePfxHoR8LLoKkG4shpXn6KAo1lTSslIZLPjZdr1vyfLtpDo6k8cX5cWmXarPLhnsp_b3nXkl_4MqjAGumCV7D2THl8IA3AO-cAWE4bpj_E5p1pFHZ9_NKoPNVaFjD_fYGOVXCv5PmxKaqbG3OzaPH1Xs8jKQn5jjMlk557MsxUAIABP-50M2B725zmbXl76IZwxZN9m5-enjpmerVYzGwYm79ed5PJs4WQ4-5CtL7SOSNtmmGzDDaUI3JLpxh7DccGYT_xT2R0AfbCC5pdZgiIEXE9SaC2q3wmKKIhQvjapURJIz7MoiFJ38R-Fvx3jAmxnHRu-s1lzukb1agc57ODs8nv8YeTfO83ByHHdrLKAYTprCV2H-T_rqJlRo2sxiK_fyrp-ceCk7B-veXjl9Sh5jDgvF5BKQ3zPywC2ekycJAhoheEEEYE1v_9zQgDL1KNMRZYooU0MjytSj_JKcfT08_XLEYhsNdsWlGJjJpVXW5YpXxhhbyB5m5hoFjmcnavBoubdDG-Qlir5thGuKvK4Nt03VcmPFK7K_WC7ca0KlcmVpq072pZOm6FRt-1qCV2xAe6uWHxCWBKD9YX-MMG7DdNe6VBzLP2nBaw1wH5AsSUnj42udqmiDeLXQIF7txatRvG_u9fRb8mizft-R_WF17d6DATnYD3FN_AXbnV-9 |
link.rule.ids | 782,783,787,796,27937 |
linkProvider | Library Specific Holdings |
openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.title=Euro-Par+2019%3A+Parallel+Processing&rft.au=Dice%2C+Dave&rft.au=Kogan%2C+Alex&rft.atitle=TWA+%E2%80%93+Ticket+Locks+Augmented+with+a+Waiting+Array&rft.series=Lecture+Notes+in+Computer+Science&rft.date=2019-01-01&rft.pub=Springer+International+Publishing&rft.isbn=9783030293994&rft.issn=0302-9743&rft.eissn=1611-3349&rft.spage=334&rft.epage=345&rft_id=info:doi/10.1007%2F978-3-030-29400-7_24 |
thumbnail_s | http://utb.summon.serialssolutions.com/2.0.0/image/custom?url=https%3A%2F%2Febookcentral.proquest.com%2Fcovers%2F5921544-l.jpg |