透過您的圖書館登入
IP:13.59.218.147
  • 學位論文

針對多執行緒並共享Code Cache的動態二元碼轉換器

Dynamic Binary Translation for Multi-Threaded Programs with Shared Code Cache

指導教授 : 楊武

摘要


我們在既有的一個二元碼轉換器平台(mc2llvm)上增加了可以模擬多執行緒程式的功能並且是以共享指令快取(Shared Code Cache) 為基礎。模擬多執行緒的程式有兩個重要的議題:(1)要清楚每個執行緒是如何在程式執行時產生或結束以及它的記憶體是如何配置的。(2)有效率的模擬,除了程式本身,模擬器也因為模擬多執行緒而會有同步的需求,這會讓模擬變得沒有效率。我們藉由(1) 減少lock/unlock pair 的區間(2)使用concurrent 資料結構(3)使用執行緒獨有的記憶體減少同步所帶來負擔。目前機器大部分是多核心的,我們利用機器空閒的核心產生 trace來達到加速。在我們的實驗裡,我們跑需要 8 個threads的程式可以比 QEMU快8.8X。

並列摘要


We present a process-level ARM-to-x86/64 dynamic binary translator which can efficiently emulate multi-threaded binaries based on mc2llvm. The difficulty of translating multi-threaded binaries is the synchronization overhead incurred by the translator, which has a great impact on the performance. We find the performance bottleneck of the synchronization and solve it by (1) shortening the lock section as we can (2) using the concurrent data structure (3) using the thread-private memory. In addition, we add trace compilation in mc2llvm to speed up the emulation. Code generation of traces is done by specific threads in our system. In our experiment, our system is faster than QEMU by 8.8X when emulating benchmarks with 8 guest threads.

參考文獻


[18] Nicholas Nethercote, Julian Seward, Valgrind: A Framework for Heavy-
[2] Zhaoguo Wang, Ran Liu, Yufei Chen, Xi Wu, Haibo Chen, Weihua Zhang,
[19] Mathias Payer, Thomas R. Gross, Fine-Grained User-Space Security
[3] Derek Bruening, Vladimir Kiriansky, Timothy Garnett, and Sanjeev
[8] Swaroop Sridhar, Jonathan S. Shapiro, Eric Northup, Prashanth P. Bun-

延伸閱讀