What about persistent GC ?

Bruce Cohen cohenb at gemstone.com
Fri Jun 19 18:08:28 UTC 1998


Markus asks:
>> When we talk about distributed GC, another interesting
>> question comes to my mind. 
>> That's how can persistent objects be garbage collected efficiently ?
>> 
>> Im asking that because  implementing a simple OODB for squeak might be
>> an interesting project. 

You may have some trouble keeping it both interesting and simple :-).

>From one theoretical standpoint, persistent objects are just a more
long-lived generation, if you use generational collection you can add a
persistent collector which deals only with persistent garbage, and not
have to complicate the collectors used for more ephemeral objects.

Of course, this implies some things about your model of persistence: you
probably want to have persistence "infect" transient objects by
reachability, that is, any object referred to by a persistent object
which is not somehow explicitly labelled as transient should become
persistent.  So when you write an object to persistent store, you also
write the transitive closure of its references.  It also implies that
there are designated points in time at which you update the persistent
store.

That way, you can make the root of the persistent store be the root of
persistent gc.  It also makes it possible to run the persistent gc
concurrently with normal VM operation, since it needn't make way for
Smalltalk execution except when a persistent object needs to be fetched
from the store.

Bruce
-----------------------------------------------------------------------------
A product of Cassandra Systems, portents pending.
-----------------------------------------------------------------------------
Bruce Cohen,                               |  email: cohenb at gemstone.com
GemStone Systems, Inc.                     |  phone: (503)533-3602
20575 NW Von Neumann Drive                 |  fax:   (503)629-8556
Beaverton, OR USA 97006                    |  web:   http://www.gemstone.com





More information about the Squeak-dev mailing list