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

多核心虛擬化處理器上採用輔助執行緒的影子分頁

Helper Threaded Shadow Paging on Multi-Core Virtualization Processors

指導教授 : 鍾葉青
若您是本文的作者,可授權文章由華藝線上圖書館中協助推廣。

摘要


虛擬化技術,是最近很熱門的議題,它讓一個作為宿主的實體機器上能夠運行客戶虛擬機器。核心基礎虛擬機器 (KVM) 是為 Linux 所設計的虛擬化解決方案。藉由提供中央處理器、記憶體以及輸入輸出設備的虛擬化能力,KVM 可以使 Linux 轉變成超級監督者,在多核心虛擬化處理器上運行客戶虛擬機器。在這篇論文中,我們專注在 KVM 所使用的實現記憶體虛擬化的一個普遍機制叫做影子分頁。在這個機制裡面,客戶作業系統維護分頁表如同在實體機器上執行一般,但是硬體實際上存取的卻是影子分頁表,並且這個影子分頁表是透過許多的分頁錯誤來和客戶虛擬機器裡面的分頁表作同步。因為分頁錯誤是很昂貴的操作,我們為了要減少分頁錯誤的數目,因此我們提出一個採用輔助執行緒的影子分頁技術。在這個技術裡,我們引入了一個影子分頁輔助執行緒 (SPHT) 到 KVM 裡面來,並且使用一個啟發式的演算法去預先建置好影子分頁表。使用 SPHT 的目的,在於避免客戶虛擬機器因為分頁錯誤而切換到超級監督者去處理分頁錯誤。採用輔助執行緒的影子分頁技術已經被一個知名的基準測試程式 Kernel Build 所衡量過,實驗結果顯示當運用了輔助執行緒的影子分頁技術後,客戶虛擬機器的效能最多能夠好上 35%。

並列摘要


Virtualization, which means running guest virtual machines on a host physical machine, recently becomes a hot topic. The kernel-based virtual machine (KVM) is a virtualization solution for Linux. By providing the CPU, memory and I/O virtualization capabilities, KVM makes Linux be able to act as a hypervisor to host guest virtual machines on multi-core virtualization processors. In this thesis, we focus on the memory virtualization in KVM using a general mechanism called shadow paging. In this mechanism, the guest operating system maintains page tables as usual, but the hardware actually accesses the shadow page tables synchronized with the page tables in the guest virtual machine through a great number of page faults. Since the page fault is an expensive operation, to reduce the number of page faults, we propose a helper threaded shadow paging technique that introduces a shadow paging helper thread (SPHT) into KVM and uses a heuristic algorithm to pre-build shadow page tables. The purpose of SPHT is to avoid the guest virtual machine switching to the hypervisor due to the page faults. The helper threaded shadow paging technique is evaluated by a well-known Kernel Build benchmark. The experimental results show that the guest virtual machine performance can be up to 35% better when the helper threaded shadow paging technique is applied.

參考文獻


[2] P. Apparao, R. Iyer, X. Zhang, D. Newell, T. Adelmeyer, “Characterization & Analysis of a Server Consolidation Benchmark,” in Proc. 4th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE’08), 2008, pp. 21-29.
[6] E. Bugnion, S. Devine, K. Govil, M. Rosenblum, “Disco: Running Commodity Operating Systems on Scalable Multiprocessors,” ACM Transactions on Computer Systems, vol. 15, no. 4, pp. 412-447, Nov. 1997.
[8] U. Drepper, “The Cost of Virtualization,” ACM Queue, vol. 6, no. 1, pp. 28-35, Jan./Feb. 2008.
[9] T. Garfinkel, K. Adams, A. Warfield, J. Franklin, “Compatibility is Not Transparency: VMM Detection Myths and Realities,” in Proc. 11th Workshop on Hot Topics in Operating Systems (HotOS-XI), 2007.
[13] G. Neiger, A. Santoni, F. Leung, D. Rodgers, R. Uhlig, “Intel Virtualization Technology: Hardware Support for Efficient Processor Virtualization,” Intel Technology Journal, vol. 10, no. 3, pp. 167-177, Aug. 2006.

延伸閱讀