INTRODUCTIONCooperative Linux, abbreviated as coLinux ,is anOPEN SOURCE software which allows Microsoftwindows and Linux kernel to run simultaneously inparallel on the same machine.Uses the concept of Cooperative Virtual Machine(CVM) .Contains special Windows drivers, which allow it to rununder Windows XP as a guest operating system withall privileges.Superior over other traditional virtualization solutionslike VMware, Xen which provides less privileges toguest OS.
INTRODUCTIONThe term "cooperative" is used to describe two entitiesworking in parallel.In effect Cooperative Linux turns the two differentoperating system kernels into two big co routines.Each kernel has its own complete CPU context andaddress space, and each kernel decides when to givecontrol back to its partner.CoLinux is a port of the Linux operating system thatexecutes as a single process in the Microsoftoperating system..
HISTORYDan Aloni originally started the development ofCooperative Linux based on similar work with User-mode Linux.He announced the development on 25 Jan 2004.He open sourced the software under the GNU GeneralPublic License.Other developers have since contributed variouspatches and additions to the software.
VIRTUALIZATIONVirtualizing a platform (or hardware) means that thehardware is abstracted from a physical platform intoa collection of logical platforms onto whichoperating systems can be run. In the simplestsense, this means that you can run multipleoperating systems (of the same or different types)on the same hardware platform.Microsoft Windows and Linux cooperate with each other incoLinux
VIRTUALIZATIONThe element of the system that provides thevirtualization is commonly known as a virtualmachine monitor or hypervisor. Each operatingsystem uses its own virtual machine thatcooperates with the hypervisor to arbitrate accessto the physical hardware.The hypervisor arbitrates access to the physical hardware
HARDWARE REQUIREMENTSSupported architectures:Intel-compatible 386 and aboveSupported operating systems:Windows 2000Windows xpLinux 2.6.xSupported guest Linux kernel versions:2.6.11
DESIGN OVERVIEWSDevice DriverThe device driver port of Cooperative Linux isused for accessing kernel mode .Most of the OS independent code Interfaceswith OS dependent primitives Like pageallocations, debug printing, and interfacing withuser space.When a Cooperative Linux VM is created, theDriver loads a kernel image from a vmlinux file.
DESIGN OVERVIEWS (cont...)Pseudo Physical RAMAll the memory which CoLinux considers asphysical in the allocated set is called PseudoPhysical RAM (PPRAM).The memory is allocated in host OS using theappropriate kernel function like alloc_page() inLinux and windows.Allocated pages are always resident and notfreed until the VM is downed.
DESIGN OVERVIEWS (cont...)Pseudo Physical RAM (cont...)Page tables are created for mapping pages inthe VM’s kernel virtual address space.The VM’s address space resembles theaddress space of a regular kernel.All the memory that coLinux considers physicalis inside this space (what we call pseudophysical RAM)...
DESIGN OVERVIEWS (cont...)Context SwitchingThe Cooperative Linux VM uses only one host OSprocess in order to provide a context for itself andits processes, viz. coLinux-daemon.CoLinux is able to completely control the CPU andMMU without affecting anything else in the host OSkernel.In Cooperative Linux the problem is solved byUsing an intermediate address space duringswitching.
DESIGN OVERVIEWS (cont...)Address space transition during an OS cooperativekernel switch, using an intermapped page
DESIGN OVERVIEWS (cont...)Interrupt Handling and ForwardingCooperative Linux only forwards the invocations ofinterrupts to the host OS in order to keep functioningand support the coLinux-daemon process itself,regardless to the fact that external hardware interruptsare meaningless to the Cooperative Linux virtualmachine.
DESIGN OVERVIEWS (cont...)Interrupt Handling and Forwarding
HOW COLINUX WORKS?Unlike in other Linux virtualization solution such asuser mode Linux , special driver software on the hostoperating system is used to execute the coLinuxkernel in a privileged mode (known as ring 0 orsupervisor mode).The root file system for coLinux is a regular file withinthe host operating system. To Windows its just aregular file, but to coLinux its an ext3 file system thatcan be read and written to.
HOW COLINUX WORKS? (cont...)By constant switching the machine’s state betweenthe host OS state and the coLinux kernel state,coLinux is given full control of the physical machinesMMU (i.e, paging and protection) in its own speciallyallocated address space, achieving almost the sameperformance and functionality that can be expectedfrom a regular Linux which could have ran on thesame machine standalone.coLinux executes as a process ofthe host operating system
ADVANTAGESRelatively effortless migration path from Windows.Adding Windows machines to Linux clusters.Using Linux as a Windows firewall on the samemachine.Linux kernel development, debugging, research andstudy on another operating systems.CoLinux can run the graphical applications like MozillaFirefox, Open office with good performance.When idle it causes no apparent load on the CPU.
DISADVANTAGESThe primary disadvantage of coLinux is that it has theability to crash the entire machine (all cooperatingoperating systems) because the guest operatingsystem runs in a privileged mode in the host kernel.It also has some dependencies on external softwarefor normal operation (windows and networkingsupport).Also to load and use coLinux the user has to haveadministrator rights.CoLinux is well-established in 32-bit operatingsystems only
PLANNED FEATURESSupport for more host operating systems such asFreeBSD.Live Cooperative Distributions.Virtual frame buffer support.Integration with ReactOS.User Mode Linux inside Cooperative Linux.
REFERENCESWEB REFERENCEShttp://en.wikipedia.org/wiki/Cooperative_Linuxwww.colinux.orghttp://www.rockbox.org/wiki/CoLinuxDevelopmentPlatform#Introductionhttp://www.ibm.com/developerworks/library/l-virtualization-colinux/#advhttp://www.justkernel.com/articles/?p=133BOOKSCooperative Linux by LAMBERT M. SURHONEApplication Virtualization: What You Need to Know for ItOperations Management by Michael Johnson