[gclist] Mars Rover info from comp.risks

Hans Boehm boehm@hoh.mti.sgi.com
Thu, 8 Jan 1998 09:18:50 -0800


On Jan 8,  2:27pm, Fabio Riccardi wrote:
> Subject: Re: [gclist] Mars Rover info from comp.risks
> Hans Boehm writes:
>  > My impression is the many JVMs actually handle priority inheritance for
locks
>  > more or less correctly.  (I guess I can say something positive about Java
>  > synchronization primitves after all :-))
>
> mmm, although I have (luckily) never seen the code of such VMs, I'm
> pretty sure that they don't do any priority inheritance.
>
Having unfortunately seen the code for some of the JVMs, I'm quite sure that
the green threads implementation that is often used with Sun's JDK does attempt
to do priority inheritance for locks (Java "synchronized").  The Java language
definition of course guarantees no such thing.  Based on other code I've seen,
I also don't think that's very uncommon among other threads packages.  But
again, I'm talking only about temporarily increasing the priority of a thread
holding a lock that's being waited for by a higher priority thread.

This may be less than what you're expecting.  As we've been discussing, it
fails to address the issue of condition variables.

Hans


-- 
Hans-Juergen Boehm
boehm@mti.sgi.com