Re: JavaMemoryModel: Semantics for yield and sleep

From: Jerry Schwarz (jschwarz@us.oracle.com)
Date: Thu Jan 03 2002 - 14:31:39 EST


At 09:39 AM 01/03/2002, Bill Pugh wrote:
>I agree with those who point out that my proposed semantics for
>yield/sleep are insufficient as a basis for building complex multithreaded
>applications requiring some kind of fairness in scheduling.
>
>I also agree that the stronger fairness requirements needed for such
>applications are too complicated and too broad in scope in be included in
>JSR-133.
>
>However, I still want to argue for the inclusion of the minimal semantics
>I proposed for yield/sleep:
>
>* At an invocation of yield/sleep, there is a non-zero chance that some
>other thread of equal or higher
> priority will be allowed to execute.
>
>Although this is minimal as far as what you need to build real systems, it
>has some fairly clear and precise impacts on the set of allowed behaviors
>and compiler transformations. I consider these semantics necessary but not
>sufficient. If you had a JVM which didn't support these minimal semantics,
>I can't imagine how you could possibly write multithreaded applications for it.

We have a VM for which we don't expect people to write multithreaded
applications. Threads are can be used to deal with blocking I/O and
co-routining, but it is not intended to be used for long running parrallel
threads requiring scheduling.

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



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