注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

My Unix World

不要迷恋Unix,Unix只是计算世界很小的一部分!

 
 
 

日志

 
 

【Copy】Cooperative Linux  

2008-12-07 02:40:26|  分类: L-Compatible |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Cooperative Linux, abbreviated as coLinux, is software which allows Microsoft Windows and the Linux kernel to run simultaneously in parallel on the same machine.[1]

Cooperative Linux utilizes the concept of a Cooperative Virtual Machine (CVM). In contrast to traditional VMs, the CVM shares resources that already exist in the host OS. In traditional (host) VMs, resources are virtualized for every (guest) OS. The CVM gives both OSs complete control of the host machine while the traditional VM sets every guest OS in an unprivileged state to access the real machine.

Overview

The term "cooperative" is used to describe two entities working in parallel. In effect Cooperative Linux turns the two different operating system kernels into two big coroutines. Each kernel has its own complete CPU context and address space, and each kernel decides when to give control back to its partner.

However, while both kernels theoretically have full access to the real hardware, modern PC hardware is not designed to be controlled by two different operating systems at the same time. Therefore the host kernel is left in control of the real hardware and the guest kernel contains special drivers that communicate with the host and provide various important devices to the guest OS. The host can be any OS kernel that exports basic primitives that allow the Cooperative Linux portable driver to run in CPL0 mode (ring 0) and allocate memory.

History

Dan Aloni originally started the development of Cooperative Linux based on similar work with User-mode Linux. He announced the development on 25 Jan 2004.[2] In July 2004 he presented a paper at the Linux Symposium.[3]The source was released under the GNU General Public License. Other developers have since contributed various patches and additions to the software.

Comparisons

Cooperative Linux is significantly different from traditional virtualization solutions such as VMware, Plex86, Virtual PC, QEMU and other methods such as Xen, which generally work by running the guest OS in a less privileged mode than that of the host kernel. In contrast, the CPL0 approach simplified design with an early-beta development cycle of only one month -- starting from scratch by modifying the vanilla Linux 2.4.23-pre9 release until reaching to the point where KDE could run.

The only downsides to the CPL0 approach are stability and security. If it's unstable, it has the potential to crash the system (on earlier releases before ioperm was disabled, attempting to start a normal X server under coLinux would crash the host). However, measures can be taken, such as cleanly shutting it down on the first internal Oops or panic. Another disadvantage is security. Acquiring root user access on a Cooperative Linux machine can potentially lead to root on the host machine if the attacker loads specially crafted kernel module or (if the coLinux kernel was compiled without module support) the attacker finds some other way to inject code into the running coLinux kernel.

Distribution

Most of the changes in the Cooperative Linux patch are on the i386 tree—the only supported architecture for Cooperative at the time of this writing. The other changes are mostly additions of virtual drivers: cobd (block device), conet (network), and cocon (console). Most of the changes in the i386 tree involve the initialization and setup code. It is a goal of the Cooperative Linux kernel design to remain as close as possible to the standalone i386 kernel, so all changes are localized and minimized as much as possible.

The coLinux package installs a port of the Linux kernel and a virtual network device and can run simultaneously under a version of the Windows operating system such as Windows 2000 or Windows XP. It does not use a virtual PC such as VMware.

Debian, Ubuntu, Fedora and Gentoo are especially popular with the coLinux users.

Due to the rather unusual structure of the virtual hardware, installing Linux distributions under colinux is generally difficult. Therefore users generally use either an existing Linux install on a real partition or ready made filesystem image distributed by the project. The filesystem images are made by a variety of methods, including taking images of a normal Linux system, finding ways to make installers run with the strange hardware, building installs up using the package manager by hand or simply upgrading existing images using tools like yum and apt. An easier way to get an up-to-date filesystem image is to use QEMU to install Linux and "convert" the image by stripping off the first 63 512-byte blocks as described in the coLinux wiki.

Since coLinux does not have access to native graphics hardware, X Window or X Servers will not run under coLinux directly, but you can install an X Server under Windows, such as Cygwin/X or Xming and use KDE or GNOME and almost any other Linux application and distribution.[4]

Applications such as MySQL are also known to work well.

This allows a user to safely learn Linux without going to the trouble of wiping out existing operating systems, or creating a separate partition.

External links

  评论这张
 
阅读(372)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017