URN Logo
UNIX Resources » Linux » China Linux Forum » CPU 与 编译器 » 2 » Simple summary of virtualization
announcement 声明: 本页内容为中国Linux论坛的内容镜像,文章的版权以及其他所有的相关权利属于中国Linux论坛和相应文章的作者,如果转载,请注明文章来源及相关版权信息。
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.net
  业界新闻与评论
  自由软件杂谈
  IT 人生
  Linux软件快递
  翻译作坊
  Linux图书与评论
  GNU Emacs/XEmacs
  Linux 中文环境和中文化
  Linux桌面与办公软件
  Linux 多媒体与娱乐版
  自由之窗Mozilla
  笔记本电脑上的Linux
  Gentoo
  Debian 一族
  网络管理技术
  Linux 安装与入门
  WEB服务器和FTP服务器
  域名服务器和邮件服务器
  Linux防火墙和代理服务器应用
  文件及打印服务器
  技术培训与认证
  Linux内核技术
  Linux 嵌入技术
  Linux设备驱动程序
  Linux 集群技术
  LINUX平台数据库
  系统和网络安全
  CPU 与 编译器
  系统计算研究所专栏
  Linux下的GUI软件开发
  C/C++编程版
  PHP 技 术
  Java&jsp技术
  Shell编程技术
  Perl 编 程
  Python 编 程
  XML/Web Service 技术
  永远的Unix
  FreeBSD世界
   
Simple summary of virtualization
Simple summary of virtualization - caritas [2007-04-16 15:21 | 4,995 byte(s)]
 
Re: Simple summary of virtualization - gogoliu [2007-05-22 19:17 | 553 byte(s)]
 
Re: Simple summary of virtualization - 1help1 [2007-05-24 15:49 | 968 byte(s)]
 
Re: Simple summary of virtualization - nxin [2007-05-23 14:03 | 91 byte(s)]
 
Re: Simple summary of virtualization - yhpyhppp [2007-05-15 11:43 | 8 byte(s)]
 
Re: Simple summary of virtualization - huza [2007-04-23 08:25 | 10 byte(s)]
 
Re: Simple summary of virtualization - tchaikovsky [2007-04-18 17:58 | 5 byte(s)]
 
Re: Simple summary of virtualization - 1help1 [2007-04-18 15:00 | 20 byte(s)]
 
Subject: Simple summary of virtualization
Author: caritas    Posted: 2007-04-16 15:21    Length: 4,995 byte(s)
[Original] [Print] [Top]
1. Virtualization level

a. Timing-accurate virtualization

The timing logic is simulated by software. It is mainly used for chip verification. The performance is lowest.

b. Full virtualization

It is instruction-accurate CPU virtualization and ecessary peripheral virtualization. The "unmodified" guest operating system can be run on it.

Examples: Bochs, Qemu, Skyeye, Xcopilot.

c. Para-virtualization

It is instruction-accurate CPU virtualization and ecessary peripheral virtualization but with some modification to real hardware architecture, so that the guest operating system must be "modified" to run on it.

Examples: Xen, UML.

d. Operating system level virtulization

Some instruction (most non-privilege instruction) of CPU and the operating system interface (mostly system call interface) is virtualized. The target application can be run on it. Same or different operating system interface as that of host operating system may be virtualized.

Examples with same OS interface as that of host OS: Linux vserver, FreeBSD jail, Qemu user space emulation.

Examples with different OS interface as that of host OS: Linux binary compatibility support on FreeBSD, Wine.

2. Implementation

a. Hardware based or OS based implementation

Some virtulization systems work as a user space application (perhaps with some kernel space components) on a host OS, which are called OS based implementation, while others work on bare hardware directly, which are called hardware based implementation.

b. Interpretation based implementation

It is mainly used for full virtualization. The core of virtualization system usually is a loop to fetch an instruction, interpret the instruction, execute the instruction and advance the PC, perhaps with some pipeline handling.

Interpretation based virtualization system is usually good on portability, if it is programmed in portable language.

Example: Bochs, Skyeye, Xcopilot

c. Dynamic translation based implementation

In dynamic translation based virtualization system, the target binary code is translated into host binary code first, then the translated code is executed on host CPU directly.

In general, its performance is better than interpretation based implementation with good portability.

It can be used for full virtualization, in which, both the kernel space code and user space code is translated before execution. It can also be used for operating system level virtualization, in which, only the user space code is translated and the OS interface (system call) is implemented through calling the host system OS interface directly.

Examples: Qemu, Qemu user space virtualization.

d. Monitor based implementation

In monitor based virtualization system, the target CPU must be same as host CPU. The target code is executed on host CPU directly but usually with lower priority. Some privileged instruction or some resource access will trap into monitor, which usually is executed with highest priority, then, the monitor do some check and complete the privileged operation or resource access for target code and return to guest code.

