[Vm-dev] Re: [Pharo-project] [Ann] Ephemerons for Cog

Eliot Miranda eliot.miranda at gmail.com
Tue May 24 16:38:12 UTC 2011


On Tue, May 24, 2011 at 9:09 AM, Igor Stasenko <siguctua at gmail.com> wrote:

>
> On 24 May 2011 16:58, Javier Burroni <javier.burroni at gmail.com> wrote:
> >
> > Hi Igor,
> > It's great you have implemented Ephemerons. I'll take a look to the code
> asap.
> >
> > I've sent the following mail to the VSWE-L list like a month ago. It
> > may (or may not) be useful for you
> > saludos
> > jb
> >
> The mail you posted is hard to follow for me, because
> i don't really understand what 'rescued ephemeron' means.
> Is it the one who initially seen without its key being marked, but
> then after full graph traversal
> has it key marked?
>
> The ephemerons extension to GC are quite simple (it explains why it
> took me 1 day to get initial implementation working).
>
> The only implication of ephemerons,
> that you need to fulfill is that you mark all reachable objects before
> analyzing ephemerons queue.
> And during analysis you have to make sure that again, you are marking
> all reachable objects
> discovered through ephemerons, whose keys are marked.
> If you obey the above rules, then there's not much to fear about. It
> will just work :)
>

I think there are two implications, and the second one is non-obvious
because the original implementor of ephemerons in VW, who was a GC expert,
got this wrong.  The first implication is indeed that you mark all reachable
objects before analysing ephemerons with unmarked/unreachable keys
(ephemerons with marked/reachable keys can and should be processed just like
ordinary objects).  The second implication is that the tracing of ephemerons
with unreachable keys continues until a fixed-point is reached where no new
ephemerons have been added to the ephemeron queue.  i.e. when tracing
ephemerons with unreachable keys one may reach new ephemerons which
themselves may have either marked/reachable or unmarked/unreachable keys.
 This is really important and a tad tricky.

cheers,
Eliot

>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110524/d0c9ef0a/attachment.htm


More information about the Vm-dev mailing list