Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The OpenJDK Revised Java Memory Model (infoq.com)
64 points by luu on May 31, 2015 | hide | past | favorite | 4 comments


Ok, I am trying to get this of terminology straight. My source for rigorous threading theory comes from 'The Art of Multiprocessor Programming'. There they detail the linearisable and serialisable properties.

Does any wise soul have a links or an explanation of sequentially-constistent and happens-before consistent? I am reading sequentially-consistent == serialisable, but that might be off.

I appreciate that there is an explanation in the article but I feel I need to read (and reread) multiple explanations of these terms before I can get a handle on them.

Thanks for any responses :)


Sequentially consistent: the program behaves as if it executed sequentially for some interlacing of the instructions (across threads).

Happens-before consistent: the program behaves according to the happens-before rules of the JMM. Sequential consistency may be violated if two threads modify unsynchronized or non-volatile fields.


Thanks, I feel like I am being a bit thick here.

Would it be fair to say that happens-before consistent is a property of every java program. And sequentially consistent is a property of every java program without data-races? (ignoring unsafe/jni etc.)?


Yes, as I understand it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: