[Haskell-cafe] concurrency vs. I/O in GHC

Erik Hesselink hesselink at gmail.com
Thu Oct 28 04:25:40 EDT 2010


On Wed, Oct 27, 2010 at 23:09, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> On 27/10/2010 05:00 PM, John Lato wrote:
>>
>> I am somewhat surprised that all capabilities must be ready for GC; I
>> thought with the parallel GC that wouldn't be necessary.  But I don't know
>> much about GC implementations so I try not to let their behavior surprise me
>> too much.
>
> GHC has a _parallel_ GC implementation, meaning that the GC event runs in
> parallel on several cores. But it does not (yet) have _concurrent_ GC,
> meaning that a GC event can happen at the same time as Haskell threads are
> running. (Basically, which Haskell code running, the references between
> objects could change while the GC engine is trying to analyse them, which
> would be Bad.) I understand that the developers are actively working on
> fixing this, since it can sometimes have a significant effect on the
> performance of multicore programs...

I thought that young generations could be GC'ed while other threads
were running, while collecting the old generation required
synchronizing all threads. This seems to be what is shown on
http://hackage.haskell.org/trac/ghc/blog/new-gc-preview as well.

Erik


More information about the Haskell-Cafe mailing list