International Conference On Principles Of Distributed Systems

OPODIS 2007: Principles of Distributed Systems pp 217-231

LFthreads: A Lock-Free Thread Library

  • Anders Gidenstam
  • Marina Papatriantafilou
Conference paper

DOI: 10.1007/978-3-540-77096-1_16

Volume 4878 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Gidenstam A., Papatriantafilou M. (2007) LFthreads: A Lock-Free Thread Library. In: Tovar E., Tsigas P., Fouchal H. (eds) Principles of Distributed Systems. OPODIS 2007. Lecture Notes in Computer Science, vol 4878. Springer, Berlin, Heidelberg

Abstract

LFthreads is a thread library entirely based on lock-free methods, i.e. no spin-locks or similar synchronization mechanisms are employed in the implementation of the multithreading. Since lock-freedom is highly desirable in multiprocessors/multicores due to its advantages in parallelism, fault-tolerance, convoy-avoidance and more, there is an increased demand in lock-free methods in parallel applications, hence also in multiprocessor/multicore system services. This is why a lock-free multithreading library is important. To the best of our knowledge LFthreads is the first thread library that provides a lock-free implementation of blocking synchronization primitives for application threads. Lock-free implementation of objects with blocking semantics may sound like a contradicting goal. However, such objects have benefits: e.g. library operations that block and unblock threads on the same synchronization object can make progress in parallel while maintaining the desired thread-level semantics and without having to wait for any “slow” operations among them. Besides, as no spin-locks or similar synchronization mechanisms are employed, processors are always able to do useful work. As a consequence, applications, too, can enjoy enhanced parallelism and fault-tolerance. The synchronization in LFthreads is achieved by a new method, which we call responsibility hand-off (RHO), that does not need any special kernel support.

Keywords

lock-free multithreading multiprocessors multicores synchronization shared memory 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Anders Gidenstam
    • 1
  • Marina Papatriantafilou
    • 2
  1. 1.Algorithms and ComplexityMax-Planck-Institut für InformatikSaarbrackenGermany
  2. 2.Computer Science and EngineeringChalmers University of TechnologyGöteborgSweden