Dynamically Tolerating and Detecting Asymmetric Races
-
摘要: 非对称数据竞争是数据竞争中一种常见的类型.当一个线程在临界区内访问某个共享变量,另外一个线程在临界区外或不同的临界区内同时也访问这个共享变量时,就触发了非对称数据竞争.多线程程序中的非对称数据竞争往往是有害的.为了解决非对称数据竞争引入的问题,提出了ARace.它使用共享变量保护和写缓冲区来动态容忍和检测非对称数据竞争.其中,共享变量保护用于保护临界区内只读和先读后写的共享变量,防止这些变量在临界区外被修改;写缓冲区用于缓存临界区内对共享变量的写操作.ARace不仅可以容忍临界区内和临界区外之间的非对称数据竞争,还可以对并发临界区之间的非对称数据竞争进行检测.ARace既不依赖程序源代码和编译器的支持,也不依赖额外硬件的支持.此外,还提出了一种通过动态二进制插桩技术实现ARace的方法.实验结果表明,ARace在保证容忍和检测非对称数据竞争的同时,并未引入很大的性能开销和内存开销.Abstract: Asymmetric races are a common type of data races. They are triggered when a thread accesses a shared variable in a critical section, and another thread accesses the same shared variable not in any critical section, or in a critical section guarded by a different lock. Asymmetric races in multi-threaded programs are usually harmful. To solve the problem introduced by asymmetric races, ARace is proposed. ARace utilizes shared variable protecting and write buffer to dynamically tolerate and detect asymmetric races. Shared variable protecting is used to protect shared variables that are read-only and read-before-write in critical sections, and these shared variables should not be modified out of critical sections; write buffer is used to buffer the writing operations to shared variables in critical sections. ARace can not only tolerate asymmetric races triggered by shared variable accesses in and out of critical sections, but also detect asymmetric races triggered by shared variable accesses in concurrent critical sections. ARace can be directly applied to binary code and requires neither additional compiler support nor hardware support. In addition, an implementation based on dynamic binary instrumentation is also proposed. The experimental results demonstrate that ARace guarantees the tolerance and detection of asymmetric races while incurring acceptable performance and memory overhead.
-
-
期刊类型引用(6)
1. 徐嘉振,何文雪,李浩然. 基于注意力时间卷积的运动想象脑电分类方法. 现代电子技术. 2024(18): 70-76 . 百度学术
2. 仝航,杨燕,江永全. 检测脑电癫痫的多头自注意力机制神经网络. 计算机科学与探索. 2023(02): 442-452 . 百度学术
3. 王昊 ,周建涛 ,郝昕毓 ,王飞宇 . 基于特征再抽象(FRA)的多元时序预测方法. 计算机科学. 2023(S2): 662-669 . 百度学术
4. 蔡霄仙,陈顺芝,王江辉,丁洋,费克玲. 基于多时窗共空间模式的HMM运动想象脑电识别. 计算机测量与控制. 2023(12): 277-283 . 百度学术
5. 许萌,王丹,李致远,陈远方. IncepA-EEGNet:融合Inception网络和注意力机制的P300信号检测方法. 浙江大学学报(工学版). 2022(04): 745-753+782 . 百度学术
6. 张远鹏,蔡可夫,姚敏,姚登福,王理. 基于深度堆叠式稀疏回归的癫痫患者脑电信号特征选择. 南通大学学报(医学版). 2021(03): 212-216 . 百度学术
其他类型引用(15)
计量
- 文章访问数: 1072
- HTML全文浏览量: 1
- PDF下载量: 490
- 被引次数: 21