当前位置:网站首页>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 &#
边栏推荐
- MySQL -- index of MyISAM storage engine
- Little red book scheme jumps to the specified page
- 利用SecureCRTPortable远程连接虚拟机
- Turn -- use setjmp and longjmp in C language to realize exception capture and collaboration
- Delete AWS bound credit card account
- 104. SAP UI5 表格控件的支持复选(Multi-Select)以及如何用代码一次选中多个表格行项目
- 【扫盲】机器学习图像处理中的深层/浅层、局部/全局特征
- map容器
- 下班前几分钟,我弄清了v-model与.sync的区别
- There is no signal in HDMI in computer games caused by memory, so it crashes
猜你喜欢

internal field separator

"Trust machine" empowers development

MySQL中对于事务的理解

Intelligent computing architecture design of Internet

多图预警~ 华为 ECS 与 阿里云 ECS 对比实战

Turn -- go deep into Lua scripting language, so that you can thoroughly understand the debugging principle

Map container

正则系列之组和范围(Groups and Ranges)

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

Metauniverse may become a new direction of Internet development
随机推荐
Cutefishos system~
Reprint CSDN article operation
locust的使用
tcpdump命令使用详解
半监督学习之数据增强
Genicam gentl standard ver1.5 (4) Chapter 5 acquisition engine
[untitled]
Arlo's thinking after confusion
[image segmentation] 2021 segformer neurips
分享一个一年经历两次裁员的程序员的一些感触
Sogou wechat app reverse (II) so layer
【无标题】
激发新动能 多地发力数字经济
General use of qstringlist
twenty million two hundred and twenty thousand seven hundred and one
Happy number [fast and slow pointer of ring PROBLEMS]
倒置残差的理解
Réimpression de l'article csdn
MySQL -- index of MyISAM storage engine
使用 Three.js 实现'雪糕'地球,让地球也凉爽一夏