研究生: |
張智傑 Chang, Chih-Chieh |
---|---|
論文名稱: |
多核心虛擬化處理器上採用輔助執行緒的影子分頁 Helper Threaded Shadow Paging on Multi-Core Virtualization Processors |
指導教授: |
鍾葉青
Chung, Yeh-Ching |
口試委員: | |
學位類別: |
碩士 Master |
系所名稱: |
電機資訊學院 - 資訊工程學系 Computer Science |
論文出版年: | 2009 |
畢業學年度: | 97 |
語文別: | 英文 |
論文頁數: | 31 |
中文關鍵詞: | 輔助執行緒 、核心基礎虛擬機器 、多核心 、影子分頁 、虛擬機器 、虛擬化 |
外文關鍵詞: | helper thread, KVM, multi-core, shadow paging, virtual machine, virtualization |
相關次數: | 點閱:2 下載:0 |
分享至: |
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
虛擬化技術,是最近很熱門的議題,它讓一個作為宿主的實體機器上能夠運行客戶虛擬機器。核心基礎虛擬機器 (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.
[1] K. Adams, O. Agesen, “A Comparison of Software and Hardware Techniques for x86 Virtualization,” in Proc. 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’06), 2006, pp. 2-13.
[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.
[3] P. Barham, B. Dragovic, K. Fraser, S. Hand, T. Harris, A. Ho, R. Neugebauer, I. Pratt, A. Warfield, “Xen and the Art of Virtualization,” in Proc. 19th ACM Symposium on Operating Systems Principles (SOSP’03), 2003, pp. 164-177.
[4] F. Bellard, “QEMU, a Fast and Portable Dynamic Translator,” in Proc. 2005 USENIX Annual Technical Conference-FREENIX Track, 2005, pp. 41-46.
[5] D. P. Bovet, M. Cesati, “The Page Cache” in Understanding the Linux Kernel, 3rd ed.: O’Reilly, 2005, ch. 15, pp. 599-630.
[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.
[7] Y. Dong, S. Li, A. Mallick, J. Nakajima, K. Tian, X. Xu, F. Yang, W. Yu, “Extending Xen with Intel Virtualization Technology,” Intel Technology Journal, vol. 10, no. 3, pp. 193-203, Aug. 2006.
[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.
[10] A. Kivity, Y. Kamay, D. Laor, U. Lublin, A. Liguori, “kvm: the Linux Virtual Machine Monitor,” in Proc. 2007 Linux Symposium (OLS’07), 2007, vol. 1, pp. 225-230.
[11] S. Kumar, H. Raj, K. Schwan, I. Ganev, “Re-architecting VMMs for Multicore Systems: The Sidecore Approach,” in Proc. 2007 Workshop on the Interaction between Operating Systems and Computer Architecture (WIOSCA’07), 2007.
[12] J. Lu, A. Das, W. C. Hsu, K. Nguyen, S. G. Abraham, “Dynamic Helper Threaded Prefetching on the Sun UltraSPARC CMP Processor,” in Proc. 38th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO’05), 2005, pp. 93-104.
[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.
[14] M. Rosenblum, T. Garfinkel, “Virtual Machine Monitors: Current Technology and Future Trends,” IEEE Computer, vol. 38, no. 5, pp. 39-47, May. 2005.
[15] J. E. Smith, R. Nair, “System Virtual Machines,” in Virtual Machines: Versatile Platforms for Systems and Processes: Morgan Kaufmann, 2005, ch. 8, pp. 369-443.
[16] R. Uhlig, G. Neiger, D. Rodgers, A. L. Santoni, F. C.M. Martins, A. V. Anderson, S. M. Bennett, A. Kagi, F. H. Leung, L. Smith, “Intel Virtualization Technology,” IEEE Computer, vol. 38, no. 5, pp. 48-56, May. 2005.
[17] C. A. Waldspurger, “Memory Resource Management in VMware ESX Server,” in Proc. 5th Symposium on Operating Systems Design and Implementation (OSDI’02), 2002, pp. 181-194.
[18] X. Zhang, Y. Dong, “Optimizing Xen VMM Based on Intel Virtualization Technology,” in Proc. 2008 International Conference on Internet Computing in Science and Engineering (ICICSE’08), 2008, pp. 367-374.
[19] Linux Kernel Newbies, “Virtualization support through KVM,” in Linux 2.6.20, http://kernelnewbies.org/Linux_2_6_20.
[20] Qumranet Inc., “KVM - Kernel-based Virtual Machine,” KVM White Paper, http://www.qumranet.com/files/white_papers/KVM_Whitepaper.pdf.