Notes [Mind map] read a deep understanding of JAVA memory model collation of the mind map __java

Source: Internet
Author: User
Tags visibility volatile

I remember poor, finishing this mind map, the equivalent of a more serious look at the whole mind map, basically is the original copy.
has a hierarchical relationship. And some of my own understanding. Because the image of the mind map to get out of the picture is greater than 100M. So let's release the source file,
Read and read more conveniently. Free integral download: http://download.csdn.net/detail/mr_zhuqiang/8945087 (I am very silent ah.) It used to be a free integral, not knowing when to become 5 points. Do not know how to modify into 0 points)

There are a few points I think are reading this book or mind mapping. What you need to understand is:
1. What is memory visibility
2. In Java programs, code directives executed at the bottom are not performed exactly in sequence-there are reordering
3. Volatile is a concept that is related to the number of bits of hardware and the number of digits in the data, and is actually irrelevant to multithreading.

Example: long:64 bit, Operation Long on 32-bit hardware requires two times (registers and memory), you can need volatile (multithreading) to ensure that the current thread is fully written to 64 bits, other threads can read or write on 64-bit hardware operation long (64 bits), With no volatile a little influence (machine instructions have ensured this)
If this is correct, then it validates the two characteristics of volatile, visibility and atomicity. However, if you want to use code to show the error effect, it seems not to write,
Useful volatile to ensure synchronicity. But this is indeed misused, volatile only to ensure that the variable read and write, does not guarantee the synchronization of the composite operation. So it's okay to remember the two features of volatile.

4. It is because of the reordering and data competition that there is multithreading concurrency security issues
5. What is escaping. : The object has not yet been constructed to complete the reference has been used elsewhere-called escape
The correct initialization method for the modified variable of 6.final
The following is an organized mind map level screenshot show


Download Address: http://download.csdn.net/detail/mr_zhuqiang/8939419

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.