指導教授:洪士灝臺灣大學:資訊工程學研究所張哲瑋Chang, Che-WeiChe-WeiChang2014-11-262018-07-052014-11-262018-07-052014http://ntur.lib.ntu.edu.tw//handle/246246/261495為了提高系統效能,現今的電腦系統結合了多核心的中央處理單元(CPU)和多重的硬體加速處理器(Accelerator)來更有效率的執行應用程式,此為異質性系統運算。為了更進一步的提升異質性系統運算的效能,HSA基金會提出了一個新架構名為異質系統架構(Heterogeneous System Architecture,HSA),意在提升異質系統的效能。為了更加有效利用此一架構,我們嘗試將其虛擬化,若有了虛擬化技術,可以使其不管是在效能或是安全上都能有所提升。 為此在本篇論文中,我們為HSA提出了一個系統虛擬化的架構。基於此架構下,我們提出了數個圖形運算單元(GPU)的排程方法以有效使用GPU去提升系統虛擬化效能。另外,我們實作了GPU的環境切換(context switch),並將其運用在GPU的排程中,嘗試更進一步提升GPU效能。最後,我們也實作了一個圖形運算單元的時間計算基準,以檢測排程優劣。 實驗結果得知,在有context switch的功能下,GPU的排程效率較佳,對於系統虛擬化的GPU效能亦能有所提升。Heterogeneous computing has been proposed to incorporate specialized processing capabilities (e.g. GPU, DSP and FPGA) in order to handle particular tasks. However, there are some drawbacks of current heterogeneous computing. In order to improve the performance, HSA foundation proposed the Heterogeneous System Architecture (HSA). In this thesis work, we investigate on the techniques for virtualizing an HSA platform to support various types of usages with virtual machines. We first delivered a system that emulates system virtualization of HSA. Second, we proposed some GPU scheduling policies of HSA to utilize the GPU. Third, we implement the GPU context switch and apply to scheduling policies. Finally, We designed a simple timing model to evaluate GPU scheduling policies. Experimental results show that GPU scheduling polices with context switch are important, and better policies increase the performance of GPU for HSA virtualizaion.Acknowledgments i 中文摘要 ii Abstract iii 1 Introduction 1 1.1 Motivations 1 1.2 Thesis Organization 4 2 Background and Related Work 5 2.1 Heterogeneous Programming Frameworks 5 2.2 Heterogeneous System Architecture (HSA) 5 2.3 HSAemu 6 2.3.1 Modules of HSAemu 6 2.3.2 Execution Flow of HSAemu 8 3 Framework and Implementation 10 3.1 System Virtualization of HSA 11 3.1.1 HSAemu on HSAemu 12 3.1.2 Sending Software Interrupt Instructions in x86 Platforms 13 3.1.3 Pass AQL Packets from Guest HSAemu to Host HSAemu 14 3.2 GPU Scheduling 15 3.2.1 Baseline 15 3.2.2 Multi-Queue 16 3.2.3 CU Groups 16 3.2.4 Hybrid (CU Groups + Multi-Queue) 17 3.2.5 Design issues 18 3.3 GPU Context Switch 18 3.3.1 Simulation Flow of FastSim 18 3.3.2 Simulation Flow of FastSim with Context Switch 19 3.3.3 Preserve the State of FastSim 20 3.3.4 Scheduling Policy with Context Switch 22 3.4 Timing Model 22 4 Experimental Results 25 4.1 Experimental Setup 25 4.2 System Virtualization of HSA 26 4.2.1 Emulation Throughput 26 4.3 GPU Scheduling Policy 27 4.3.1 Waiting Time 28 4.3.2 Throughput 33 4.3.3 Turnaround Time 34 4.3.4 Summary 36 5 Conclusion and Future Work 37 Bibliography 394977923 bytesapplication/pdf論文公開時間:2016/08/25論文使用權限:同意有償授權(權利金給回饋本人)異質系統架構虛擬化虛擬機器圖形運算單元排程異質系統架構之系統虛擬化及圖形運算單元排程HSA System Virtualization and GPU Schedulingthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/261495/1/ntu-103-P99922003-1.pdf