Synchronization and concurrency in user-level software systems

  • Authors:
  • Michael L. Scott;William N. Scherer, III

  • Affiliations:
  • University of Rochester;University of Rochester

  • Venue:
  • Synchronization and concurrency in user-level software systems
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Concurrency in user applications is on the rise. Modern computers contain multiple threads per core and multiple cores per chip, and users multitask routinely. Where traditional scientific and commercial computation assumes dedicated access to hardware, user applications must tolerate preemption. To support legacy applications, most of which use lock-based mutual exclusion, we add timeout capability and preemption tolerance to scalable queue-based locks. This allows in-place updates to scale programs with fine-grained synchronization to large multiprogrammed systems. Unfortunately, fine-grain locking is prone to deadlock, non-composability, priority inversion, convoying, and intolerance of thread failure, preemption, and even page faults. Nonblocking algorithms avoid these limitations by ensuring that the delay or failure of a thread never prevents the system as a whole from making forward progress. We broaden the range of known nonblocking algorithms by adapting linearizability theory to support partial operations. We define dual data structures as concurrent objects that may hold data and requests. We present lock-free dual stacks; dual queues; exchangers, wherein participants swap data pairwise; and synchronous queues, wherein consumers explicitly acknowledge handoffs from producers. Our exchangers and synchronous queues will appear in Java 6. Like fine-grain locks, ad hoc nonblocking algorithms are too difficult for most programmers to write. While highly valuable in libraries, they are not a general approach to simple concurrency. Transactional memory allows mechanical translation from serial algorithms to high-performance concurrent implementations. Central to transactional systems is the need for contention management, which determines, when transactions conflict, which will continue, wait, or abort. We introduce several contention management policies, and evaluate their performance on a variety of benchmarks. We further demonstrate proportional-share prioritizing managers, and identify a candidate default policy that performs well with each benchmark. Finally, we perform a case study analyzing randomization in our "Karma" manager. By furthering the state of the art in locks, nonblocking algorithms, and transactional memory, we expand the options available to programmers for preemption-tolerant synchronization in user-level software applications.