21
Cooperative Linux… Cooperative Linux… “A treaty between two OS giants” “A treaty between two OS giants” Presented by: Rakesh kumar (usn:4BD07CS084)

Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Embed Size (px)

Citation preview

Page 1: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Cooperative Linux…Cooperative Linux…

“A treaty between two OS giants”“A treaty between two OS giants”

Presented by:

Rakesh kumar (usn:4BD07CS084)

Page 2: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

ContentContent

Why CoLinux?Why CoLinux?

IntroductionIntroduction

HistoryHistory

Design OverviewsDesign Overviews

Tools AvailableTools Available

UsesUses

Current StatusCurrent Status

Planned FeaturesPlanned Features

DisadvantagesDisadvantages

ConclusionConclusion

ReferencesReferences

Page 3: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

What is CoLinux?What is CoLinux?Cooperative Linux, abbrevaited as colinux,is a Cooperative Linux, abbrevaited as colinux,is a software which allows microsoft windows and software which allows microsoft windows and linux kernel to run simultaneosly in parllel on the linux kernel to run simultaneosly in parllel on the same mechine. same mechine.

Uses the concept of Cooperative Virtual Uses the concept of Cooperative Virtual Machine (CVM) Machine (CVM)

Contains special Windows drivers, which allow it Contains special Windows drivers, which allow it to run under Windows XP as a guest operating to run under Windows XP as a guest operating system with all privileges. system with all privileges.

Superior over other traditional virtualization Superior over other traditional virtualization solutions like VMware, Xen which provides less solutions like VMware, Xen which provides less privileges to guest OS.privileges to guest OS.

Page 4: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

How How ColinuxColinux work? work? Unlike in other Linux virtualisation solution  such as 

user mode linux , special driver software on the host operating system is used to execute the coLinux kernel in a privileged mode (known as ring 0 or supervisor mode).

By constant switching the mechine’s state between the host OS state and and the coLinux kernel state, coLinux is given full control of the physical machine's MMU (i.e, paging and protection) in its own specially allocated address space, achieving almost the same performance and functionality that can be expected from a regular Linux which could have ran on the same machine standalone.

Page 5: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

HistoryHistory

Dan AloniDan Aloni originally started the originally started the development of Cooperative Linux based development of Cooperative Linux based on similar work with User-mode Linux. on similar work with User-mode Linux.

He open sourced the software under the He open sourced the software under the GNU General Public License.GNU General Public License.

Other developers have since contributed Other developers have since contributed various patches and additions to the various patches and additions to the software.software.

Page 6: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

UsesUsesRelatively effortless migration path from Windows.Relatively effortless migration path from Windows.

In the process of switching to another OS using a virtualization software where In the process of switching to another OS using a virtualization software where co-linux comes in.it is already used in workplace to convert windows user to co-linux comes in.it is already used in workplace to convert windows user to Linux.Linux.

Adding Windows machines to Linux clusters.Adding Windows machines to Linux clusters. The cooperative linux patch is minimal and can be easily combined with others The cooperative linux patch is minimal and can be easily combined with others

such as MOSIX patches that add clustering capabilities to the kernel.such as MOSIX patches that add clustering capabilities to the kernel.

Using Linux as a Windows firewall on the same machine. Using Linux as a Windows firewall on the same machine. Cooperative linux system serve as a network firewall.Cooperative linux system serve as a network firewall.

Linux kernel development, debugging, research and study on Linux kernel development, debugging, research and study on another operating systems. another operating systems.

Running an otherwise-dual-booted linux system from the Running an otherwise-dual-booted linux system from the other OS.other OS.

CoLinux can run the graphical applications like Mozila firefox,Openoffice with good performance

Page 7: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Design OverviewsDesign Overviews

Device DriverDevice Driver

The device driver port of Cooperative Linux is The device driver port of Cooperative Linux is used for accessing kernel mode .used for accessing kernel mode .

Most of the OS independent code Interfaces Most of the OS independent code Interfaces with OS dependent primitives Like page with OS dependent primitives Like page allocations, debug printing, and interfacing allocations, debug printing, and interfacing with user space.with user space.

When a Cooperative linux VM is created,the When a Cooperative linux VM is created,the Driver loads a kernel image from a Driver loads a kernel image from a vmlinuxvmlinux file.file.

Page 8: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Design Overviews Design Overviews (cont...)(cont...)

Pseudo Physical RAMPseudo Physical RAMAll the memory which CoLinux considers as All the memory which CoLinux considers as physical in the allocated set is called physical in the allocated set is called Pseudo Physical RAM (PPRAM).Pseudo Physical RAM (PPRAM).The memory is allocated in host OS using The memory is allocated in host OS using the appropiate kernel function like the appropiate kernel function like alloc_page() in lunux and windows.alloc_page() in lunux and windows. Allocated pages are always resident and Allocated pages are always resident and not freed until the VM is downed. not freed until the VM is downed. Page tablesPage tables are created for mapping pages are created for mapping pages in the VM’s kernel virtual address space. in the VM’s kernel virtual address space. The VM’s address space resembles the The VM’s address space resembles the address space of a regular kernel. address space of a regular kernel.

Page 9: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Design Overviews Design Overviews (cont...)(cont...)

