Of the atomic sex of the Long that how the memory protective screen of Volatile realizes and Double?

I know 64 to Long is, no matter be opposite,on 32 operating system Long variable is read take or keep the operation that needs 32 to tear open two, if be the setting of multi-line Cheng,fall, can bring about data to read take and write abnormal. I know Vcolatile can solve variable through memory protective screen the problem of sightless in CPU cache sex, how solve atomic sex?

Related Posts

8 thoughts on “Of the atomic sex of the Long that how the memory protective screen of Volatile realizes and Double?

  1. The atomic sex that Volatile added to assure Long before Long closes inside thought of @sagaxu Java process designing. The 680th page of the book, “Atomic sex and mutability ” this one chapter writes.

  2. Assure visibility only. Standard of Java fictitious machine also does not have requirement Long atomic sex, but it is OK that 64 fictitious machines fall one pace reachs the designated position come assure

  3. Volatile can make sure Read and Write are Atomic only, because Read and Write itself are single operation, should make sure all Thread see same result nature can make sure Read and Write are Atomic only so.

  4. Basis ” high-quality character of JVM of fictitious machine of thorough understanding Java and optimal practice ” this book explains mediumlyVolatile makes sure visibility and part are orderly only quality (the statement that prohibits be being decorated is optimized by instruction recomposition) , do not assure atomic sex. Because Long and Double have specialty, fictitious opportunity has the majority special implementation, assure atomic sex.

  5. Volatile and Atomic concern without half wool money, even if have, also be special manufacturer compile implement the spirit that make.

Leave a Reply

Your email address will not be published. Required fields are marked *