A transactional approach to lock scalability

  • Authors:
  • Amitabha Roy;Keir Fraser;Steven Hand

  • Affiliations:
  • University of Cambridge, Cambridge, United Kingdom;University of Cambridge, Cambridge, United Kingdom;University of Cambridge, Cambridge, United Kingdom

  • Venue:
  • Proceedings of the twentieth annual symposium on Parallelism in algorithms and architectures
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Most software transactional memory implementations execute code using fine-grained optimistic concurrency control. This does not perform well with low contention data structures where fine grained conflict detection means manipulating metadata for every object touched and optimistic concurrency control imposes the overhead of making thread private shadow copies. Also, a purely optimistic approach does not coexist naturally with legacy code that is either already concurrent using locks or does IO operations that cannot be revoked. We try to address these problems by presenting a new form of the reader writer locks used by the vast majority of concurrent code today. Along with the traditional lock/unlock operations, these new locks support STM-like management of shadow versions that can be used when desired by the programmer. We show how existing lock based code can be scaled to perform as well as an STM, with few changes to the existing code base. We also show as a corollary that our design allows construction of data structures that retain strict fairness between threads, while simultaneously allowing disjoint access parallelism.