Home > Java > javaTutorial > body text

8 recommended articles about JMM

黄舟
Release: 2017-06-12 13:29:56
Original
1491 people have browsed it

JMM is an inevitable level for a programmer who wants to understand Java in depth. This article is more theoretical and is as easy to understand as possible. I hope you can correct me if there are any mistakes. Then let’s talk about the main memory allocation of jvm first. 1 java virtual machine stack (java virtual stack) The virtual machine stack is private to the thread. Each thread has its own virtual machine stack, which is the memory model for java method execution. Each When a method is executed, a stack frame will be created on the virtual machine stack. The stack frame is a data structure that mainly stores local variables in the method (basic type, object reference, returnAddress type (pointing to the address of a bytecode instruction) )), operation stack (referring to the stack of operation instructions after method compilation), dynamic linking, method export. Generally speaking, Java memory is divided into stack and heap, and the stack refers to the virtual machine stack. But Java's memory allocation is not that simple. Dynamic linking is explained as follows: Each stack frame contains a reference to the method to which the stack frame belongs in the execution runtime constant pool. This reference is held to support method

1. JMM java Detailed graphic explanation of memory model

8 recommended articles about JMM

##Introduction: JMM is for a programmer who wants to understand Java in depth This is an unavoidable test. This article is more theoretical and is as easy to understand as possible. If there are any mistakes, I hope you can correct me.

2. [Fighting Java Concurrency]-----Reordering of Java Memory Model

8 recommended articles about JMM

Introduction: When executing a program, in order to improve performance, processors and compilers often reorder instructions, but they cannot be reordered arbitrarily, not how you want to order them. How to sort, it needs to meet the following two conditions: 1. The result of program running cannot be changed in a single-threaded environment; 2. Reordering is not allowed if there are data dependencies. If you have read LZ’s previous blog, you will know that in fact this The two points can be summed up in one point: JMM allows arbitrary ordering that cannot be derived from the happens-before principle. as-if-serial semantics as-if-se

3. 【Java concurrency】-----Java memory model happens-before

8 recommended articles about JMM

Introduction: In the previous blog ([Fighting Java Concurrency] - In-depth analysis of the implementation principle of volatile) LZ mentioned It has been seen that due to the existence of thread local memory and main memory, coupled with reordering, there will be visibility problems in multi-threaded environments. So if we use synchronization and locking correctly, when does thread A modify variable a visible to thread B? We cannot stipulate in all scenarios when variables modified by a thread are visible to other threads, but we can specify certain rules. This rule is happens-before. Starting from JDK 5, JMM uses ha

4. In-depth analysis of Java memory model: summary

8 recommended articles about JMM

Introduction: The sequentially consistent memory model is a theoretical reference model. JMM and processor memory models usually use the sequentially consistent memory model as a reference when designing. The JMM and processor memory model will make some relaxations in the sequential consistency model when designing, because if the processor and JMM are implemented completely in accordance with the sequential consistency model, many processor and compiler optimizations will be prohibited, which is detrimental to Execution performance will have a big impact.

5. The Second PHP Global Developers Conference (including PPT of the conference) Developer Headline Game Developer Wandoujia Development

8 recommended articles about JMM

Introduction: Developer, php: The 2nd PHP Global Developers Conference (including PPT of the conference): The PHP Global Developers Conference was held in Beijing from May 14th to 15th, 2016. More on-site pictures Please hit: http://t.cn/RqeP7y9, http://t.cn/RqD8Typ Finally, the PPT of this conference can be downloaded here: http://pan.baidu.com/s/1pLajmm3 If you If you have learned anything from reading this article, please give me a thumbs up. If there are any errors in the article, please point it out. Learn from each other and make progress together!

6. How to evaluate the 2nd PHP Global Developers Conference held by DevLink.cn in Beijing on May 14th and 15th, 2016?

Introduction: PPT download address: http://pan.baidu.com/s/1pLajmm3

##7. Oracle prompts error message ORA

Introduction: Oracle prompts error message ORA-28001: the password has expired Solution: 1. Log in with SYSDBA authority; 2. View account information : select username,account_status from dba_users 3. If the account is locked/expired, it must be unlocked first: alter user BJMMIS account unlock; and then change the password a

##8.

LJMM platform (Linux + Jexus+MySQL+mono) A brief summary of using MySQL on _MySQL

8 recommended articles about JMM

Introduction: LJMM platform (Linux +Jexus+MySQL+mono) A brief summary of using MySQL on

[Related Q&A recommendations]:

java - Why does JMM require ordinary Writing and volatile reading cannot be reordered?

jmm - How does java synchronize data to main memory?

java - What are the benefits of being familiar with JVM for programming? How to better understand JMM? What knowledge points need to be combined to understand, and what aspects of practice need to be done to deepen understanding?

java - When is it necessary to use multi-threaded programming?

The above is the detailed content of 8 recommended articles about JMM. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template