Coping with context switches in lock-based software transactional memory

Yehuda Afek*, Yoav Cohen, Adam Morrison

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

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 switchedout 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 decoupled 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.

Original languageEnglish
Title of host publicationProceedings of the 4th Annual International Systems and Storage Conference, SYSTOR 2011
DOIs
StatePublished - 2011
Event4th Annual International Systems and Storage Conference, SYSTOR 2011 - Haifa, Israel
Duration: 30 May 20111 Jun 2011

Publication series

NameACM International Conference Proceeding Series

Conference

Conference4th Annual International Systems and Storage Conference, SYSTOR 2011
Country/TerritoryIsrael
CityHaifa
Period30/05/111/06/11

Keywords

  • Software transactional memory
  • Thread oversubscription

Fingerprint

Dive into the research topics of 'Coping with context switches in lock-based software transactional memory'. Together they form a unique fingerprint.

Cite this