harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiao-Feng Li <xiaofeng...@gmail.com>
Subject [doc] a quick guide on Tick project, the Harmony Concurrent GC
Date Wed, 15 Apr 2009 06:24:42 GMT
Hi,

I've written a slide deck on Tick [1], the Harmony concurrent GC we
developed. Tick has been there in Harmony for about one year, now I
got some time to put down its design and implementation. I do not
expect people can immediately understand all the internals of Tick
after reading the guide, but it should help those who want to dive
into Tick or those who want to write their own concurrent GC. The
immediate target of this document to help the GSoC2009 project with
Tick.

Concurrent GC is a super-set of stop-the-world GC, in my opinion. It
meets all the challenges in a STW GC and many beyond. The key
challenges in my mind (based on my experience with Tick) are:

1. The interaction between mutators and collectors. Here in my slides
I refer as the phase transition control. The idea was not so clear at
the beginning of Tick development, but we then realized it is simply
boiled down into a central state-machine control by mutator.

2. The termination control. It is easy to understand that to terminate
the marking process, we need guarantee the global root set, collector
local mark stacks, mutator local remember sets, and global remember
set all be empty. But there are two subtleties in real
implementations. a) the checks must be in order; b) concurrent access
to mutator local remset by mutator and collector.

3. The collection triggering scheduler. It can not collect too early
so as to waste the system resource when there are lots of free memory;
also it can not be too late to become virtually STW collection, hence
losing all the Tick design target. A proper triggering scheduler
should consider both space and timing issues.

4. Keep collection overhead small. Concurrent GC wants to achieve
short pause time, the expense is to lower the overall system
throughput. It is a challenge to balance the design between pause time
and system throughput. For example, to improve the performance,
multiple collectors can be deployed in parallel.

I would like to spend more time to document the internals of Tick. Stay tuned.

[1] http://people.apache.org/~xli/presentations/harmony_tick_concurrent_gc.pdf

Thanks,
xiaofeng
-- 
http://people.apache.org/~xli

Mime
View raw message