[dmd-concurrency] Smoke test

Walter Bright walter at digitalmars.com
Thu Jan 7 23:03:11 PST 2010



Robert Jacques wrote:
> On Thu, 07 Jan 2010 20:28:23 -0500, Walter Bright 
> <walter at digitalmars.com> wrote:
>> Having a per-thread gc is an optimization, not a fundamental feature 
>> of the concurrency model. For one thing, it precludes casting data to 
>> immutable. For another, it may result in excessive memory consumption 
>> as one thread may have a lot of unused data in its pool that is not 
>> available for allocation by another thread.
>> _______________________________________________
>> dmd-concurrency mailing list
>> dmd-concurrency at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-concurrency
>
> I would disagree; it's completely possible to allow safe casting to 
> immutable/shared with thread-local GCs. It just requires language 
> support. For example, adding a GC function which is called whenever a 
> shared cast occurs. In the current GC, the function does nothing and 
> everything proceeds as normal. With thread local GC, however, this 
> function would publish the casted object to a list. The local GC could 
> then pin all objects on the list and the shared GC could mark/sweep 
> the list entries instead of the objects themselves.

Sounds like the thread local pool will get peppered with shared islands 
inside it.

>
> Also, today a thread-local mark-sweep GC equals a modern concurrent 
> shared GC (according to Apple). So going forward, I think thread local 
> GCs will be a big thing.
> _______________________________________________
> dmd-concurrency mailing list
> dmd-concurrency at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-concurrency
>
>


More information about the dmd-concurrency mailing list