近年來,隨著虛擬化技術的快速發展,打破了傳統上一台主機搭配一個應用程式的做法。虛擬機器(Virtual Machine,VM)的資源管理已成為相當重要的議題,而虛擬機器在實體主機中的工作排程更是會直接影響到整個系統的工作通量進而影響到整體的系統效能。 依據Xen Credit scheduler,CPU排程器將虛擬CPU(VCPU)非同步地分配至實體CPU(PCPU)上執行並藉此增加工作通量。但是對於並行工作負載而言,此方式將會造成可觀之CPU時間浪費。本論文提出解決方案並修改Credit scheduler排程演算法,藉由增加優先權TURBO的方式,避免已決定之工作排程因負載平衡機制或剛醒來之VCPU插隊而影響排程。藉此需要同步之VCPU將會於下一個時間片段被選中並執行,不但避免影響系統之公平性,在同步並行程式執行緒的同時也大大地提升了在並行程式之執行效能。
In recent years, with the rapid development of virtualization technology, the traditional of one application on one physical machine has broken. Virtual Machine (VM) management has become a very important issue, and the scheduling of virtual machines on a physical host machine is crucial for the throughput of a system and thus affects the overall system performance. According to the Xen Credit Scheduler, each virtual CPU (VCPU) is asynchronously assigned to a physical CPU (PCPU) in order to maximize the throughput. But it will result in considerable waste of CPU time for concurrent workloads. In this paper, a solution is proposed for the synchronization problem. By modifying the Xen Credit Scheduler, a new priority TURBO is added to the proposed scheduler to avoid the scheduling decisions that was made for synchronization to be modified by awaking VCPUs or the load balancing algorithm. This allows need-to-sync VCPUs to preempt and being picked up to run at the next time slice without impacting overall system fairness; hence the threads in the concurrent program can be synchronized and greatly enhances the performance in concurrent workload.