On Wed, 10 Feb 2010 09:51:37 -0500, Leandro Lucarella <[email protected]> wrote:

Robert Jacques, el 10 de febrero a las 01:03 me escribiste:
-Getting concurrent GC code correct is very hard. Boehm's algorithm,
for instance, looks extremely racy.

There is a very simple concurrent GC model using fork()[1]. This is Unix only though (and very dependent on how efficiently fork() is implemented in the
OS). I'm working (very slowly :) on implementing a GC based on this
algorithm.

No races, almost no synchronization. If the OS uses COW when fork()ing (I
guess every modern OS does that), the only drawback is the copying of
changed pages.

[1] Nonintrusive Cloning Garbage Collector with Stock Operating System
    Support.
    http://www.cs.purdue.edu/homes/grr/snapshot-gc.ps


Cool. Hadn't thought of something so simple. I just watched a channel 9 blog (http://channel9.msdn.com/shows/Going%20Deep/Mark-Russinovich-Inside-Windows-7-Redux/) and about half-way through they talk about new process reflection capabilities in Windows 7, which are an extension of fork, which they've had for a while (for posix compatibility, etc). Also, the PAGE_WRITECOPY protection should also allow this to work on Windows, at a finer grain.

Reply via email to