JavaMemoryModel: Revisiting sleep loops and "useless" memory barriers

From: Bill Pugh (pugh@cs.umd.edu)
Date: Sun Nov 07 1999 - 16:25:20 EST


Thinking some more about the proposal to allow the elimination of memory
barriers associated with useless synchronization.

Under the current scheme, there is something very close to a fairness
assumption for seeing writes by other threads. If a thread writes to a
variable, and another thread keeps reading that variable, eventually it
will see the change. Under the expectation that you can't run code very
long without hitting a synchronized method, these is true under the current
model.

As we've discussed, a lot of code will break if we remove this assumption.
Some of the people I talked with from Microsoft Research said that when
they removed memory barriers associated with useless synchronization in
Volano (sp?) chat benchmark, it went into an infinite loop.

It might be possible to do something to restore the fairness assumption,
I'll have to think about it.

        Bill

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



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