Fast and Scalable Queue-Based Resource Allocation Lock on Shared-Memory Multiprocessors

  • Deli Zhang
  • Brendan Lynch
  • Damian Dechev
Conference paper

DOI: 10.1007/978-3-319-03850-6_19

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8304)
Cite this paper as:
Zhang D., Lynch B., Dechev D. (2013) Fast and Scalable Queue-Based Resource Allocation Lock on Shared-Memory Multiprocessors. In: Baldoni R., Nisse N., van Steen M. (eds) Principles of Distributed Systems. OPODIS 2013. Lecture Notes in Computer Science, vol 8304. Springer, Cham

Abstract

We present a fast and scalable lock algorithm for shared-memory multiprocessors addressing the resource allocation problem. In this problem, threads compete for k shared resources where a thread may request an arbitrary number 1 ≤ h ≤ k of resources at the same time. The challenge is for each thread to acquire exclusive access to desired resources while preventing deadlock or starvation. Many existing approaches solve this problem in a distributed system, but the explicit message passing paradigm they adopt is not optimal for shared-memory. Other applicable methods, like two-phase locking and resource hierarchy, suffer from performance degradation under heavy contention, while lacking a desirable fairness guarantee. This work describes the first multi-resource lock algorithm that guarantees the strongest first-in, first-out (FIFO) fairness. Our methodology is based on a non-blocking queue where competing threads spin on previous conflicting resource requests. In our experimental evaluation we compared the overhead and scalability of our lock to the best available alternative approaches using a micro-benchmark. As contention increases, our multi-resource lock obtains an average of ten times speedup over the alternatives including GNU C++’s lock method and Boost’s lock function.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer International Publishing Switzerland 2013

Authors and Affiliations

  • Deli Zhang
    • 1
  • Brendan Lynch
    • 1
  • Damian Dechev
    • 1
  1. 1.Department of EECSUniversity of Central FloridaOrlandoUSA

Personalised recommendations