Context SwitchingContext SwitchingThe Cooperative Linux VM uses only one The Cooperative Linux VM uses only one host OS process in order to provide a host OS process in order to provide a context for itself and its processes, viz. context for itself and its processes, viz. colinux-daemon .colinux-daemon .CoLinux is able to completely control the CoLinux is able to completely control the CPU and MMU without affecting anything CPU and MMU without affecting anything else in the host OS kernel.else in the host OS kernel.In Cooperative linux the problem is solved In Cooperative linux the problem is solved by Using an intermediate address space by Using an intermediate address space during switchingduring switching

Page 10: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Address space transition during an OS cooperative kernel switch, using an intermapped page

Page 11: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Design Overviews Design Overviews (cont...)(cont...)

Interrupt Handling and ForwardingInterrupt Handling and ForwardingCooperative Linux only forwards the invocations Cooperative Linux only forwards the invocations of interrupts to the host OS in order to keep of interrupts to the host OS in order to keep functioning and support the coLinux-daemon functioning and support the coLinux-daemon process itself, regardless to the fact that external process itself, regardless to the fact that external hardware interrupts are meaningless to the hardware interrupts are meaningless to the Cooperative Linux virtual machine.Cooperative Linux virtual machine.

Page 12: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Tools AvailableTools Available

Original GNU tools for compiling C/C++ Original GNU tools for compiling C/C++ programs and corresponding librariesprograms and corresponding libraries

Open source editor PN (Programmers Open source editor PN (Programmers Notepad) Notepad)

TFTP server for file transfer TFTP server for file transfer

Telnet ClientTelnet Client

Page 13: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

The The interactioninteraction between tools between tools  

The coLinux window itself, the open source editor PN and a TFTP server TFTP can be used together in such a way that the developer will practically never have to leave the familiar Windows XP environment of the development PC C/C++ source code is edited in Windows using the PN editor. This Windows application organizes the source code files into projects. All source code is saved in the directory c:\colinux, or a subdirectory within c:\colinux. A script file (build script) is run in the coLinux window to compile the entire project.

Page 14: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Interaction Interaction betweenbetween tools tools (contd..)(contd..)

The following is an example of such a build script:

#!/bin/sh

cp /windows/root/ngsmtp1.c ngsmtp1.c

make all

mv /tftpboot/ngsmtp1 /windows/root/ngsmtp1

mv ngsmtp1.c ngsmtp1.bak

rm ngsmtp1.gdb The second line of the build script copies C source

code with the name ngsmtp1.c from c:\colinux\root (/windows/root in coLinux) to the coLinux directory, in which the build script was launched.

Page 15: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Interaction between tools Interaction between tools (cont..)(cont..)

The interaction between development tools

Page 16: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Current FeaturesCurrent Features

Version: 0.6.4Version: 0.6.4Released on date: Released on date: July 02, 2006July 02, 2006Supported architectures:Supported architectures:

Intel-compatible 386 and aboveIntel-compatible 386 and above

Supported operating systems:Supported operating systems:Windows 2000 Windows 2000 Windows XP Windows XP Linux 2.6.x Linux 2.6.x

Supported guest Linux kernel versions:Supported guest Linux kernel versions:2.6.112.6.11

Page 17: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Planned FeaturesPlanned Features

Suspension Suspension

User Mode Linux inside Cooperative LinuxUser Mode Linux inside Cooperative Linux

Live Cooperative DistributionsLive Cooperative Distributions

Integration with ReactOS. Integration with ReactOS.

Virtual frame buffer support.Virtual frame buffer support.

Support for more host operating systems such Support for more host operating systems such as FreeBSD.as FreeBSD.

Page 18: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

DisadvantagesDisadvantages

CoLinux runs aside the Windows kernel on the CoLinux runs aside the Windows kernel on the same hardware abstraction layersame hardware abstraction layer

A problem in the Linux kernel can bring the A problem in the Linux kernel can bring the Windows kernel down Windows kernel down

Uses two different IP address for windows and Uses two different IP address for windows and Colinux.Colinux.

Also to load and use coLinux the user has to Also to load and use coLinux the user has to have administrator rights. have administrator rights.

Page 19: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

ConclusionConclusion

The colinux is an economical and efficient The colinux is an economical and efficient possibility to program embedded Linux systems possibility to program embedded Linux systems directly from a Windows PC.directly from a Windows PC.

As user friendliness of the Windows port will As user friendliness of the Windows port will improve, the exposure that Linux gets by the improve, the exposure that Linux gets by the average computer user can increase average computer user can increase tremendously. tremendously.

Page 20: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

ReferencesReferencesWeb references:Web references:

www.colinux.orgwww.colinux.org

www.sourceforge.net/projets/coLinuxwww.sourceforge.net/projets/coLinux

www.dilnetpc.comwww.dilnetpc.com

www.en.wikipedia.org/wiki/colinuxwww.en.wikipedia.org/wiki/colinux

www.hesperia.gsfc.nasa.gov/colinuxwww.hesperia.gsfc.nasa.gov/colinux

www.user-mode-linux.sf.netwww.user-mode-linux.sf.net

www.google.co.inwww.google.co.in

Book references:Book references:

Donald E. Knuth. Donald E. Knuth. The Art of Computer The Art of Computer ProgrammingProgramming, volume 1., volume 1.

Page 21: Cooperative Linux… “A treaty between two OS giants” Presented by: Rakesh kumar (usn: 4BD07CS084 )

Thank You!Thank You!