[Vm-dev] Re: Ephemerons - hope it is right this time :)
siguctua at gmail.com
Thu Jun 2 22:14:08 UTC 2011
On 2 June 2011 21:44, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> Hi Igor,
> you have identified a key point I was trying to explain earlier.
> On Thu, Jun 2, 2011 at 5:36 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>> There is one slight thing, which i had doubts about.
>> Initially, when i was revising the algorithm, i followed the same road
>> as in paper:
>> In the third phase, the collector traces the remaining objects,
>> beginning at the ephemerons still on the queue. Any ephemerons
>> encountered in this phase are treated as ordinary objects, and all
>> fields traced’.
> This was Barry Hayes' misunderstanding and the thing I had to fix in his initial implementation in the VW VM, wen I finished and released VW ephemerons. It is not a third phase. Instead, the ephemeron detecting process is a sub-part of GC tracing that continues until tracing reaches the fixed point of not finding any more morning ephemerons. Discovering a mourning ephemeron also discovers a new root (the ephemeron) but that root cannot be traced until all mourning ephemerons have been discovered in the current cycle. Once the cycle is complete then the mourning ephemerons can be traced which in turn may discover more mourning ephemerons until the fixed point is reached.
> So the paper is wrong. I can show you private communications between myself and George Bosworth (the inventor of ephemerons in VSE) discussing precisely this, but I would prefer it if you would take my word for it :)
Yes, i felt that this "third" phase are not quite consistent with
purpose of ephemerons.
And moreover, i think , its not hurts to report something in advance
to what one expecting.
It's much worse when you don't receive a notification, when you expecting it.
>> It means that VM will report only the topmost ephemerons (which has
>> keys non-reachable from roots),
>> but not consider ephemerons which are reachanble from those ones,
>> which will be discovered later, when queue will be processed.
>> The difference is, whether VM should also report nested ephemeron or not.
> It must report nested ephemerons.
Kewl. Then i made right decision, despite that paper says don't :)
Igor Stasenko AKA sig.
More information about the Vm-dev