tirkarp / stm-haskell-tl2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transactional Locking II (TL2) in STM Haskell

This is an implementation of TL2 (Dice, Shalev and Shavit) in STM Haskell. Code adapted from implementation of Du Bois.

Included in the src directory are sample concurrent algorithms and data structures designed to use STM, adapted from:

Benchmarks

Performance benchmark in this project is performed with criterion on a producer-consumer problem with 100,000 shared elements on a binary heap, with 16 producers and 16 consumers. Performance report of this lock-based TL2 algorithm is found in lock-based result.html. Performance report of the default lock-free STM is found in lock-free result.html.

Usage

Make sure you have stack installed. Clone this repository. Then run stack build; stack execute stm-exe. To generate the report again, append the flag -- --output report_filename.html at the end of the command.

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:HTML 86.3%Language:Haskell 13.7%