表中第1个操作与第2个操作中间可能任意数量的其他操作,所以例如表中[Normal Store,Volatile Store]中的[No]表示 Normal Store 不能与任何后续的 Volatile Store 进行重排序,至少是任何能对多线程程序语义有影响的重排序。 JSR-133规范的措辞使得volatiles和monitors的规则 仅适用于可能被多线程访问的场景。如果编译器...
2. The JSR-133 Cookbook for Compiler Writers. http://gee.cs.oswego.edu/dl/jmm/cookbook.html. 3. JSR-133: Java Memory Model and Thread Specification. http://www.cs.umd.edu/ ~pugh/java/memoryModel/jsr133.pdf, August 2004. 4. S. V. Adve and M. D. Hill. A unified formalization ...
The JSR-133 specification is worded such that the rules forboth volatiles and monitors apply only to those that may be accessed by multiple threads.If a compiler can somehow (usually only with great effort) prove that a lock is only accessible from a single thread, it may be eliminated(消除...
The JSR-133 specification is worded such that the rules for both volatiles and monitors apply only to those that may be accessed by multiple threads. If a compiler can somehow (usually only with great effort) prove that a lock is only accessible from a single thread, it may be eliminated....