Transactional memory for Smalltalk

Lukas Renggli, Oscar Nierstrasz. Transactional memory for Smalltalk. In Serge Demeyer, Jean-François Perrot, editors, Proceedings of the 2007 International Conference on Dynamic Languages (ICDL 2007), organised in conjunction with the 15th International Smalltalk Joint Conference 2007, Lugano, Switzerland, 25-31 August 2007. Volume 286 of ACM International Conference Proceeding Series, pages 207-221, ACM, 2007. [doi]

Abstract

Concurrency control in Smalltalk is based on locks and is therefore notoriously difficult to use. Even though some implementations provide high-level constructs, these add complexity and potentially hard-to-detect bugs to the application. Transactional memory is an attractive mechanism that does not have the drawbacks of locks, however the underlying implementation is often difficult to integrate into an existing language. In this paper we show how we have introduced transactional semantics in Smalltalk by using the reflective facilities of the language. Our approach is based on method annotations, incremental parse tree transformations and an optimistic commit protocol. We report on a practical case study, benchmarks and further and on-going work.