Previous | Next --- Slide 51 of 63
Back to Lecture Thumbnails
nslobody

Haskell and Clojure appear to have built-in support for STM.

https://en.wikipedia.org/wiki/Concurrent_Haskell

https://en.wikipedia.org/wiki/Software_transactional_memory#Clojure http://clojure.org/refs

I think, from a little searching, that Haskell's implementation is lazy (not surprising) and optimistic. Not sure how Clojure does it.

acappiello

As shown by this slide, there really isn't any consensus with respect to which implementation of transactional memory is best. This is because the answer to that question is very workload dependent. For example, the contention around the transaction plays a big role in whether an optimistic or pessimistic approach is better. I imagine that this makes it extremely difficult to implement any sort of transactional memory that be used by a programmer at a high level and will give peak performance in most programs.