Re: clustering of objects in a VM
- From: "David Simmons" <david.simmons@xxxxxxxxxxxxxxx>
- Date: Thu, 6 Oct 2005 11:55:32 -0700
The simple answer is yes it can be done. Generally it is implicit via a
temporal proximity ordering.
I.e., if during say, an ephemeral collection cycle, two objects were
accessed within the same ephemeral cycle the collector knows what memory was
accessed where and can arrange to place the objects within the same memory
blocks.
But, even if it didn't, it would presumably still be placing all the
ephemerally accessed objects in the same quasi-newspace and thus they would
be in a much smaller block of memory.
Now, take this further in consideration of modern caching architectures and
recognize that the goal is to have as small a working set of memory as
possible being accessed so that it can all be in the cache. A crafted GC can
actually populate and keep such caches primed based on object access
information it knows implicitly from either object structure usage (design)
or ephemeral access (heuristic) knowledge.
This is even more true in the S# AOS VM system that segregates common header
/ fields of objects from their less frequently used extensible portions.
-- Dave
"Ian Upright" <ian-news@xxxxxxxxxxx> wrote in message
news:lvjak19k08fs60lha47dkrrd5d16r7c94h@xxxxxxxxxx
> I'm fairly naive when it comes to the implementation of modern VM and GC
> architecture, so I have a question, being curious as to how this works.
>
> When the garbage collector is moving about all the objects, does it
> "cluster" related objects together in the same memory space? For example,
> lets say we have objectA, and it referenced objectB, and that second
> object
> referenced an objectC. Now, lets also assume that there are no other
> references in the system to objectB and objectC.
>
> Does the gc do a breadth-first copying of all the live objects, in such a
> way that objectA, objectB, and objectC are pushed right up against each
> other, clustered in the same physical space in memory?
>
> If so, this could have potentially a huge impact on performance, whereas
> even using a C++ garbage collector, the objects could be physically
> scattered all over the place, and since all the references are very
> static,
> things aren't going to improve or get reclustered better over time.
>
> So I'm curious about Smalltalk VM's, Java VM's, etc, if anyone knows about
> the underlying implementation of in memory clustering of objects.
>
> Ian
>
> ---
> http://www.upright.net/ian/
.
- References:
- clustering of objects in a VM
- From: Ian Upright
- clustering of objects in a VM
- Prev by Date: Re: What should the criteria be for adding methods to the base classes?
- Next by Date: Re: clustering of objects in a VM
- Previous by thread: clustering of objects in a VM
- Next by thread: Re: clustering of objects in a VM
- Index(es):
Relevant Pages
|
Loading