计算机研究与发展
計算機研究與髮展
계산궤연구여발전
JOURNAL OF COMPUTER RESEARCH AND DEVELOPMENT
2014年
8期
1748-1763
,共16页
王文文%武成岗%Paruj Ratanaworabhan%远翔%王振江%李建军%冯晓兵
王文文%武成崗%Paruj Ratanaworabhan%遠翔%王振江%李建軍%馮曉兵
왕문문%무성강%Paruj Ratanaworabhan%원상%왕진강%리건군%풍효병
非对称数据竞争%容忍和检测%写缓冲区%页保护%动态二进制插桩
非對稱數據競爭%容忍和檢測%寫緩遲區%頁保護%動態二進製插樁
비대칭수거경쟁%용인화검측%사완충구%혈보호%동태이진제삽장
asymmetric race%tolerating and detecting%write buffer%page protecting%dynamic binary instrumentation
非对称数据竞争是数据竞争中一种常见的类型.当一个线程在临界区内访问某个共享变量,另外一个线程在临界区外或不同的临界区内同时也访问这个共享变量时,就触发了非对称数据竞争.多线程程序中的非对称数据竞争往往是有害的.为了解决非对称数据竞争引入的问题,提出了ARace.它使用共享变量保护和写缓冲区来动态容忍和检测非对称数据竞争.其中,共享变量保护用于保护临界区内只读和先读后写的共享变量,防止这些变量在临界区外被修改;写缓冲区用于缓存临界区内对共享变量的写操作.ARace不仅可以容忍临界区内和临界区外之间的非对称数据竞争,还可以对并发临界区之间的非对称数据竞争进行检测.ARace既不依赖程序源代码和编译器的支持,也不依赖额外硬件的支持.此外,还提出了一种通过动态二进制插桩技术实现ARace的方法.实验结果表明,ARace在保证容忍和检测非对称数据竞争的同时,并未引入很大的性能开销和内存开销.
非對稱數據競爭是數據競爭中一種常見的類型.噹一箇線程在臨界區內訪問某箇共享變量,另外一箇線程在臨界區外或不同的臨界區內同時也訪問這箇共享變量時,就觸髮瞭非對稱數據競爭.多線程程序中的非對稱數據競爭往往是有害的.為瞭解決非對稱數據競爭引入的問題,提齣瞭ARace.它使用共享變量保護和寫緩遲區來動態容忍和檢測非對稱數據競爭.其中,共享變量保護用于保護臨界區內隻讀和先讀後寫的共享變量,防止這些變量在臨界區外被脩改;寫緩遲區用于緩存臨界區內對共享變量的寫操作.ARace不僅可以容忍臨界區內和臨界區外之間的非對稱數據競爭,還可以對併髮臨界區之間的非對稱數據競爭進行檢測.ARace既不依賴程序源代碼和編譯器的支持,也不依賴額外硬件的支持.此外,還提齣瞭一種通過動態二進製插樁技術實現ARace的方法.實驗結果錶明,ARace在保證容忍和檢測非對稱數據競爭的同時,併未引入很大的性能開銷和內存開銷.
비대칭수거경쟁시수거경쟁중일충상견적류형.당일개선정재림계구내방문모개공향변량,령외일개선정재림계구외혹불동적림계구내동시야방문저개공향변량시,취촉발료비대칭수거경쟁.다선정정서중적비대칭수거경쟁왕왕시유해적.위료해결비대칭수거경쟁인입적문제,제출료ARace.타사용공향변량보호화사완충구래동태용인화검측비대칭수거경쟁.기중,공향변량보호용우보호림계구내지독화선독후사적공향변량,방지저사변량재림계구외피수개;사완충구용우완존림계구내대공향변량적사조작.ARace불부가이용인림계구내화림계구외지간적비대칭수거경쟁,환가이대병발림계구지간적비대칭수거경쟁진행검측.ARace기불의뢰정서원대마화편역기적지지,야불의뢰액외경건적지지.차외,환제출료일충통과동태이진제삽장기술실현ARace적방법.실험결과표명,ARace재보증용인화검측비대칭수거경쟁적동시,병미인입흔대적성능개소화내존개소.