Hacker News new | past | comments | ask | show | jobs | submit login

Why is GHC doing thread scheduling?



GHC provides a parallel programming model,

* K sparks scheduled over * M lightweight threads scheduled onto * N OS threads over * C hardware cores.

The runtime manages this, and does load balancing.


(Disclaimer: I've never programmed Haskell or used GHC outside of Xmonad)

I'm pretty sure they use a M:N language-thread to OS-thread system. So they need to decide what thread to put "on" an OS-thread at any given time.


Haskell (GHC at least) has lightweight user-level threads, similar to Erlang.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: