An implementation of composable memory transactions in Haskell

  • Authors:
  • André Rauber Du Bois

  • Affiliations:
  • PPGC, UFPel, Brazil

  • Venue:
  • SC'11 Proceedings of the 10th international conference on Software composition
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper describes an implementation of STM Haskell [11] in Haskell using the Transactional Locking 2 (TL2) algorithm by Dice, Shalev, and Shavit. TL2 provides an important characteristic that makes it suitable for implementing transactions as a library: it efficiently avoids periods of unsafe execution, guaranteeing that transactions always see a consistent state of memory. Preliminary measurements suggest that our library performs reasonably well, and provides similar scalability to the original STM Haskell runtime system, that was implemented in C. The implementation presented in this paper could work as a testbed to experiment with new extensions for STM Haskell. As an example, we demonstrate how to modify the basic library to support the unreadTVar [20] construct.