skip to main content
10.1145/2851613.2851956acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

Futex based locks for C11's generic atomics

Published: 04 April 2016 Publication History

Abstract

We present a new algorithm and implementation of a lock primitive that is based on Linux' native lock interface, the futex system call. It allows us to assemble compiler support for atomic data structures that can not be handled through specific hardware instructions. Such a tool is needed for C11's atomics interface because here an Atomic qualification can be attached to almost any data type. Our lock data structure for that purpose meets very specific criteria concerning its field of operation and its performance. By that we are able to outperform gcc's libatomic library by around 60%.

References

[1]
Alpine Linux. http://alpinelinux.org/
[2]
Clang. http://clang.llvm.org/
[3]
gcc. GNU Compiler Collection. https://gcc.gnu.org/
[4]
glibc. GNU C library. https://www.gnu.org/software/libc/
[5]
Jens Gustedt. 2015. Futex based locks for C11's generic atomics. INRIA RR-8818 https://hal.inria.fr/hal-01236734
[6]
Darren Hart. 2009. A futex overview and update. LWN.net (2009). https://lwn.net/Articles/360699/
[7]
Andrew J. Hutton et al. 2002. Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux. In Proceedings of the Ottawa Linux Symposium. 479--495.
[8]
IBM 1983. IBM System/370 Extended Architecture, Principles of Operation. IBM. SA22-7085.
[9]
JTC1/SC22/WG14 (Ed.). 2011. Programming languages --- C (cor. 1:2012 ed.). Number ISO/IEC 9899. ISO.
[10]
Maged M. Michael. 2004. ABA Prevention Using Single-Word Instructions. Tech. Rep. RC23089. IBM Research.
[11]
MUSL libc. http://musl-libc.org
[12]
Robert H. B. Netzer and Barton P. Miller. 1992. What Are Race Conditions? Some Issues and Formalizations. ACM Lett. Program. Lang. Syst. 1, 1 (March 1992), 74--88.
[13]
POSIX. 2009. ISO/IEC/IEEE Information technology -- Portable Operating Systems Interface (POSIX®) Base Specifications. Issue 7. ISO, Geneva, Switzerland.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SAC '16: Proceedings of the 31st Annual ACM Symposium on Applied Computing
April 2016
2360 pages
ISBN:9781450337397
DOI:10.1145/2851613
Publication rights licensed to ACM. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of a national government. As such, the Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 April 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. C11
  2. Linux
  3. atomics
  4. futex
  5. lock primitives

Qualifiers

  • Research-article

Conference

SAC 2016
Sponsor:
SAC 2016: Symposium on Applied Computing
April 4 - 8, 2016
Pisa, Italy

Acceptance Rates

SAC '16 Paper Acceptance Rate 252 of 1,047 submissions, 24%;
Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

Upcoming Conference

SAC '25
The 40th ACM/SIGAPP Symposium on Applied Computing
March 31 - April 4, 2025
Catania , Italy

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 21 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media