3 ms·
> The title says concurrent GC, which is, unfortunately, usually a misnomer in GC literature It is confusing. I think they started using pausless as the term n
by rdtsc 12y ago
> The title says concurrent GC, which is, unfortunately, usually a misnomer in GC literature
It is confusing. I think they started using pausless as the term now instead to distinguish between the two.
> Azul makes such a GC
Anyone who is interested in this, should read how that is implement. Really fascinating and cool.
However they are not the only ones. Erlang's GC is also pause-less and concurrent between actors. So GC in one actor won't pause other actors on a multi-core system.
- easytiger 12y ago> Anyone who is interested in this, should read how that is implement. Are is it implemented? my understanding was that it retains 4 copies of the entire heap in memory and continuously switches between them, or something like that.
- nickik 12y agoThat is not at all how it works. Essentially it splits the hole heap up into pages, pages have a state empty, allocating, evacuting. There are GC threads who constantly reallocate objects from pages that have high amount of unreachable objects to new pages. In order not to have mutator threads waiting for GC threads, they use worksharing. When the mutator wants to read from a page that is evacuting then, it will move that object itself (this is where the need the read barrior). This all requires very small amount of syncronisation, there is one small checkin point that every thread has to visit, then its all concurrent again. The pauses are only relate to how long it takes everybody to checkin, not the size of the heap, or the size of the pages. This allows multible 100GB with very small pause times. I just wrote this from memory and its of course more complicated, but this might help you to think about it.
- easytiger 12y agoThanks
- tomp 12y agoErlang's threads (called processes in Erlang) don't observably share data, so "concurrent" GC is basically a stop-the-world GC on a thread's local heap. There might be some thread synchronisation involved, but I assume it's much simpler to implement, because you don't have to deal with mutability.