节点文献

基于多核的虚拟化技术研究

A Study of Multicore-Based Virtualization Technique

【作者】 马汝辉

【导师】 管海兵;

【作者基本信息】 上海交通大学 , 计算机科学与技术, 2011, 博士

【摘要】 近年来,计算机硬件技术相对于落后软件计算模式的快速发展、大量信息资源的可控管理、服务器整合的需求,以及最近云计算模式的推出,使得虚拟化技术成为近来研究热点之一。虚拟化技术主要是通过软硬件技术方式,将底层的计算资源或者化分为多个运行环境,或者整合成单个运行环境,从而满足对各种应用的要求。虚拟化技术在很多重要领域都具有很高的实用价值,如集成服务,内核的开发,内核的调试,安全计算,多系统并行计算,系统迁移等。另外,Intel、AMD等公司的硬件辅助虚拟化技术弥补了软件虚拟化技术性能降低较大的缺陷,进一步促进了虚拟化技术的发展。多核技术的出现给虚拟化技术的发展带来了机遇。多核处理器的存在,虚拟化的实现方式将更会变得相对容易,因为每个内核都可以运行不同的进程。然而虚拟化不仅仅是每个内核一个虚拟服务器,而是每个内核可同时运行多个虚拟机。多核虚拟化技术的集中化计算、动态分配资源、充分利用系统资源等等优势,都可以让企业和普通用户用较少的硬件来完成较多的工作,并且获得更优的性能。本文就是结合多核思想进一步优化虚拟化技术,针对这一问题,具体的研究工作如下:1.分别定性和定量分析了动态二进制翻译系统的各个执行开销,根据分析结果,利用多核技术将翻译部分、执行部分和优化部分分别线程化。另外,本文提出了基于动态工作集变迁的Code Cache替换策略,同前人研究相比,该策略更加符合程序的行为,反映了程序的局部性特性。2.提出了基于翻译、执行部分与优化部分的多线程版本的动态二进制翻译系统(MTCrossBit)。在该系统中,引入新的超级块生成线程(优化线程),并利用多核处理器的优势和多线程执行的优点获得性能加速。为了解决线程间通信问题,提出了一种无锁机制的通信机制(ASLC),避免了加解锁算法的控制,防止出现盲等待现象;还提出了各线程间私有Code Cache的策略,防止了各线程间彼此污染Code Cache,达到多线程系统的高度并行性。3.提出了基于翻译、优化部分与执行部分的多线程的动态二进制翻译系统(MTEE CrossBit)。在该系统中,根据执行部分需求,将翻译部分和超级块优化部分线程化,增加翻译线程,实现并行翻译,这个过程中避免了传统动态二进制翻译系统中的翻译与执行部分的上下文切换操作。同样地,为了合理地协调各线程间的工作,本论文提出了BranchTree模块,它不仅可以管理多线程的并行翻译操作,而且可以协调完成执行线程与优化线程的工作。4.提出了基于KVM的嵌入式虚拟化系统的两种软件调优方法。在嵌入式虚拟化系统中,为了减小GP客户系统对RT客户系统的影响,本论文提出一种提升实时任务优先级的调度策略,它大大减小了GP任务对系统实时性能的影响;接着,本论文提出一种利用多核技术的专有核绑定的调优策略,在该策略中,一些可操作的中断命令以及GP任务都通过硬亲和力技术绑定到一个专有核上,而实时任务被分配到另外一个核心上,这样可以避免其他任务对RT任务的影响。5.提出了基于KVM的嵌入式虚拟化系统的两种硬Cache调优方法。本论文结合页表预取技术、Cache架构以及Page coloring思想分别提出了基于硬Cache的预取策略和划分策略。同前人研究工作相比,本论文的工作是在真实物理环境下实现的,而不是传统的仿真下模拟实现;另外,本论文不是单纯的关注系统本身的吞吐量的大小,而是在注重实时性能的情况下,兼顾了系统的吞吐量。这种实现方式更加贴近实际生活结合。

【Abstract】 Nowadays, with development of computer hardware compared to the slower software computing, the requirement of huge information resources management and service consolidation, virtualization technique, as one solution, has been deemed as one of the research points prompted by cloud computing. Based on software and hardware technique, virtualization technique assigns fundamental resources to several or only one execution environments to satisfy its requirements. Currently, virtualization technique has been widely applied on many important research domains, such as service consolidation, kernel developing, kernel debugging, security computing, parallel computing between OSes and system migration, etc. To improve system performance with soft virtualization technique, Intel and AMD propose hardware-assisted virtualization that prompts virtualization technique.Multicore gives virtualization technique a chance. With chip multiprocessors, the execution of virtualization is easier than before, since different processes are assigned to each core. In addition, with the help of virtualization, each core can execution several virtual machines, rather than only one. Indeed, the advantages of multicore-based virtualization technique, such as cluster computing, dynamically assigning resource, efficiently utilizing system resources, etc, has been confirmed by many companies and general-purpose guests, because it utilizes a fewer hardware to help people finish works and gets better performance.Combined with multicore technique, virtualization technique can be improved further. According that mentioned, in this paper, the research is depicted in detain as follow: 1. This paper proposes qualitative analysis and quantitative analysis of dynamic binary translation (DBT) system’s performance. According analysis results, we change translation part, execution part and optimization part into various threads assisted by multicore. Then this paper presents dynamic code cache (DCC) policy based on working set. Compared to previous works, this policy fits program’s behaviors and reflects program’s locality feature.2. This paper proposes multithreaded DBT system---MTCrossBit, where translation/execution thread and optimization thread are executed concurrently. In this architecture, optimization thread used to build superblock is employed, and this is to efficiently utilize multicore resource to improve system performance. To address communication issue between threads, a novel lock-free communication mechanism--- Assembly Language Level Communication (ASLC), is presented, which can fully avoid lock/unlock algorithm. Another key point is that private code cache for each thread is presented in this architecture, which avoids polluting code cache between various threads.3. This paper proposes multithreaded DBT system---MTEE CrossBit, where translation/optimization thread and execution thread are executed concurrently. In this architecture, to efficiently execute target code block, several translation threads (including optimization part) are executed concurrently to translate basic blocks and superblocks. And this leads no context switch between translation thread and execution thread compared to original CrossBit. Then this paper also presents another key technique----BranchTree utilized to manage translation threads and execution thread.4. This paper presents two software tuning methods for KVM-based embedded virtualization system. In this architecture, to minimize the effect for RT guest caused by GP guest, this paper presents prioritization policy, which enhance the priority of RT guest to occupy CPU resource as long as possible. So the GP guest cannot frequently influence on RT guest. Then this paper proposes CPU shielding, which prevents the RT guest from being adversely affected by harmful workloads, like interrupt-off regions and cache pollution, thus achieving the best real-time performance.5. This paper presents two cache-based tuning methods for KVM-based embedded virtualization system, Page table prefetch (PTP) and cache partitioning (CAP) assisted by prefetch technique and page coloring. In previous works, various cache partitioning solutions were executed in simulation, while in this paper it is applied on physical cache. Compared to previous works, the goal in this paper focuses on not only better real-time response but also high system performance.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络