標題: 針對多執行緒並共享Code Cache的動態二元碼轉換器
Dynamic Binary Translation for Multi-Threaded Programs with Shared Code Cache
作者: 劉家倫
Liu, Chia-Lun
楊武
Yang, Wuu
資訊科學與工程研究所
關鍵字: 動態二元碼轉換器;平行模擬;動態優化;多執行緒;Dynamic binary translation;Parallel emulation;Dynamic optimization;Threads
公開日期: 2012
摘要: 我們在既有的一個二元碼轉換器平台(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.
URI: http://140.113.39.130/cdrfb3/record/nctu/#GT070056026
http://hdl.handle.net/11536/71514
Appears in Collections:Thesis


Files in This Item:

  1. 602601.pdf