Coping with context switches in lock-based software transactional memory

  • Authors:
  • Yehuda Afek;Yoav Cohen;Adam Morrison

  • Affiliations:
  • Tel Aviv University, Israel;Tel Aviv University, Israel;Tel Aviv University, Israel

  • Venue:
  • Proceedings of the 4th Annual International Conference on Systems and Storage
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Lock-based software transactional memory algorithms do not perform well in workloads with a high rate of context switches, which is caused for example by scheduling events or page faults. This occurs since threads that are switched-out by the operating system while holding locks block other threads from progressing, causing their transactions to abort repeatedly. We present here Lock Stealing, a novel contention management algorithm for minimizing the effect of context switches by enabling threads to acquire locks which are held by other threads. While some methods addressing this problem exist (e.g., schedctl in Solaris) they are best effort and only cover scheduling related context switches. In addition, they are platform specific and thus are not suitable or available in managed runtimes such as Java or .NET. In contrast, our approach is solely based on user-level code and is de-coupled from specific operating system events. We evaluate the performance of our approach on a set of benchmarks and observe improvements in both micro benchmarks and more elaborate test applications.