[Haskell-cafe] Re: Concurrency questions

Achim Schneider barsoap at web.de
Mon Jan 7 18:27:42 EST 2008

Ben Franksen <ben.franksen at online.de> wrote:

> Spencer Janssen wrote:
> > On Sun, Jan 06, 2008 at 11:30:53AM +0000, Andrew Coppin wrote:
> >> 1. Is there some way to assign a "priority" to Haskell threads?
> >> (The behaviour I'd like is that high priority threads always run
> >> first, and low priority threads potentially never run at all
> >> unless there's an available processor which is completely idle.)
> > 
> > Not in the current system.  It is not clear that thread priorities
> > are so nice anyway (see 'priority inversion' on Wikipedia, for
> > example).
> As the wikipedia page also mentions well-known counter-measures, such
> as priority inheritance and priority ceilings. For real-time
> applications, priorities are a /must have/. Or at least, I can't see
> anything nicer that could replace them.
Preemption, for hard real-time. For soft real-time, yes, SCHED_FIFO and
SCHED_RR are a must.

(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited. 

More information about the Haskell-Cafe mailing list