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

Re: GC for Ozone



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?

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.

-- 
  ()~()   Olaf Mersmann - Student of Applied Physics 
 (-___-)  eMail: olafm@slaveone.tako.de 
 =='-'==  web: http://kimberly.dnsalias.net/ome 

PGP signature