Apr 29, 2004 (09:04 AM EDT)
Review: CoLinux Allows Windows, Linux To Share PC
Read the Original Article at InformationWeek
Cooperative Linux is a set of device drivers and assorted snippets that, when installed, lets Linux run as a protected process under Windows. It comes from Israel, and if you believe the stories about it, it's the best thing since sliced challah.
Does it live up to claims of being revolutionary? It's certainly innovative. Is Bill Gates losing sleep over this new threat to his Windows dominance?
Well, it's certainly innovative.
How does it compare with other products that allow you to run Windows and Linux on the same machine, such a VMWare and CygWin? It's too early to tell - coLinux is still beta - but coLinux is already significant faster than the other software.
Download and Installation
It was a perfectly painless installation. Once installed, booting Linux just involved double clicking on a Windows icon. Next came installing a network "card" - just a software driver installed using the "Add Hardware" wizard on my Windows XP system - configuring it, and letting it know how to use my existing DSL line for Internet Connection Sharing. Then some pings to make sure my connectivity was good, and with a few downloads I was using Mozilla under Linux and Microsoft Internet Explorer 6 under Windows. At the same time. On the same box.
I like this product. A lot.
CoLinux was substantially faster than the same code under both VMWare and CygWin on the same box.
How it all works and how it compares, say, to VMWare's running of a virtualized Linux kernel is all supposition. based on some research and some guesswork. Neither VMWare nor CoLinux wants to give up the trade-secrets of exactly how they work.
Here's how coLinux works: It's not magic. With a rewrite of the Linux kernel, and some device driver rewrites, it just appears magical. It seems the Linux kernel runs entirely in protected mode (Ring 0) and speaks to the Windows kernel through a marshaling set of device drivers. There are likely some transitioning surprises with buffer overruns and the like: having a Linux API call to read a huge disk file into a too-small buffer causes some serious problems, but that is to be expected, and seems to only cause these problems in the error-producing window. Just reboot the Linux window, fix the problem, and keep going.
VMWare takes a different approach than coLinux. Instead of rewriting the kernel, apparently the route coLinux took, VMWare creates a super virtualized kernel in the most privileged Ring 0 of the processor, within which Windows, Linux, and virtually any operating system can run, demoted to a lower privilege level, such as Ring1 or Ring3. VMWare runs a specialized device driver to avoid conflicts between operating systems, instead of coLinux's approach that appears to let Windows device drivers control the actual hardware. So, under VMWare, a super monitor vitalizes the hardware and most privileged software operations, marshaling out privileged operations, which seem to require 15 percent overhead for I/O.CoLinux seems to pass the I/O request to the Windows driver and hope for the best.
Each method has its advantages and disadvantages. I'm not sure which is better, or which scales better to massive enterprises. Time will tell on those scores.
I ran a number of CPU and screen intensive tasks, games and business apps under coLinux, and there was no performance drag I could point at. Interestingly, when I ran ports of the same code in the Linux window and Windows window, the Linux code ran more smoothly. Linux showed less jerky motion on the games. Also, Linux was a touch faster for graphics intensive font rendering Linux's OpenOffice versus Windows Word.
Running CPU-only tasks in each window showed almost identical performance. Disk heavy tasks showed varied results: disk reads and directory operations gave about a 10 percent edge to Linux; there was no clear winner for SQL fetches and puts. My benchmarks were just quick hacks to give me a feel for the product and were not formal by any means. I suggest you run a full set of real benchmarks on a variety of operations to get a more accurate result than my, at best, back-of-the-envelope guesstimates.
Before opting to put this code in mission critical applications: remember this is still beta code. Test, test and re-test
All in all, I'm impressed. Not awed. But very impressed. And I don't impress all that easily anymore.
And this is still an early beta.
Ross M. Greenberg is a programmer, writer, consultant, and web page designer with experience in Linux, Unix and Windows. He started working on Unix-based systems in the early 1980s. Lately, he's been concentrating on PHP and ASP database programming.