chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Best way to share memory between C and Chicken


From: Felix
Subject: Re: [Chicken-users] Best way to share memory between C and Chicken
Date: Mon, 06 May 2013 22:50:17 +0200 (CEST)

From: John Cowan <address@hidden>
Subject: Re: [Chicken-users] Best way to share memory between C and Chicken
Date: Mon, 6 May 2013 08:21:34 -0400

> Felix scripsit:
> 
>> Unfortunately, execution and garbage collection are tightly interleaved
>> in the cheney-on-the-mta model. 
> 
> Minor collection is, but major collection could be run in a separate
> thread so that it can run concurrently (even on a second core) with the
> rest of the program.  As it happens, I was reading about a concurrent
> GC just the other day which sounded interesting -- and just happens to
> be named Chicken, how cool is that?
> 
> <http://www.cs.technion.ac.il/~erez/Papers/real-time-pldi.pdf>

Nice. What a coincidence. I'll have to read it.

But implementing a collector like this is such a major piece of work
that I don't see this ever happening. It took years to get the current
GC into a reliable state. Running the collector, even only for major
collections concurrently will need numerous changes.  Currently
existing headers in oldspace are modified with a forwarding pointer
and thus be invalidated during GC. Those forwarding pointers could
perhaps be moved into a separate table, but things don't stop
there. The mutator may destructively mutate already copied oldspace
data - these mutations would need to be tracked and properly applied
to the copies in newspace, and so on and so on. As Dan already pointed
out, there are countless places where thread-safety suddenly becomes
an issue.

In short: give me six months, fully compensated and you get something
that works like crap. :-)


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]