Skip to content

STM not as fair as it could be

Even though this has been discussed via email I'm filing a ticket so that the issue and the patch aren't forgotten about. If the patch is accepted it would be nice if it could be included in 6.8.3 provided it merges cleanly.

GHC's STM implementation could be a bit more fair. Suppose you have several transactions waiting for a variable to be updated. When that variable is updated all transactions are woken up. The problem is that the transaction which was blocked last is woken up first. This leads to unnecessary starvation in some programs.

There is a patch which fixes this. It can be downloaded from here: http://www.haskell.org/pipermail/cvs-ghc/2008-April/041943.html

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Multiple
Architecture Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information