harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Garner <robin.gar...@anu.edu.au>
Subject Re: [VM]How to trigue GC while free native memory is low.
Date Fri, 09 Feb 2007 08:35:25 GMT
Leo Li wrote:
> So is it possible for our VM support an option by which our customer can
> customize the policy while the VM still supply a default policy, for
> example, assuming the native heap limit as that of the java heap?

Naturally.  I don't think that's a good example, though, as much of the 
discussion on this thread has illustrated the connection between native 
resources and java objects is somewhat hard to pin down.

Policy could be as simple as "request a GC whenever native memory grows 
by 1MB" or "reaches 75% utilization".  Or arbitrarily complex, eg 
negotiated with some host environment.  The point is to simplify the 
design by separating policy from mechanism.

> On 2/9/07, Rana Dasgupta <rdasgupt@gmail.com> wrote:
>>
>> On 2/8/07, Robin Garner <robin.garner@anu.edu.au> wrote:
>> >
>> > Tim Ellison wrote:
>> > > Rana Dasgupta wrote:
>> > >> On 2/5/07, Tim Ellison <t.p.ellison@gmail.com> wrote:
>> >
>> > >>> I don't think that we need to expand the scope of the problem to
do
>> > >>> all types of resource accounting in the JVM or in an underlying
>> > >>> platform layer. I don't see the spec providing any basic 
>> guidance in
>> > >>> this area, it falls in the category of failsafe JVM's which is
an
>> > >>> interesting area, but IMHO beyond scope at this point. My 
>> suggestion
>> > >>> is that we treat this as a specific nio api implementation problem
>> > >>> for which we can think of adding some VM/GC support if it helps.
>> > >>>
>> > >> We may have to disagree here then, I think we should indeed be
>> > >> considering a general solution for detecting early when these Java
>> > >> 'handle' objects are collectable -- then we can apply it to direct
>> > >> buffers or other handle types.
>> >
>> > >My point was that by adding a single GC -> VM interface function, all
>> > >types of native resources could be addressed in a simple extensible
>> way.
>> > >The subsequent policy and mechanism decisions then become an ongoing
>> > >design process for the VM and classlib native implementers, but once
>> > >this interface function is added, GC can support freeing of native
>> > >resources by whatever mechanisms the VM chooses to implement.
>>
>>
>> I don't understand very well how the JVM can define policies on its
>> platform/OS resource usage when it may be hosted by a server which wants
>> to
>> define such policies itself. In other words, say the JVM is running an
>> RDBMS
>> managed stored procedure. Should it be making assumptions about how much
>> native heap to use etc. when the hosting RDBMS may have negotiated such
>> policies itself and may be choosing to invoke one or more instances of 
>> the
>> JVM?
>>
> 
> 
> 


-- 
Robin Garner
Dept. of Computer Science
Australian National University
http://cs.anu.edu.au/people/Robin.Garner/

Mime
View raw message