RTS's (old?) invariant regarding OS blocking

Dan Aloni dan at kernelim.com
Wed Mar 2 14:38:56 UTC 2016


Hi,

While trying to gain insights into the RTS, I've noticed the following in
the Wiki page [1] on the topic of the scheduler:

    Invariant: a task that holds a capability is not blocked in the operating system.

    This makes some parts of the system simpler - for example, we can use spin locks that spin indefinitely, because we can ensure that the spin lock is only held by a currently executing CPU, and will therefore be released in a finite (and short) amount of time.

Does it still apply to modern day GHC, or was it addressed by [2]?

[1] https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Scheduler#Capabilities
[2] https://ghc.haskell.org/trac/ghc/ticket/3553

--
Dan Aloni


More information about the ghc-devs mailing list