State of parallel GC?
simonpj at microsoft.com
Fri Nov 16 06:09:21 EST 2007
Using concurrency in GC usually implies one of
- Parallel GC. Stop the mutator(s) and use multiple processors to do GC; when they are done, start the mutators. This isn't real-time, because there's an unbounded pause for GC. This is what Simon and Roshan's parallel collector does.
- Interleaved GC. The mutator(s) alternate between GC and ordinary mutation. We once had a version of GHC that did this on a uni-processor, thanks to Andy Cheadle. See the paper "Non-stop Haskell".
- Concurrent GC. Use multiple processors to do GC while running the mutator(s) at the same time. This can be near-real-time.
You want concurrent GC I think. But it's a tough one:
a) it's jolly complicated to get right
b) it requires very fine-grain locking so that the mutators and
collectors don't trip over each other.
(b) is painful because it makes all programs run slower, whether or not they need the real-time behaviour. Yes, you could compile two ways, but that make it even harder to keep the system working!
We don't (I think) have any current plans to implement concurrent GC on a multi-processor, but it'd be a great (hard) project. Andy's work on Non-Stop Haskell might be a good starting point.
| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-bounces at haskell.org] On Behalf Of
| Jeremy Shaw
| Sent: 15 November 2007 18:20
| To: glasgow-haskell-users at haskell.org
| Subject: Re: State of parallel GC?
| Is real-time, parallel garbage collection at all feasible?
| My thinking is, real-time garbage collection requires the garbage
| collector to be able to work on the problem in small, predictable,
| pieces. That seems like something which would also be useful for
| scaling up GC to multiple cores?
| I am curious, because I have a project in mind that would benefit
| greatly from real-time, parallel garbage collection :)
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
More information about the Glasgow-haskell-users