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

Re: GC for Ozone



On Thu, 24 May 2001, Olaf Mersmann wrote:
> 
> I have no fully thought out solution yet :) 
> 
> Here is how I am tackling the problem:
> 0) Get a solid understanding of the ozoneDB.core.* stuff (working on it)
> 1) Develop a sutiable test application which trashes a DB with lost of 
>    unreachable Objects but keeps track of how many should be reaped etc.
>    so the GC can be checked for correctness (partially done)
> 
> I plan to make the GC external if at all possible since there will be
> apps that don't need it at all. Currently I can think of two
> strategies to GC a DB. Both are a variant of mark & sweep since I
> don't think that a refrence counting GC is generally not worth
> implementing. The first variant would add a "color" field to each Db
> Object and gcing would simply be an excercise in graph coloring :) The
> second works almost like the backup system, grab all OIDs into a list
> and then remove those that you find while walking the graph of
> reachable objects starting with all named objects. The real difficulty
> in both of these is to find an effective way to traverse all reachable
> objects. The first thing I can come up with is to use the Reflections
> API to inspect each named object and go on from there but this means
> we have to handle collections/maps/etc seperatly, right?

You don't need to handle collections separatly. They are Java objects as well.
YOu can find all proxies (external references) from an database object (which in
fact is a graph of simple Java objects) using reflection and nothing else.

IMO the problem is not to find all external references from a database object.
The problem is that this information is stored right _inside_ the objects
itself, which means that you would have to activate the entire database in
memory, when you want to build the entire graph in order to search for
unreachlabe parts of the graph.
So IMO the GC has to work iteratively. mark&sweep _is_ iteratively AFAIK, right?

> 
> Any and all thoughts/critisisms on this are welcome.
> 
> Sincerly
> Olaf Mersmann
> 
> P.S> If anyone happens to know if there are publications on this
> matter I would be glad to here of them since most GC stuff I have read
> pertained to memory only systems where IO is fairly cheap compared to
> our case.

Well, field of real research - makes it real interesting ;)


Falko
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com