Home Java javaTutorial 8 recommended articles about JMM

8 recommended articles about JMM

Jun 12, 2017 pm 01:29 PM

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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1654
14
PHP Tutorial
1252
29
C# Tutorial
1225
24
Is the company's security software causing the application to fail to run? How to troubleshoot and solve it? Is the company's security software causing the application to fail to run? How to troubleshoot and solve it? Apr 19, 2025 pm 04:51 PM

Troubleshooting and solutions to the company's security software that causes some applications to not function properly. Many companies will deploy security software in order to ensure internal network security. ...

How do I convert names to numbers to implement sorting and maintain consistency in groups? How do I convert names to numbers to implement sorting and maintain consistency in groups? Apr 19, 2025 pm 11:30 PM

Solutions to convert names to numbers to implement sorting In many application scenarios, users may need to sort in groups, especially in one...

How to elegantly obtain entity class variable names to build database query conditions? How to elegantly obtain entity class variable names to build database query conditions? Apr 19, 2025 pm 11:42 PM

When using MyBatis-Plus or other ORM frameworks for database operations, it is often necessary to construct query conditions based on the attribute name of the entity class. If you manually every time...

How to simplify field mapping issues in system docking using MapStruct? How to simplify field mapping issues in system docking using MapStruct? Apr 19, 2025 pm 06:21 PM

Field mapping processing in system docking often encounters a difficult problem when performing system docking: how to effectively map the interface fields of system A...

How does IntelliJ IDEA identify the port number of a Spring Boot project without outputting a log? How does IntelliJ IDEA identify the port number of a Spring Boot project without outputting a log? Apr 19, 2025 pm 11:45 PM

Start Spring using IntelliJIDEAUltimate version...

How to safely convert Java objects to arrays? How to safely convert Java objects to arrays? Apr 19, 2025 pm 11:33 PM

Conversion of Java Objects and Arrays: In-depth discussion of the risks and correct methods of cast type conversion Many Java beginners will encounter the conversion of an object into an array...

E-commerce platform SKU and SPU database design: How to take into account both user-defined attributes and attributeless products? E-commerce platform SKU and SPU database design: How to take into account both user-defined attributes and attributeless products? Apr 19, 2025 pm 11:27 PM

Detailed explanation of the design of SKU and SPU tables on e-commerce platforms This article will discuss the database design issues of SKU and SPU in e-commerce platforms, especially how to deal with user-defined sales...

How to use the Redis cache solution to efficiently realize the requirements of product ranking list? How to use the Redis cache solution to efficiently realize the requirements of product ranking list? Apr 19, 2025 pm 11:36 PM

How does the Redis caching solution realize the requirements of product ranking list? During the development process, we often need to deal with the requirements of rankings, such as displaying a...

See all articles