Co-operative Virtual Machines

Basil Kurian Roll Number 48 S7R , M.A.C.E.

Introduction to Virtualization Co-operative Virtual Machines Co-operative Linux Kernel History Design overview Uses Disadvantages Conclusion References

Method by which one can run one or more Operating systems inside another Operating system. Operating Systems Running inside are often refered to as “Guest OS es” and the OS in which Virtualisation implemented ,is known as “Host OS” Multiple Guest operating systems can run within Host operating system, with little or no modification on the guest OS.

Virtualization (continues...)

Running Windows XP on Linux

Virtualization - Features
'Guest OS' will be under the full control of 'Host OS' User need to specify 1) How much RAM should be alloted to Guest. 2) How Much Secondary storage space. 3) Which all cores of processor need to be shared with Guest. 4) Which all real hardwares should appear in virtual machine as virtual hardwares. If any problem occurs in Guest OS, Host will not be affected.

Co-operative Virtual Machines (CVM s)

Virtualization programs which gives both OS s complete control of the host machine. The two kernels will run in parallel on the machine, with one Co-operating with other . Turns two operating system kernels into two big coroutines.

CVM - Features

Shares resources that already exist in the host OS. Gives both OS s complete control of the host machine

Each kernel has its own complete CPU context and address space. Each kernel decides when to give control back to its partner.

Cooperative Linux (co-Linux)

Software which allows Microsoft Windows and the Linux kernel to run simultaneously in parallel on the same machine. Runs a specially modified Linux kernel that is Cooperative in nature. Takes responsibility for not instigating race conditions, and sharing resources with the Windows NT kernel


Dan Aloni originally started the development based on similar work ' User-mode Linux ' Open sourced the software under the GNU General Public License. Other developers have since contributed various patches and additions to the software.

Current Status
Version: 0.6.4 (Released on July 02, 2006) Supported architectures: Intel 386 and above Supported guest Linux kernel versions: 2.6.11 Supported operating systems: Windows XP Windows 2000

Screenshot of Portable Ubuntu , A newer implementation of CoLinux Project

Co-Linux : How it works
A kernel patch, kernel code and user space tools that provide the means to load and run Linux under the driver context of another running kernel The loaded Linux kernel runs in the same protection level as the standalone kernel, alongside it. The loaded guest kernel is given a fixed amount of physical memory by the driver to use for itself. It has its own page tables and full control of the MMU and 4GB address space.

Design Overview

Device Driver Port Pseudo Physical RAM Context Switching Interrupt Handling and Forwarding

Device Driver Port of Co-Linux
Used for accessing kernel mode and using the kernel primitives that are exported by the host OS kernel Interfaces with OS dependent primitives Like page allocations, and interfacing with user space. Driver loads a kernel image from a vmlinux file.

Pseudo Physical RAM

All the memory which CoLinux considers as physical in the allocated set Allocated pages are always resident and not freed until the VM is downed Page tables are created for mapping pages in the VM’s kernel virtual address space The VM’s address space resembles the address space of a regular kernel

Context Switching
Use only one host OS process (colinux-daemon)in order to provide a context for itself and its processes It is called a Super Process since it frequently calls the kernel driver to perform a context switch from the host kernel to the guest Linux kernel and back With the frequent (HZ times a second) host kernel entries, it is able able to completely control the CPU and MMU without affecting anything else in the host OS kernel

Interrupt Handling and Forwarding
Set an interrupt vector table in order to handle the hardware interrupts that occur in the system during its running state External hardware interrupts are meaningless to the Cooperative Linux virtual machine

Relatively effortless migration path from Windows. Adding Windows machines to Linux clusters. Running an otherwise-dual-booted Linux system from the other OS Using Linux as a Windows firewall on the same machine. Development environment for porting to and from Linux.

Stability : If Co-Linux unstable, it has the potential to crash the system Security :If a malice user gains root access inside coLinux he can screwup the Windows System. To load and use coLinux the user has to have administrator rights. Uses two different IP address for windows and Colinux.


We have discussed how Cooperative Linux works and its benefits. Apart from being a big scary kernel hack, Cooperative Linux has the potential to become an alternative to User Mode Linux that enhances on portability and performance,rather than on security.


Thanks !!

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer: Get 4 months of Scribd and The New York Times for just $1.87 per week!

Master Your Semester with a Special Offer from Scribd & The New York Times