On 16/07/2013 4:02 PM, David Jeske wrote:
> The overview paper in which CHICKEN was reviewed did not describe it's 
> design in detail. Refer to the STOPLESS paper for a more complete 
> explanation of their techniques, most of which apply to CHICKEN as 
> well. There you can see a more complete description of their 
> 'soft-handshake' system for asking threads to voluntarily switch 
> between different modes, and in turn only uses barriers during certain 
> (prep and copy) phases (see, 3.2.1 System Phases). This is the 
> double-code-paths cost I was referring to, because if you want a 
> version of the code completely without barrier checks, then you must 
> have two versions of the code instantiated and switch between them. 
> Another alternative is to always a barrier test which can be skipped 
> with only modest cost.

CHICKEN does not switch barriers, it always uses a Brooks-style read 
barrier to reference the current object version. From the paper, section 
4.2:

"In contrast to STOPLESS’ moving of objects field-by-field from the 
original to the new location, CHICKEN completely copies an object to its 
new location and then lets all program threads switch to working on the 
new location. Thus, either the from-space object contains the most
up-to-date state, or the to-space does. This property is useful for read 
performance, as it allows field reads to be implemented using a simple 
wait-free Brooks-style barrier, rather than the heavier barriers of 
STOPLESS or CLOVER. These other collectors require reads to do per-field 
checks to see where the latest version of a field is—such a check in 
practice requires more indirection than the Brooks barrier. [...] To 
summarize, CHICKEN requires only a Brooks-style read barrier and a 
wait-free “aborting” write barrier that in the fast path only requires a 
read operation and a branch followed by the original write operation."

The read op in the write barrier is simply a header tag check. While 
read barriers are typically prohibitively expensive, the Brooks 
barrier's overhead on overall runtime seems modest from the benchmarks 
I've read (~5-10% IIRC). It's the only significant overhead over 
stop-the-world that CHICKEN introduces. The code for these barriers are 
Fig1 and Fig2.

CHICKEN is a significant simplification of the techniques used in 
STOPLESS, and they do describe it in quite some detail in sections 
4.3-4.5. Furthermore, the amount to be copied in one collection cycle is 
configurable, so it's quite a promising set of tradeoffs.

Sandro


_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to