当前位置:网站首页>Explain JMM in detail
Explain JMM in detail
2022-07-01 22:55:00 【Keyboard singer】
One 、 Computer hardware storage system
CPU Run is not a direct operation of memory, but first read the data in memory to the cache , And memory read and write operations will cause inconsistencies .JVM An attempt was made in the specification to define a Java Memory model (java Memory Model, abbreviation JMM) To screen out the memory access differences between various hardware and operating systems , In order to make Java The program can achieve consistent memory access effect under various platforms .

Two 、 brief introduction
1.JMM brief introduction
JMM(Java Memory model Java Memory Model, abbreviation JMM) It is an abstract concept and does not really exist. It only describes a set of conventions or specifications , Through this set of specifications, the... In the program is defined ( Especially multithreading ) The read-write access mode of each variable and determines when and how a thread's writing to a shared variable becomes visible to another thread , The key technical points are around the atomicity of multithreading 、 Visibility and order unfold .
principle :JMM The key technology points are all around the atomicity of multithreading 、 Visibility and order unfold . It works as follows :
1. adopt JMM To realize the abstract relationship between thread and main memory .
2. Shield the memory access differences of various hardware platforms and operating systems to achieve Java The program can achieve consistent memory access effect under various platforms .
2. The concept of cache rows
A multi-core cpu Each core of has its own L2 cache , All cores share a L3 cache . When the data in the main memory is written to the cache , It will also write in the nearby data by the way . This write range is called a cache row ( size 64 byte &#
边栏推荐
- tcpdump命令使用详解
- Flink SQL command line connection yarn
- SAP GUI 里的收藏夹事务码管理工具
- Two schemes of transforming the heat map of human posture estimation into coordinate points
- Mixconv code
- Lc669. Prune binary search tree
- 友善串口助手使用教程_友善串口调试助手怎么进行配置-友善串口调试助手使用教程…
- 陈天奇的机器学习编译课(免费)
- The principle, testing and Countermeasures of malicious software reverse closing EDR
- 正则系列之量词(Quantifiers)
猜你喜欢

leetcode - 287. Find duplicates

Turn -- use setjmp and longjmp in C language to realize exception capture and collaboration

Hide the creation and use of users

Map container

vSphere+、vSAN+来了!VMware 混合云聚焦:原生、快速迁移、混合负载

切面条 C语言

轉載csdn文章操作

死锁的处理策略—预防死锁、避免死锁、检测和解除死锁

正则系列之量词(Quantifiers)

Réimpression de l'article csdn
随机推荐
Deep learning -- data operation
Understanding of transactions in MySQL
Turn -- the underlying debugging principle of GDB is so simple
Detailed explanation of common configurations in redis configuration file [easy to understand]
SAP 智能机器人流程自动化(iRPA)解决方案分享
General use of qstringlist
Kubernetes create service access pod
rxjs Observable of 操作符的单步调试分析
SAP GUI 里的收藏夹事务码管理工具
Cutefishos system~
El input text field word limit, beyond which the display turns red and input is prohibited
Rust language - Introduction to Xiaobai 05
Talk about what parameters ZABBIX monitors
Resttemplate remote call tool class
元宇宙可能成为互联网发展的新方向
Happy number [fast and slow pointer of ring PROBLEMS]
Congratulations on the release of friends' new book (send welfare)
[jetcache] how to use jetcache
Mysql5.7 set password policy (etc. three-level password transformation)
[C language] detailed explanation of malloc function [easy to understand]