Pre-emptive or co-operative concurrency (was: Concurrency)

Simon Marlow simonmar at microsoft.com
Thu Mar 30 06:03:56 EST 2006


On 29 March 2006 17:34, Neil Mitchell wrote:

>> context-switches happen only on specific events, which every
>> thread will usually engage in, although it need not always do so:
>> 
>> 1 only calls to yield
>> 2 any calls to concurrency library api
>> 3 any allocation
> 
> The Yhc concurrency switches every n instructions, and therefore even
> an "evil" thread cannot lock up the system.
> 
> Of course, even with fully pre-emptive scheduling, you've still got
> deadlocks... 

Neil,

What does YHC do about in-progress thunk evaluations when a context
switch happens?  Does it use blackholing like GHC, or does it
portentially duplicate the work, or something else?

Cheers,
	Simon


More information about the Haskell-prime mailing list