haskellconcurrencyclojurestmtransactional-memory

What algorithms are used in Clojure, Haskell (and other languages) for STM?


As I understand there are several different algorithms for implementing Software Transactional Memory (and this is a quite active research area). Where can I find (without having to dive into source code) which are used in different languages and libraryes, particularly in Clojure and Haskell (GHC)?


Solution

  • The ultimate resource on Clojure's STM -- apart from the code itself -- is the Software Transactional Memory article by Mark Volkmann.

    It presents a brief high level overview of STM-the-approach (as compared to other approaches to concurrency), summarises the various concurrency features available in Clojure, then dives into Clojure's STM, describing exactly what happens during a transaction and ultimately going right down to the level of the individual classes involved. In addition to offering a lot of hard information on the inner workings of Clojure's STM machinery, it contains a good number of very insightful remarks relating to Clojure's concurrency-oriented features as they are used in idiomatic Clojure programmes.

    The actual entry point to Mark's STM resources is this page, currently featuring some STM slides in addition to the link to the latest version of the main STM article.