Its performance can reach nearly native, but its main constraint is that the guest CPU must be same as the host CPU.

Examples: KQemu.

e. Para-virtualization implementation

On para-virtualization system, the "unmodified" guest code can not be run directly. Instead, usually the guest OS must be "modified" to be implemented based on para-virtualization system instead of real hardware. Some privileged operation or resource access are done
through calling the para-virtualization system instead of direct hardware programming.

Examples: Xen, UML, coLinux.

f. Implement the API of another OS in user space

This can be used for operating system level virtualization.

Examples: wine.

g. Implement the system call of another OS in kernel space

This can be used for operating system level virtualization.

Examples: Linux binary compatibility support on FreeBSD.

h. Partition resources between processes

Some resources such as file system, CPU time, network address and memory is partitioned between processes. Such that, some processes works on the restricted resources only.

Examples: Linux vserver, FreeBSD jail.
----
[Original] [Print] [Top]
Subject: Re: Simple summary of virtualization
Author: 1help1    Posted: 2007-04-18 15:00    Length: 20 byte(s)
[Original] [Print] [Top]
非常好的综述。Thanks
[Original] [Print] [Top]
Subject: Re: Simple summary of virtualization
Author: tchaikovsky    Posted: 2007-04-18 17:58    Length: 5 byte(s)
[Original] [Print] [Top]
mark!
----
程序之道犹如庄周梦蝶
[Original] [Print] [Top]
Subject: Re: Simple summary of virtualization
Author: huza    Posted: 2007-04-23 08:25    Length: 10 byte(s)
[Original] [Print] [Top]
好,全面~~
[Original] [Print] [Top]
Subject: Re: Simple summary of virtualization
Author: yhpyhppp    Posted: 2007-05-15 11:43    Length: 8 byte(s)
[Original] [Print] [Top]
mark too
[Original] [Print] [Top]
Subject: Re: Simple summary of virtualization
Author: gogoliu    Posted: 2007-05-22 19:17    Length: 553 byte(s)
[Original] [Print] [Top]
还是这里的完整点,技术也深入点: http://www.ibm.com/developerworks/cn/linux/l-linuxvirt/
这里还有个对比列表: http://virt.kernelnewbies.org/TechComparison

另外我想问问,VMware、VirtualBox、Vitual PC这些不依赖于CPU虚拟化扩展的全虚拟化技术,跟xen、kvm这些依赖于CPU虚拟化扩展的全虚拟化技术有什么不同呢?
----
killall 眼高手低 用心浮躁 浅尝辄止
[Original] [Print] [Top]
Subject: Re: Simple summary of virtualization
Author: nxin    Posted: 2007-05-23 14:03    Length: 91 byte(s)
[Original] [Print] [Top]
CPU和OS支持虚拟化的话,效率可以达到最高吧,我觉得虚拟化会象MMU一样,成为CPU和OS的标准功能。
[Original] [Print] [Top]
Subject: Re: Simple summary of virtualization
Author: 1help1    Posted: 2007-05-24 15:49    Length: 968 byte(s)
[Original] [Print] [Top]
>VMware、VirtualBox、Vitual PC这些不依赖于CPU虚拟化扩展的全虚拟化技术,跟xen、kvm这些依赖于CPU虚拟化扩展的全虚拟化技术有什么不同呢?


个人的理解:

就VMware、VirtualBox而言,其实现的细节并不是 类似于 SKYEYE,SIMOS等模拟器,一条指令一条指令的模拟,而是 将要模拟的 GUEST的代码直接在HOST上执行。但是它们是建立在有 HOST OS的基础上。
XEN 一开始出现的版本并没有 使用了INTEL VT技术,它运行在 hardware上,这是与VMware区别。并且它的着眼点是怎么能管理 运行在上层的多个OS,而不是指令集的模拟。
KVM是运行在OS上的,类似于VMware,不过其使用的是开源的 KQEMU来作为其模拟的引擎。

为什么VMware VirtualBox没有采用 CPU虚拟化的方案,那是因为 CPU虚拟化出现的时间还不长。如果他们愿意的话,当然可以为 这样的CPU开发一个版本。
XEN 一开始没有采用CPU虚拟化技术(因为一开始还没有这样的技术),现在XEN已经可以支持CPU虚拟化了。
kvm从一开始就只支持CPU虚拟化。


[Original] [Print] [Top]
« Previous thread
opencv库编译后,Illegal instruction错误
CPU 与 编译器
2
Next thread »
哪位同志可以帮我测试一下下面的x64代码啊?我没有机器。谢!!
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
备案序号: 京ICP备05006143    webmaster: webmaster@unixresources.net
This page created on 2008-07-17 03:47:08, cost 0.083658933639526 ms.