当前位置:网站首页>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 &#
边栏推荐
- rxjs Observable of 操作符的单步调试分析
- Turn -- the underlying debugging principle of GDB is so simple
- 14年本科毕业,3个月转行软件测试月薪13.5k,32的岁我终于找对了方向
- Single step debugging analysis of rxjs observable of operator
- leetcode - 287. Find duplicates
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
- Favorite transaction code management tool in SAP GUI
- 思科考试--冗余网络
- [target tracking] | single target tracking indicator
- MySQL view exercise
猜你喜欢

104. SAP UI5 表格控件的支持复选(Multi-Select)以及如何用代码一次选中多个表格行项目

Appium automated testing foundation - Supplement: introduction to desired capabilities parameters

切面条 C语言

Appium自动化测试基础 — 补充:Desired Capabilities参数介绍

el-input文本域字数限制,超过显示变红并禁止输入

Metauniverse may become a new direction of Internet development

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

轉載csdn文章操作

MySQL5.7 设置密码策略(等保三级密码改造)

Explain kubernetes network model in detail
随机推荐
nn. Parameter] pytoch feature fusion adaptive weight setting (learnable weight use)
Mysql database detailed learning tutorial
Reprint CSDN article operation
A few minutes before work, I found out V-model and The difference between sync
台积电全球员工薪酬中位数约46万,CEO约899万;苹果上调日本的 iPhone 售价 ;Vim 9.0 发布|极客头条
Use three JS realize the 'ice cream' earth, and let the earth cool for a summer
激发新动能 多地发力数字经济
Congratulations on the release of friends' new book (send welfare)
下班前几分钟,我弄清了v-model与.sync的区别
twenty million two hundred and twenty thousand seven hundred and one
Digital currency: far-reaching innovation
Unable to climb hill sort, directly insert sort
Pytorch's code for visualizing feature maps after training its own network
What class loading mechanisms does the JVM have?
Chen Tianqi's machine learning compilation course (free)
Awoo's favorite problem (priority queue)
Understanding of inverted residuals
效率提升 - 鼓捣个性化容器开发环境
思科考试--冗余网络
[untitled]