Re: JavaMemoryModel: october JMM spec seems to break java's threading model

From: Doug Lea (dl@cs.oswego.edu)
Date: Thu Nov 06 2003 - 19:34:43 EST


> > The best you can say is "over sufficiently long
> > observation periods, unblocked threads will progress"
> Will all unblocked threads make progress?

Thanks, I should have said: "over sufficiently long observation
periods, one or more unblocked threads will progress"

> A common fairness guarantee
> in model checking literature would be that if a thread can infinitely
> often make progress (e.g it is unblocked and perhaps has the highest
> priority), then it will infinitely often make progress or terminate.
>
> There isn't any guarantee in timing, just that eventually each
> unblocked thread will make progress.
>
> Do existing JVMs provide this guarantee?

Well, it's not in the spec. Generally, a given JVM will provide
approximately the same progress guarantees (or lack thereof) as the OS
it runs on. Almost definitionally, a JVM can do no better than that.

RTSJ (Real-time Java) makes much stronger guarantees, but is not
spec'ed as fair. Instead it is strictly priority based (and can only
run on priority-based real-time OS kernels.)

-Doug
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:53 EDT