What is the scheduler type of GHC?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the scheduler type of GHC?

Magicloud Magiclouds
Hi,
  Just read a post about schedulers in erlang and go lang, which informed me that erlang is preemptive and go lang is cooperative.
  So which is used by GHC? From ghc wiki about rts, if the question is only within haskell threads, it seems like cooperative.
--
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: What is the scheduler type of GHC?

Simon Marlow-7
On 16/01/13 08:32, Magicloud Magiclouds wrote:
> Hi,
>    Just read a post about schedulers in erlang and go lang, which
> informed me that erlang is preemptive and go lang is cooperative.
>    So which is used by GHC? From ghc wiki about rts, if the question is
> only within haskell threads, it seems like cooperative.

GHC is pre-emptive, but see http://hackage.haskell.org/trac/ghc/ticket/367.

Cheers,
        Simon


_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: What is the scheduler type of GHC?

Edward Z. Yang
In reply to this post by Magicloud Magiclouds
Excerpts from Magicloud Magiclouds's message of Wed Jan 16 00:32:00 -0800 2013:
> Hi,
>   Just read a post about schedulers in erlang and go lang, which informed
> me that erlang is preemptive and go lang is cooperative.
>   So which is used by GHC? From ghc wiki about rts, if the question is only
> within haskell threads, it seems like cooperative.

Additionally, the current scheduler is round-robin with some heuristics for
when threads get to "cut the line", so we do not have priorities for threads.
I'm currently working on a patch which allows for more flexible scheduling.

Edward

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users