[gclist] Java manchines and when to collect.

Steve Lee sjlee@newmonics.com
Sun, 14 Dec 1997 23:50:19 -0600


-----Original Message-----
From: Jeremy Fitzhardinge <jeremy@zip.com.au>
To: Mark Tillotson <markt@harlequin.co.uk>
Cc: cef@geodesic.com <cef@geodesic.com>; gclist@iecc.com <gclist@iecc.com>
Date: Sunday, December 14, 1997 9:59 AM
Subject: Re: [gclist] Java manchines and when to collect.


>
>I think there's some quite interesting problems in this area.  The
>problem is that as far as a GC is concerned, an object is "owned" by
>whoever points to it.  If an applet allocates millions of objects, but
>gets something else to hold references to them, it can cause lots of
>memory to be allocated without looking responsible.  If you try to
>constrain allocation by looking at rate, a hostile applet can merely
>arrange for something else to allocate memory on its behalf.  And what
>happens if an allocated object is pointed to by both a respectible
>trusted piece of code and some nasty miscreant applet?
>
>Determining resource consumption in terms of memory ownership is not
>necessarily the job of the GC, but given it has global knowledge of the
>heap's topology, it's in a good position to make a mapping from the
>roots to actual objects, and therefore work out proportional ownership.
>
>The problem is similar to trying to determine the physical memory usage
>of a process using shared libraries: is it exceeding its memory limit if
>attaches to already resident pages?  The obvious answers are neither the
>fairest, nor (necessarily) the most desireable.
>
>There's similar problems with determining an applets CPU consumption:
>trading off a few CPU-bound threads against lots of mostly idle ones;
>the problem of threads performing work on behalf of others.  I wonder if
>there can be some unification of techniques for both memory and CPU
>consumption management.
>
> J
>

Have you taken a look at NewMonics' PERC realtime-java extensions?  The PERC
runtime system assigns ownership of objects to Activitys (somewhat analogous to
an applet) and then enforces each Activity to stay within its budget, so as to
allow each Activity to have deterministic memory allocation.  Activitys
negotiate with the PERC runtime system to determine a guaranteed budget and an
expected budget.  Similar negotiation is done for CPU management.

To find out more, see:

  http://www.newmonics.com

---
Steve Lee
Ames Development Manager
NewMonics