[Ann] Ephemerons for Cog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Ann] Ephemerons for Cog

Chris Cunnington
"But if the dependents are stored in some global dictionary from model to sequence of dependents then the
reference from the global dictionary keeps both the model and the dependents alive."

When I hear "global dictionary" I think of a namespace. Perhaps namespaces could add efficiency to the GC.

Chris




Reply | Threaded
Open this post in threaded view
|

Re: [Ann] Ephemerons for Cog

Igor Stasenko
On 24 May 2011 14:46, Chris Cunnington <[hidden email]> wrote:
> "But if the dependents are stored in some global dictionary from model to
> sequence of dependents then the
> reference from the global dictionary keeps both the model and the dependents
> alive."
>
> When I hear "global dictionary" I think of a namespace. Perhaps namespaces
> could add efficiency to the GC.
>
I don't see how this could improve anything.
During full GC, it has to mark all reachable objects, because those
which won't be marked will be reclaimed.

So, how presence of namespaces could make GC faster?

> Chris


--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [Ann] Ephemerons for Cog

Toon Verwaest-2
On 05/24/2011 02:57 PM, Igor Stasenko wrote:

> On 24 May 2011 14:46, Chris Cunnington<[hidden email]>  wrote:
>> "But if the dependents are stored in some global dictionary from model to
>> sequence of dependents then the
>> reference from the global dictionary keeps both the model and the dependents
>> alive."
>>
>> When I hear "global dictionary" I think of a namespace. Perhaps namespaces
>> could add efficiency to the GC.
>>
> I don't see how this could improve anything.
> During full GC, it has to mark all reachable objects, because those
> which won't be marked will be reclaimed.
>
> So, how presence of namespaces could make GC faster?
If you know up-front that the namespace doesn't disappear, you could
separate those objects from the rest of the objects (in a separate heap)
and avoid marking/sweeping altogether. Basically a multi-heap
generational GC; with namespaces rather than just generations based on age.
Pointers going from one heap to another would have to go over a handle
table, as is usual...



Reply | Threaded
Open this post in threaded view
|

Re: [Ann] Ephemerons for Cog

abergel
Good point Toon. This is what HotSpot does actually.

Alexandre


On 24 May 2011, at 09:20, Toon Verwaest wrote:

> On 05/24/2011 02:57 PM, Igor Stasenko wrote:
>> On 24 May 2011 14:46, Chris Cunnington<[hidden email]>  wrote:
>>> "But if the dependents are stored in some global dictionary from model to
>>> sequence of dependents then the
>>> reference from the global dictionary keeps both the model and the dependents
>>> alive."
>>>
>>> When I hear "global dictionary" I think of a namespace. Perhaps namespaces
>>> could add efficiency to the GC.
>>>
>> I don't see how this could improve anything.
>> During full GC, it has to mark all reachable objects, because those
>> which won't be marked will be reclaimed.
>>
>> So, how presence of namespaces could make GC faster?
> If you know up-front that the namespace doesn't disappear, you could separate those objects from the rest of the objects (in a separate heap) and avoid marking/sweeping altogether. Basically a multi-heap generational GC; with namespaces rather than just generations based on age.
> Pointers going from one heap to another would have to go over a handle table, as is usual...
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: [Ann] Ephemerons for Cog

Igor Stasenko
In reply to this post by Toon Verwaest-2
On 24 May 2011 15:20, Toon Verwaest <[hidden email]> wrote:

> On 05/24/2011 02:57 PM, Igor Stasenko wrote:
>>
>> On 24 May 2011 14:46, Chris Cunnington<[hidden email]>
>>  wrote:
>>>
>>> "But if the dependents are stored in some global dictionary from model to
>>> sequence of dependents then the
>>> reference from the global dictionary keeps both the model and the
>>> dependents
>>> alive."
>>>
>>> When I hear "global dictionary" I think of a namespace. Perhaps
>>> namespaces
>>> could add efficiency to the GC.
>>>
>> I don't see how this could improve anything.
>> During full GC, it has to mark all reachable objects, because those
>> which won't be marked will be reclaimed.
>>
>> So, how presence of namespaces could make GC faster?
>
> If you know up-front that the namespace doesn't disappear, you could
> separate those objects from the rest of the objects (in a separate heap) and
> avoid marking/sweeping altogether. Basically a multi-heap generational GC;
> with namespaces rather than just generations based on age.
> Pointers going from one heap to another would have to go over a handle
> table, as is usual...
>

Yes. Object spaces with gates between them.

But this is orthogonal to Ephemerons.


--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [Ann] Ephemerons for Cog

Andres Valloud-4
In VisualWorks, the place where objects that are likely never garbage
live is called perm space.  You get a GC speedup roughly proportional to
the fraction of the image that is perm space (because you don't have to
scan it or mark it), as long as the GC is not global (i.e.: when you
also want to get rid of perm space garbage).

On 5/24/11 7:29 , Igor Stasenko wrote:

> On 24 May 2011 15:20, Toon Verwaest<[hidden email]>  wrote:
>> On 05/24/2011 02:57 PM, Igor Stasenko wrote:
>>>
>>> On 24 May 2011 14:46, Chris Cunnington<[hidden email]>
>>>   wrote:
>>>>
>>>> "But if the dependents are stored in some global dictionary from model to
>>>> sequence of dependents then the
>>>> reference from the global dictionary keeps both the model and the
>>>> dependents
>>>> alive."
>>>>
>>>> When I hear "global dictionary" I think of a namespace. Perhaps
>>>> namespaces
>>>> could add efficiency to the GC.
>>>>
>>> I don't see how this could improve anything.
>>> During full GC, it has to mark all reachable objects, because those
>>> which won't be marked will be reclaimed.
>>>
>>> So, how presence of namespaces could make GC faster?
>>
>> If you know up-front that the namespace doesn't disappear, you could
>> separate those objects from the rest of the objects (in a separate heap) and
>> avoid marking/sweeping altogether. Basically a multi-heap generational GC;
>> with namespaces rather than just generations based on age.
>> Pointers going from one heap to another would have to go over a handle
>> table, as is usual...
>>
>
> Yes. Object spaces with gates between them.
>
> But this is orthogonal to Ephemerons.
>
>