>Could folks point me to useful algorithms where Intel's Processor Ordering
>(PO) or Sun's Partial Store Ordering (PSO) are not strong enough but SC with
>a total ordering is strong enough? I would also be interested in use of
>monitors where the SC is needed between volatiles and monitors, or for that
>matter between multiple monitors.
>- Rick Hudson
I know Doug Lea has some code in util.concurrent that depended
critically on sequential consistency for volatiles, and he had to
back it out when he learned that volatiles were not implemented
correct. Doug should be able to provide more details on this.
Dekker's algorithm is another example. Will Dekker's algorithm work under PO?
But to me, the most convincing argument for making volatiles be
sequentially consistent is that we have high school students writing
multithreaded Java applications. Trying to teach most Java
programmers that volatile variables only support PO or TSO rather
than SC is a nightmare I would not want to be involved in. Most of
the people on this list could cope very well with a definition of
volatiles that only mandated PO. But for the average Java programmer,
no way. Of course, they might never happen to write a correct program
that depended on the difference between SC and PO. But if they did, I
wouldn't want to be the one to try to explain to them why their
program doesn't work.
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:28 EDT