嵌入式微核心系统之设计与实作TheDesignandImplementationof课件

上传人:痛*** 文档编号:241280995 上传时间:2024-06-15 格式:PPT 页数:31 大小:445KB
返回 下载 相关 举报
嵌入式微核心系统之设计与实作TheDesignandImplementationof课件_第1页
第1页 / 共31页
嵌入式微核心系统之设计与实作TheDesignandImplementationof课件_第2页
第2页 / 共31页
嵌入式微核心系统之设计与实作TheDesignandImplementationof课件_第3页
第3页 / 共31页
点击查看更多>>
资源描述
OutlinevMain Characteristics of Cloud ComputingvWhy Virtualization?vHardware VirtualizationFull virtualizationParavirtualiztionHardware-assisted virtualizationvDevice Driver VirtualizationvMemory VirtualizationLocal vs.Distributed2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-1Main Characteristics of Cloud ComputingvOn-demand self-servicevBroad network accessvResource poolingvRapid elasticityvMeasured service2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-2Main Characteristics of Cloud ComputingvOn-demand self-serviceSystem demands resource automaticallyvBroad network accessvResource poolingVirtualizing resources such as memory,storage,CPU into pools.vRapid elasticityProvisioning or releasing resources at anytimevMeasured service2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-3History of Virtualization(1)v 1964 IBM CP-40.v 1965 IBM System/360-67,with virtual memory hardware.v 1999 Full Virtualization.VMware.v 2003 Para-Virtualization.Xen.v 2005 HW-Assisted Virtualization.Intel VT-x,AMD-V.v 2006 QEMU.v 2007 KVM(Kernel-based Virtual Machine).Linux 2.6.20.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-4History of Virtualization(2)v From another perspective,the development of virtualization can be divided into the following stages:Mainframe Virtualization Desktop Virtualization Server Virtualization Cloud Computing Nowadays.Mobile Virtualization On the way.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-5History of Virtualization(3)vThe reasons of x86 virtualization:Low infrastructure utilization.Increasing physical infrastructure costs.Increasing IT management costs.Insufficient failover and disaster protection.High maintenance end-user desktop.x86 is widespread.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-6Applying Virtualization to CloudvWith virtualizing resources,they can easily be put into pools.vVirtualized CPU and memories can be distributed dynamically to virtual machines in real time.Leads to Rapid elasticity and On-demand self-servicevImagine hot plug memories/CPU into machines.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-7Hardware Virtualization(1)vHow to realize x86 virtualization?vWhats the problem encountered?vHow to deal with the problem?2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-8Hardware Virtualization(2)vHow to realize x86 virtualization?vWhats the problem encountered?vHow to deal with the problem?2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-9Hardware Virtualization(2)2024/6/15Cloud Operating System-Uint 09:Core TechniquevTraditionally,OS is at Ring 0 for hardware resource management.vWhen realizing virtualization,VMM is at Ring 0,and OS is downgraded to Ring 1.U01-10Hardware Virtualization(2)vAccording to Popek and Goldberg,CPU instructions can be classified into three sets.Privileged instructions.Sensitive instructions.Critical instructions.*1:GJ Popek and RP Goldberg,“Formal requirements for virtualizable third generation architectures”,Communication of the ACM,vol 17,pp.412-421,July,1974.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-11Hardware Virtualization(3)vHow to realize x86 virtualization?vWhats the problem encountered?vHow to deal with the problem?2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-12Hardware Virtualization(3)vInstruction which will modify the configuration of resources should either be executed in Ring 0(privileged mode)or trap.vThere are 17 instructions in x86 architecture may cause problem.Why?They are unprivileged.vWont cause trap when execution.They expose physical processor state.vReveal some details which shouldnt be.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-13Hardware Virtualization(4)vHow to realize x86 virtualization?vWhats the problem encountered?vHow to deal with the problem?2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-14Hardware Virtualization(4)vThere are three approaches for virtualization available nowadays.Full Virtualization.ParaVirtualization.Hardware-Assisted Virtualization.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-15Full VirtualizationvBinary Translation.Replace nonvirtualizable instructions with new sequences of instructions which have the same effect as original on the virtual hardware.vMany instructions replace one,so if the instruction is frequently used,the overhead is huge.vHuge cost on resources.vBetter compatibility.vVMware,QEMU.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-16ParaVirtualization(1)vAlso named OS-assisted virtualization.vOS kernel adaptation.vPerforming corresponding hypercalls instead of the original privileged instructions.vLow cost of CPU and I/O.vCompatibility worse than Full Virtualization.vMeet problems when the kernel is not open.vCitrix Xenserver,Microsoft hyper-V.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-17ParaVirtualization(2)vHypercall is quite similar to system call.vImplementation of Xen.System call:an interrupt(0 x80)from user space to kernel space.Hypercall:an interrupt(0 x82)from guest domain(Ring 1)to hypervisor(Ring 0).Both system call table and hypercall table are defined in file“arch/x86/kernel/entry_64.S”.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-18Hardware-Assisted Virtualization(1)vRe-design the hardware architecture.vAdd new instruction sets for x86 architecture to trap those nonvirtualizable instructions.vConceptually,hypervisor stays at“Ring-1”.vNo need to de-privilege the guest OS.vAMD AMD-V,Intel VT-x.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-19Hardware-Assisted Virtualization(2)vIntel VT-x:First supported by Pentium 4(Model 662 and 672)on 2005.Two operating mode:vVMX Root Operation(for VMM).vNon-Root Operation(for Guest OS).Extented Page Tables.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-20Hardware-Assisted Virtualization(3)vAMD AMD-V:On 2006,first supported by Athlon 64,Athlon 64 X2 and Athlon 64 FX.Two modes for hypervisor to handle memory partitioning:vShadow Page Tables.vNested Page Tables.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-21Device Driver Virtualization the IdeavVirtual machines need their own device drivers.For guest OSs to communicate with physical hardware.vMost virtualization solutions emulated simple devices that the drivers already existed.Like IDE interface and NE2000(a very old nic).2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-22Device Driver Virtualization in PracticeqXen Hypervisors paravirtulization solution:vRequests from front-end drivers in DomU writes into a ring-buffer shared with Dom0.vDom0 handles the request by the back-end drivers in kernel,and access the hardware by real drivers.vThen back-end write response back and consumed by guest.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-23Device Driver VirtualizationvThe Split Driver2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-24Memory VirtualizationvModern Operating system and x86 hardware mostly support memory virtualization.In user-space applications access to virtual memory with paging mechanism.VM instance hosts with a OS support virtual memory means an addition layers of memory mapping.Newer CPUs have optimizations for addition layers of mapping.Additional Tagged TLBs in case that when switching VMs the TLB will be flushed.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-25Memory Virtualization in PracticevIn full virtualization,hypervisor traps every action try to update page table.At once hypervisor traps the action,hypervisor can take over.vIn Xen paravirtualization,para-virtualized OS directly invoke hypercalls to ask hypervisor update the page table.Much faster.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-26Distributed Memory Virtualization the IdeavPooling the virtualized memoryWe can add nodes into our cloud to extend the memory capacity.vBreaking the bound of physical machinesIf an VM instance in a node need more memories,it can get memories from other nodes.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-27Distributed Memory Virtualization in PracticevPerformance issue.Relatively very very high latency compare to local memories.Latency of Infiniband or 10G Ethernet:1.07 2.6 s.Latency of DDR3 SDRAM:10.5 ns.vPage table for distributed environment adds even more overhead.vTherefore,mainstream hypervisors dont support distributed memory virtualization,for now.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-28SummaryvSome characteristics of cloud computing need virtualization to achieve.vVirtualization technology leads to better utilization and elastic deployment.It also leads to better business model.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-29SummaryvVirtualization ApproachesFull Virtualization:High compatibility,low performance.Para-Virtualization:Need OS modified for VMM,best performance.HAV:Need newer hardware,good compatibility,good performance2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-30SummaryvDevice Drivers needs virtualization as well.Rather than emulation a whole device,we can implement a simple front-end in guest,and communicate with back-end device driver.vMemory VirtualizationPerformance critical.Lots new designs in CPU in order to optimization memory related operations.2024/6/15Cloud Operating System-Uint 09:Core TechniqueU01-31
展开阅读全文
相关资源
相关搜索

最新文档


当前位置:首页 > 管理文书 > 施工组织


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!