ArticleslgStudy

computer science

Cooperative Linux

Cooperative Linux is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cooperative Linux rather than just read about it. In short: Cooperative Linux, abbreviated as coLinux, was software which allowed Microsoft Windows and the Linux kernel to run simultaneously in parallel on the same machine. Cooperative Linux utilizes the concept of a Cooperative Virtual Machine (CVM).

Cooperative Linux — main illustration
Cooperative Linux — illustration

Key takeaways

  • Cooperative Linux belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cooperative Linux to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cooperative Linux from memory before moving on to harder problems.

Reference excerpt

Cooperative Linux, abbreviated as coLinux, was software which allowed Microsoft Windows and the Linux kernel to run simultaneously in parallel on the same machine. Cooperative Linux utilizes the concept of a Cooperative Virtual Machine (CVM). In contrast to traditional virtual machines, the CVM shares resources that already exist in the host OS. In traditional VM hosts, 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 as a research project based on similar work with User-mode Linux. He announced the development on 25 Jan 2004. In July 2004 he presented a paper at the Linux Symposium. 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 full x86 virtualization, which generally works by running the guest OS in a less privileged mode than that of the host kernel, and having all resources delegated by the host kernel. In contrast, Cooperative Linux runs a specially modified Linux kernel that is Cooperative in that it takes responsibility for sharing resources with the NT kernel and not instigating race conditions.

Distribution

Most of the changes in the Cooperative Linux patch are on the i386 tree—the only supported architecture for Cooperative. 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 machine 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 in most cases use either an existing Linux installation on a real partition or a 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 up installs by hand using the package manager 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 one 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. All of these issues are fixed by using coLinux based distributions such as andLinux, based on Ubuntu, or TopologiLinux, based on Slackware.

Dedicated distributions A few distributions were built specifically to work with coLinux.

AndLinux speedLinux TopologiLinux

Emulated hardware Ethernet network via TAP, PCAP, NDIS and SLiRP.

Limitations Did not support 64-bit Windows or Linux (nor utilize more than 4GB memory). A port was planned in 2011 but was ultimately cancelled. No multi-processor (SMP) support: Linux applications and the underlying kernel were able to use only one CPU. According to its documentation, a later third-party fork addresses both limitations; see Forks.

See also Win32-loader Platform virtualization Comparison of platform virtualization software Cygwin MSYS Wubi (installer) Longene Chroot Windows Subsystem for Linux

References

External links Official website Cooperative Linux on SourceForge coLinux on GitHub Virtualization with coLinux at the Wayback Machine (archived 2008-02-03) speedLinux on SourceForge Portable Ubuntu Remix on SourceForge

Illustrations

Cooperative Linux: Synaptic and nautilus running on Windows
Synaptic and nautilus running on Windows
Cooperative Linux: Ubuntu running with coLinux
Ubuntu running with coLinux
Cooperative Linux: speedLinux running with coLinux
speedLinux running with coLinux

Worked examples

Example 1 — a first encounter with Cooperative Linux

Start with the simplest possible case. Write down what Cooperative Linux claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cooperative Linux before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cooperative Linux ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cooperative Linux

In research
Cooperative Linux appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cooperative Linux in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cooperative Linux is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free virtualization software, Linux kernel variant, Virtualization software, so understanding it makes those chapters shorter.
In everyday life
Look for Cooperative Linux outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cooperative Linux” →

How to study Cooperative Linux in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cooperative Linux means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cooperative Linux out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cooperative Linux in simple terms?

Cooperative Linux, abbreviated as coLinux, was software which allowed Microsoft Windows and the Linux kernel to run simultaneously in parallel on the same machine. Cooperative Linux utilizes the concept of a Cooperative Virtual Machine (CVM).

Why does Cooperative Linux matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cooperative Linux?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cooperative Linux.

Tags

  • Free virtualization software
  • Linux kernel variant
  • Virtualization software
  • Virtualization software for Linux
  • Windows-only free software

Keep exploring