[Haskell-cafe] Simulation and GHC Thread Scheduling
Thomas DuBuisson
thomas.dubuisson at gmail.com
Sat May 9 13:51:20 EDT 2009
On Sat, May 9, 2009 at 6:28 AM, Neil Brown <nccb2 at kent.ac.uk> wrote:
>
>> properly, the slight variation is actually a good test). What I would
>> like to know is are there any plans for GHC to incorporate
>> user-definable scheduler?
>
> What exactly is it that you want from a user-definable scheduler? Do you
> want co-operative scheduling in your program, or do you want to be able to
> control the thread-grouping and running order in the GHC runtime? More
> details of your requirements would help -- I can't quite make out what you
> need from your email.
I would like to alter the running order. For example, the router
thread should be ran in between every other thread - its the other
threads goal in life to send messages so there's probably one ready.
Additionally, the older threads should gradually become higher
priority (so they run more frequently and/or for longer than new
threads).
As I acknowledged, this simulation is a poor example, but what this
would give me is a bias toward the nodes in the DHT and away from the
hundreds of nodes sending join messages that will have high contention
and be dropped (there will always be progress, but as with STM there
is lots of retrying involved).
Thomas
More information about the Haskell-Cafe
mailing list