On Mon, 06 Aug 2012 20:56:55 +0200, Marco Maggi <
mrc...@gmail.com>
wrote:
>All right, thanks to everyone.
>
>George Neuner wrote:
>
>> As John Cowan said, BiBOP is not a GC algorithm.
>
>I thought that value allocation, value collection and memory
>page handling were deeply entangled. However, I do not know
>enough to draw the line that separates implementation
>specific choices from known algorithms definitions. But, it
>is interesting that BIBOP is not concerned with GC; maybe it
>means that I just need to put more effort into reading
>Dybvig's paper.
Allocation and collection are entangled, but VMM is an orthogonal
dimension ... some systems are purely software and do not deliberately
invoke VMM mechanisms at all.
At the simplest, a BiBOP heap is simply a contiguous address range
that stores objects of a single type. The complexity comes in how
each individual heap is managed.
For example, you might want to compact heaps to reduce the VMM working
set ... but do you slide the objects in order towards one end of the
heap or do you rearrange the order? Do you just fill in allocation
holes or do you sort the objects in some way? Do you want lists or
trees of linked objects to be contiguous in memory? What's the best
sort order - depth first, breadth first, allocation order, reversed of
any of these? Does it make sense to generically handle fixed size and
variably sized objects in the same way or do you want to special case
for performance?
What kind of latency can your applications tolerate? Are you going to
halt the mutator for the duration or let it continue to run during GC?
Are there multiple mutators (threads)? How and what do they share?
>> Sometimes in BiBOP implementations only built-in types or
>> only fixed sized types are segregated while everything
>> else is put into a common heap. GC with BiBOP is similar
>> to generational GC because the heaps are globally
>> interconnected.
>
>He! He! To understand this paragraph one has to know the
>algorithms. ;-) I already understand how individual values
>are tagged and allocated in Ikarus/Vicare (each page can
>contain values of any type), what I do not understand is how
>memory pages are classified, recycled, whatever, and what
>the hell is a dirty vector?
Sounds like a 2 stage allocator. But if so, it exists somewhere in
that orthogonal dimension I mentioned above ... it doesn't have
anything to do with the GC algorithm per se, but has to do with the
handling of pages that are found to be empty afterward.
The problem is that - even with really excellent code documentation -
you are going to have to learn some GC theory - and maybe also some
VMM mechanics - to know what to look for and to know if and how it can
be modified. There are multiple approaches to GC, each with numerous
variants, and virtually all practical systems are hybrids that employ
elements of more than one approach.
>> I suggest a book instead:
>> Jones and Lins, "Garbage Collection: Algorithms for Automatic
>> Dynamic Memory Management", ISBN 0-471-94148-4.
>> [...]
>> this book effectively is THE REFERENCE on GC and is better
>> suited for teaching a novice.
>
>Thanks, unfortunately it is out of my reach.
I can try to pull together a study packet for you. Might take a
couple of days as I don't have some of the fundamental papers handy in
digital form (the hazard of stocked bookshelves 8-). I presume your
email works?
George