当前位置:网站首页>[concurrent programming 049] talk about the classification of reordering?
[concurrent programming 049] talk about the classification of reordering?
2022-04-22 12:17:00 【Tanyue sword finger factory】
Talk about the classification of reordering ?
When executing the program , To improve performance , compiler (jvm Inside ) And the processor ( Operating system level ) Instructions are often reordered . rearrangement Sequential Division 3 species type .
1) Compiler optimized reordering . Compiler without changing the semantics of single thread program , You can rearrange the execution order of statements .
2) Instruction level parallel reordering . Modern processor adopts instruction level parallel technology (Instruction-Level Parallelism, ILP) To put multiple instructions Overlapping execution . If there is no data dependency , The processor can change the execution order of machine instructions corresponding to statements .
3) Reordering of memory system . Because the processor uses cache and read / Write buffer , This makes loading and storage operations appear to be out of order .
Aforementioned 1 Belongs to compiler reorder , 2 and 3 It belongs to processor reordering . These reordering can lead to multithreaded programs Memory visibility problem . For compilers , JMM The compiler reordering rule of prevents a specific type of compiler reordering ( Not all compiler reordering is prohibited ) .
Reorder for processor , JMM The processor reordering rules for require Java When the compiler generates a sequence of instructions , Insert a specific type of memory barrier (Memory Barriers, Intel be called Memory Fence) Instructions , Disable specific types of processor reordering through memory barrier instructions .
In a single threaded program , Reorder operations that have data dependencies , Does not change the execution result ( This is also as-if-serial Semantics allows control over existence Reasons for reordering dependent operations ) ; But in multithreaded programs , Operations that depend on the existence of control Reorder , May change the execution of the program fruit , Therefore, it must be controlled by certain synchronization means .
版权声明
本文为[Tanyue sword finger factory]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221215581269.html
边栏推荐
猜你喜欢
![[in depth understanding of tcallusdb technology] description of data interface for batch deletion of specified location in list - [list table]](/img/ed/cccd5dee09d2f0a3e6c788bd265b36.png)
[in depth understanding of tcallusdb technology] description of data interface for batch deletion of specified location in list - [list table]

Developer friendly public chain Neo | how to connect web2 developers to Web3 world

A note that allows you to capture the offer of a large factory. Come and get it quickly

离职的互联网人,都去哪儿了?

What happens when you run the NPM install command?

congratulations! You have been concerned about the official account for 1 years, and invite you to join NetEase data analysis training.
![[in depth understanding of tcallusdb technology] description of data interface of designated location in replacement list - [list table]](/img/ed/cccd5dee09d2f0a3e6c788bd265b36.png)
[in depth understanding of tcallusdb technology] description of data interface of designated location in replacement list - [list table]
![【深入理解TcaplusDB技术】更替列表指定位置数据接口说明——[List表]](/img/ed/cccd5dee09d2f0a3e6c788bd265b36.png)
【深入理解TcaplusDB技术】更替列表指定位置数据接口说明——[List表]

NFT、GameFi、SocialFi、云存储,DFINITY 生态上最热赛道详解

Ali's internship offer successfully landed, which is very important
随机推荐
可以测量50A以上电流的隔离集成式电流传感器CH704应用案例分享
百思买Best Buy 网站EDI 测试流程
Case 4-1.7: file transfer (concurrent search)
Electrician Lecture 2
A note that allows you to capture the offer of a large factory. Come and get it quickly
NLP dataset collation (updating)
nt10.0系统(server2016/2019)RuntimeBroker异常关机,关联事件ID 142/143/226/227/228等
手机摄像头芯片主要有哪些?
线程池大小的设置策略
低频(LF)RFID 智能终端
"Open source summer" activity is hot. In the registration, rich bonuses are waiting for you to get!
电工第一讲
MySQL之父:代码应该一次写成,而不是后面再改
In recent years, oppo, Xiaomi and other mobile phone manufacturers have begun to take the road of self-developed chips. Can this road run through?
Électricien deuxième Conférence
31. Create two identical objects
一种自动切换过流保护模块的热泵装置保护电路介绍(ACS758/CH704应用案例)
塔米狗项目解读|北京华隆典当有限责任公司49.5%股权转让
Oracle Data Guard和金仓KingbaseES集群的数据保护模式对比
CVPR2022 | 移动端手部三维重建