当前位置:网站首页>Instruction rearrangement concept
Instruction rearrangement concept
2022-06-24 19:32:00 【Jade label】
Instruction reordering means that the sequence of source code is different from that of program , Or the program sequence is inconsistent with the execution sequence , Reordering objects are instructions . Instruction reordering is a performance concern for the compiler , Without affecting the program ( Single threaded program ) Reorder under the condition of correctness . Instruction reordering is not inevitable , Reordering instructions can lead to thread safety problems . Instruction reordering is also called processor out of order execution , In this case, although the execution order of the instructions may not be completely in accordance with the program order , However, due to the submission of the execution result of the instruction ( To register and memory ), It's still in procedural order , Therefore, the instruction reordering of the processor will not affect the correctness of single thread . Instruction reordering does not affect the correctness of a single threaded program , But it may lead to unexpected results in multithreaded programs .
Guess execution can result in if The effect that the body of a statement is executed before its conditional statement .
Reordering is divided into instruction reordering ( compiler 、 processor ) And storage subsystem reorder ( Memory reordering , For cache , Write buffer )
Storage subsystem reordering : When the processor performs two memory access operations in strict program order , Under the action of the storage subsystem, the perceived order of these two operations by other processors may still be inconsistent with the program order , That is, the execution sequence of the two operations seems to have changed , This phenomenon is storage subsystem reordering . This is just a phenomenon, not an action , It does not really adjust the order of instruction execution , But it just causes a phenomenon that the execution order of instructions seems to have been adjusted , Its reorder object is the result of memory operation . Memory reordering can also cause thread safety problems , Like that one. s0 and s1 Write to write buffer , But the order changes ,P1 Did not read p2 The thread writes to the buffer , Reading is still old , Thread safety occurs It's all a problem .
Reordering is not disorderly, but has certain rules , Statements with data dependencies are not reordered , Only statements that do not have data dependencies are reordered . Seemingly serial , Only from a single thread point of view to ensure that the running results after reordering do not affect the correctness of the program , It does not guarantee the correctness of the program in a multithreaded environment .
边栏推荐
- Intel and Microsoft give full play to the potential energy of edge cloud collaboration to promote the large-scale deployment of AI
- 通过SCCM SQL生成计算机上一次登录用户账户报告
- 物联网?快来看 Arduino 上云啦
- 我链接mysql 报这个错 是啥意思呀?
- IBPS开源表单设计器有什么功能?
- 智能合约安全审计入门篇 —— delegatecall (2)
- What type of datetime in the CDC SQL table should be replaced
- Php OSS file read and write file, workerman Generate Temporary file and Output Browser Download
- System design idea of time traceability
- Experience of MDM master data project implementation for manufacturing projects
猜你喜欢

AI时代生物隐私如何保护?马德里自治大学最新《生物特征识别中的隐私增强技术》综述,全面详述生物隐私增强技术

The efficiency of okcc call center data operation

starring开发HttpJson接入点+数据库

Drawing DEM with GEE gracefully

Vs2017 add header file path method

微信小程序轮播图怎么自定义光标位置

three. Basic framework created by JS

How to protect biological privacy in the AI era? Overview of the latest "privacy enhancement technology in biometrics" of the Autonomous University of Madrid, comprehensively detailing the biometric p

Freeswitch uses origin to dialplan

Source code analysis of ArrayList
随机推荐
目前是不是只cdc 监控mysql 可以拿到新增列的数据 sqlserver不行是吧
AI时代生物隐私如何保护?马德里自治大学最新《生物特征识别中的隐私增强技术》综述,全面详述生物隐私增强技术
Sr-gnn shift robot gnns: overlapping the limitations of localized graph training data
怎么使用R包ggtreeExtra绘制进化树
Landcover100, planned land cover website
《Go题库·11》channel的应用场景
对国产数据库厂商提几个关于SQL引擎的小需求
小白请教下各位大佬,cdc抽取mysql binlog是严格顺序的吗
starring开发HttpJson接入点+数据库
一文详解|Go 分布式链路追踪实现原理
Kubernetes集群部署
华为机器学习服务语音识别功能,让应用绘“声”绘色
STM32 uses time delay to realize breathing lamp register version
Server lease error in Hong Kong may lead to serious consequences
Generate the last login user account report of the computer through SCCM SQL
The efficiency of okcc call center data operation
cdc+mysql connector从维表中join的日期时间字段会被+8:00,请问阿里云托管的
Fabric 账本数据块结构解析(一):如何解析账本中的智能合约交易数据
php OSS文件讀取和寫入文件,workerman生成臨時文件並輸出瀏覽器下載
Would you like to ask whether the same multiple tasks of the PgSQL CDC account will have an impact? I now have only one of the three tasks