摘要
多线程并行是减少程序耗时的一种常用方法,但多线程使用不慎,会带来诸多问题。为了优化线程耗时对程序时序的影响,以半导体设备软件为例,结合多线程并行中遇到的线程异常结束情况,从结果找原因,并进行验证,确定线程启动的合理顺序,解决了多线程并行时出现的时序紊乱等线程安全问题。
Multithreading parallelism is a common method to reduce the time overhead of programs.However,careless use of multithreading will bring many problems.In order to optimize the impact of thread time overhead on program sequence,takes semiconductor device software as an example,and combining the thread abnormal termination encountered in multi-threaded parallel,to find the cause from the result,and performing causal verification.Finally,the reasonable sequence of thread startup is given to solve the thread safety problems such as timing disorder when multiple threads are parallel.
作者
高荣荣
张叶
郑佳晶
付纯鹤
GAO Rongrong;ZHANG Ye;ZHENG Jiajing;FU Chunhe(The 45th Research Institute of CETC,Beijing 065201,China)
出处
《电子工业专用设备》
2022年第4期69-72,共4页
Equipment for Electronic Products Manufacturing