AAU Student Projects - visit Aalborg University's student projects portal
A master's thesis from Aalborg University
Book cover


Benchmarking Contention Management Strategies in Clojure’s Software Transactional Memory Implementation

Term

4. term

Education

Publication year

2010

Submitted on

Pages

64

Abstract

Lock-based concurrent programs are difficult to write and prone to a variety of well-known errors. Software transactional memory (STM) poses an alternative to locks, promising to make concurrent programming easier. One of the few languages that have included STM from an early stage is Clojure, a Lisp dialect for the Java Virtual Machine. In our work, we benchmark the contention management strategies Aggres- sive, Priority and Karma in Clojure’s STM. Our results show that the choice of strategy has significant impact on performance, but that there are only a few specific cases where it is an advantage to use any of those tested over Clojure’s original. None of these cases warrant a replacement of the strategy that Clojure already uses. Since we only investigate a limited selection of the strategies suggested in STM research, future work is needed to find whether there exist other strategies that surpass Clojure’s.

Lock-based concurrent programs are difficult to write and prone to a variety of well-known errors. Software transactional memory (STM) poses an alternative to locks, promising to make concurrent programming easier. One of the few languages that have included STM from an early stage is Clojure, a Lisp dialect for the Java Virtual Machine. In our work, we benchmark the contention management strategies Aggres- sive, Priority and Karma in Clojure’s STM. Our results show that the choice of strategy has significant impact on performance, but that there are only a few specific cases where it is an advantage to use any of those tested over Clojure’s original. None of these cases warrant a replacement of the strategy that Clojure already uses. Since we only investigate a limited selection of the strategies suggested in STM research, future work is needed to find whether there exist other strategies that surpass Clojure’s.