| 研究生: |
梁穎睿 Ying-Ruei Liang |
|---|---|
| 論文名稱: | implement race detection functionality inXThreadDebugger base on pluggable modulesystem |
| 指導教授: | 鄭永斌 |
| 口試委員: | |
| 學位類別: |
碩士 Master |
| 系所名稱: |
資訊電機學院 - 資訊工程學系 Department of Computer Science & Information Engineering |
| 論文出版年: | 2018 |
| 畢業學年度: | 106 |
| 語文別: | 中文 |
| 論文頁數: | 65 |
| 中文關鍵詞: | 並行 、資料競爭 |
| 外文關鍵詞: | concurrency, data race |
| 相關次數: | 點閱:9 下載:0 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
“Multithreading Is Today's GOTO” - Jos de Jong 2013
隨著硬體以及軟體架構的發展,加上人們對於效能的需求,多執行緒或是所謂的並行程式
已經成為一種無可避免的趨勢,無論是遊戲,伺服器甚至是手機端程式,都對 CPU 效能有所
需求。但是程式語言的發展是早於多執行緒的概念的,既有的程式語言多半是增加了對多執行
緒能力的支援,卻無法避免掉它們帶來的錯誤,舉凡最簡單的 data race 到複雜難以發現
的 atomic variable memory ordering 導致的錯誤,這些問題在根本上需要相對應的
知識才得以避免,也需要等值的經驗才有辦法除錯,也就是說,處理多執行緒程式是一件難事,
不論使用的語言為何。
是的,除錯很難,除多執行緒程式的錯更是難上加難,為了輔助既有程式語言以及對多執
行緒程式的除錯,開發者需要仰賴工具來協助它們,而當中的其中一個幫手便是 data race
detector。
本 研 究 提 出 了 一 個 建 立 在 實 驗 室 專 案 , XThreadDebugger , 上 的 dynamic race
detector。藉由搭配 XThreadDebugger 提供的 exhaustive testing,來對待測程式
進行更高覆蓋率的測試,藉此偵測更多的 data race,作為一個對過去 race detector
的新嘗試。實作方面,XThreadDebugger 使用中斷點來對程式碼進行 interleaving 的
控制,本研究也將善用這點,在動態時期針對真正有被共享的變數去進行監控,藉此達到偵測
data race 的功能,同時減少不必要的效能開銷。而在架構方面,本研究則提出了 Module
層的概念,提供 XThreadDebugger 未來開發者一個適合且低成本的框架,以便未來開發之
需求,我們所提出的 data race detector 便是在該框架下建構的。
“Multithreading Is Today's GOTO” - Jos de Jong 2013
Concurrency programming paradigm is the trend, not only because
people's need for performance, but the evolution of hardware as well.
From video games industry, server to even mobile application, they
all benefit from it. But the history of programming language is
earlier than the concept of parallel programming. Even thought most
of language got the ability to write parallel code, it’s still hard
to avoid the complexity. To solve them the developers require certain
knowledge and experience. In the other word, dealing with parallel
program is tough no mater which language you use.
Debugging is hard, debugging parallel program is even harder. To
assist the debugging process developers need tools. Race detector is
one of them.
This research proposes a dynamic race detector which builds on
XThreadDebugger, a tool to help developers debugging thread related
problem which was developed by our lab. Combine with the “exhaustive
testing” ability from XThreadDebugger, we expect to run tests with
higher testing coverage and capture more data race at run time.
[1] “Servo,” Mozilla foundation, [Online]. Available: https://servo.org/.
[Accessed 4 7 2018].
[2] “Roslyn,” Microsoft Corporation, [Online]. https://github.com/dotnet/
roslyn. [Accessed 4 7 2018].
[3] Gu, Rui, et al. "What change history tells us about thread
synchronization." Proceedings of the 2015 10th Joint Meeting on
Foundations of Software Engineering. ACM, 2015
[4] “rr,” Mozilla foundation. [Online]. Available: https://rr-project.org/.
[Accessed 4 7 2018].
[5] Nethercote, Nicholas, and Julian Seward. "Valgrind: a framework for
heavyweight dynamic binary instrumentation." ACM Sigplan notices.
Vol. 42. No. 6. ACM, 2007.
[6] “Helgrind,” Valgrind developers, [Online]. Available:
http://valgrind.org/docs/manual/hg-manual.html. [Accessed 4 7
2018].
[7] “DRD,” Valgrind developers, [Online]. Available:
http://valgrind.org/docs/manual/drd-manual.html. [Accessed 4 7
2018].
[8] “Clang ThreadSanitizer,” LLVM foundation, [Online]. Available:
https://clang.llvm.org/docs/ThreadSanitizer.html. [Accessed 4 7 2018].
[9] “Clang Thread Safety Analysis,” LLVM foundation, [Online]. Available:
https://clang.llvm.org/docs/ThreadSafetyAnalysis.html. [Accessed 4 7
2018].
[10] “RacerD,” Facebook Inc, [Online]. Available: http://fbinfer.com/docs/
racerd.html. [Accessed 4 7 2018].
[11] Boyapati, Chandrasekhar, Robert Lee, and Martin Rinard. "Ownership
types for safe programming: Preventing data races and deadlocks."
ACM Sigplan Notices. Vol. 37. No. 11. ACM, 2002.
[12] “Rust programming language,” Mozilla foundation, [Online].
Available: https://www.rust-lang.org. [Accessed 4 7 2018].
[13] Musuvathi, Madanlal, and Shaz Qadeer. "Iterative context bounding
for systematic testing of multithreaded programs." ACM Sigplan
Notices. Vol. 42. No. 6. ACM, 2007.
[14] Netzer, Robert HB, and Barton P. Miller. On the complexity of event
ordering for shared-memory parallel program executions. University
of Wisconsin-Madison, Computer Sciences Department, 1990.
[15] Netzer, Robert HB, and Barton P. Miller. "What are race conditions?:
Some issues and formalizations." ACM Letters on Programming
Languages and Systems (LOPLAS) 1.1 (1992): 74-88.
[16] Pozniansky, Eli, and Assaf Schuster. Efficient on-the-fly data race
detection in multithreaded C++ programs. Vol. 38. No. 10. ACM, 2003.
[17] Savage, Stefan, et al. "Eraser: A dynamic data race detector for
multithreaded programs." ACM Transactions on Computer Systems
(TOCS) 15.4 (1997): 391-411.
[18] Itzkovitz, Ayal, Assaf Schuster, and Oren Zeev-Ben-Mordehai. "Toward
integration of data race detection in DSM systems." Journal of Parallel
and Distributed Computing 59.2 (1999): 180-203.
[19] Mattern, Friedemann. "Virtual time and global states of distributed
systems." Parallel and Distributed Algorithms 1.23 (1989): 215-226.
[20] Flanagan, Cormac, and Stephen N. Freund. "FastTrack: efficient and
precise dynamic race detection." ACM Sigplan Notices. Vol. 44. No. 6.
ACM, 2009.