[Haskell-cafe] concurrent haskell: thread priorities
Bulat Ziganshin
bulat.ziganshin at gmail.com
Mon Dec 22 15:14:46 EST 2008
Hello Neal,
Monday, December 22, 2008, 11:07:32 PM, you wrote:
> The threaded RT creates an OS thread for each CPU/core on the system and
> uses them to multiplex userland threads. These are context switched
> whenever they block/yield/gc and no priorities can be assigned.
not exactly. amount of OS threads created controlled by +RTS -N option
to the program; unless program has special function that RTS calls to
set up this value
they are switched on every minor GC which by default occurs after
each 256kb allocated which is rather frequent event
> It seems like we could get some priority based scheduling (and still be
> slackers) if we allow marked green threads to be strictly associated
> with a specific OS thread (forkChildIO?).
forkOS creates new haskell thread and new OS thread specially for it
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list