Adding concurrency in python using a commercial processor's hardware transactional memory support

  • Authors:
  • Fuad Tabba

  • Affiliations:
  • University of Auckland

  • Venue:
  • ACM SIGARCH Computer Architecture News
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper reports on our experiences of using a commercial processor's best-effort hardware transactional memory to improve concurrency in CPython, the reference Python implementation. CPython protects its data structures using a single global lock, which inhibits parallelism when running multiple threads. We modified the CPython interpreter to use besteffort hardware transactions available in Sun's Rock processor, and fall back on the single global lock when unable to commit in hardware. The modifications were minimal; however, we had to restructure some of CPython's shared data structures to handle false conflicts arising from CPython's management of the shared data. Our results show that the modified CPython interpreter can run small, simple, workloads and scale almost linearly, while improving the concurrency of more complex workloads.