当前位置:网站首页>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 &#
边栏推荐
- Origin2018 installation tutorial "recommended collection"
- ECMAScript 2022 was officially released. Have you heard about it?
- Pytorch nn.functional.unfold()的简单理解与用法
- Demo program implementation of QT version Huarui camera
- The median salary of TSMC's global employees is about 460000, and the CEO is about 8.99 million; Apple raised the price of iPhone in Japan; VIM 9.0 release | geek headlines
- 2020-ViT ICLR
- Fiori applications are shared through the enhancement of adaptation project
- A few minutes before work, I found out V-model and The difference between sync
- 转--利用C语言中的setjmp和longjmp,来实现异常捕获和协程
- Genicam gentl standard ver1.5 (4) Chapter 5 acquisition engine
猜你喜欢
Appium自动化测试基础 — APPium安装(一)
Metauniverse may become a new direction of Internet development
Vsphere+ and vsan+ are coming! VMware hybrid cloud focus: native, fast migration, mixed load
Multi picture alert ~ comparison of Huawei ECs and Alibaba cloud ECS
Kubernetes create service access pod
Intelligent computing architecture design of Internet
Delete AWS bound credit card account
Congratulations on the release of friends' new book (send welfare)
转--原来gdb的底层调试原理这么简单
vSphere+、vSAN+来了!VMware 混合云聚焦:原生、快速迁移、混合负载
随机推荐
Tourism Management System
Origin2018 installation tutorial "recommended collection"
Turn -- the underlying debugging principle of GDB is so simple
每日刷题记录 (十)
FFMpeg学习笔记
Reprint CSDN article operation
ECMAScript 2022 was officially released. Have you heard about it?
MySQL5.7 设置密码策略(等保三级密码改造)
今日睡眠质量记录71分
Origin2018安装教程「建议收藏」
Explain kubernetes network model in detail
Ffmpeg learning notes
Efficiency improvement - encourage personalized container development environment
internal field separator
QStringList 的常规使用
多图预警~ 华为 ECS 与 阿里云 ECS 对比实战
转--深入LUA脚本语言,让你彻底明白调试原理
Preparation of functional test report
Single step debugging analysis of rxjs observable of operator
mixconv代码