Linux as co-operative Windows process (2017)
colinux.org
colinux.org
It still amazes me how breakthrough it was to have that working, given the lack of hardware virtualization for PCs in late 2003.
Around 2007 when Linux namespaces started getting better support, I had made a small executable to use these system calls and to spin up a squashfs image 'just for compiling stuff for another system'. Much later, this whole method was replaced with 'docker run'.
[1] - State of WSL1 · microsoft/WSL · Discussion - https://github.com/microsoft/WSL/discussions/4022#discussion...
I even published the app (ok code-signing was done on a Hackintosh), sadly it didn't make me rich...
Any idea why Microsoft didn't use this in WSL1 or 2?
Is it more efficient than hyper-v with hardware acceleration?
Can you see it being useful again? Or does it make sense to have a hybrid where the code runs using hardware acceleration but the timers are cooperative?
I think you meant: "The user friendliness of Windows combined with the stability of Linux.".
That's the kind of stability I need.
P.S.: Turns out the RAM was bad and replacing it fixed everything.
I had the opposite. I got a Thinkpad with a broken RAM IC. Windows was booting and working 99% normally with the desktop apps. However running a browser caused it to completely freeze. Linux didn't even boot. It didn't move past the early stage. So it is Linux' fault now?
So you were just "unlucky"? ;)
I won't claim to be an expert in either kernel but if you take both our cases (anecdatum) it seems that Linux is better at recognizing a problem and either mitigating it or failing hard. The latter sitatiion is much better than Windows just happily trying to use faulty hardware and rolling the dice. In my case, when running under Windows I was getting file corruption too.
My story is kind of old and so this was Windows 7, I think. Maybe Windows is better now.
90% of hard drives that windows does not detect Linux can detect and copy 99% of the data with some IO errors for the rest. Can handle hardware instability like bad rams or too high of an overclock for ages while windows crashes very easily.
The simplest thing is to buy a machine with Linux preinstalled.
I think you meant: "The user friendliness of Linux combined with the stability of Linux."
You know, like when you're not forced to link your system to a Microsoft account. Or when you cannot reboot because a 30 minute update is pushed down your throat. Or when you cannot start working because an other 30 minute update is pushed down your throat at startup. Or when you have a 2 minute warning before a forced 1h update is pushed down your.. ..you get the picture. And the long, long list goes on.
Once you're using it for >month, it's easy to see the BS as just an occasional inconvenience because saying yes is so much easier.
I was running Rails and other web frameworks inside colinux. I switched after I made sure that everything I was running in Windows for my work did run well in Linux. I remember that those very same programs run faster in Ubuntu than in Windows. The most notable improvement was GIMP's starting time: many times faster.
I think what you discovered is that GIMP is written primarily for Linux, rather than that Windows is shit. I mean Windows is shit, but that's coincidental. GIMP for Windows probably loads slowly because it "has to" load GTK and all its components like Cairo, but on Ubuntu these things were loaded already when the desktop started up.
I put "has to" in quotes, because it could have been rewritten to use Windows APIs, but that would be, you know, a rewrite. And GTK was made for GIMP. So like a lot of ported Linux programs it's basically going to bring half the Linux desktop with it so that the devs don't have to leave their comfort zone, and as a result it loads slowly. (And then the next one, Inkscape maybe, will also load slowly, since it loads its own versions of the same things.)
It worked pretty decently at the time.
That's unfortunate, is there a version of this that runs unprivileged like user mode Linux?
If you wanted to segment yourself and take over anything 'below' the kernel like the MMU, you'd need elevated rights. But that'd be some interesting programming.
https://en.wikipedia.org/wiki/Architecture_of_Windows_NT#/me...
More performant would be a noMMU variant of UML for Windows, supporting only PIE executables, similar to nabla-linux [1]. This is also quite similar to how mssql for Linux works NT kernel+Win32 in a single usermode process (single address space) [2]. Interestingly, mssql also uses memory protection keys to recover a bit of fault tolerance but last time I checked Win32 does not have an API for MPKs.
Reading the description definitely set of bells in my head reminding me of the venerable Cygwin, though CoLinux could comparatively have potentially more capabilities and upsides since there is a fully resident kernel running.
CoLinux hasn't pushed a new release since 2011 and no commits since 2012. Was the project death a byproduct of WSL [1], or what happened?
[1] https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
Probably the fact that it lacked 64-bit support: https://colinux.fandom.com/wiki/FAQ#Q27._Does_coLinux_work_u...
But yes, the GPU passthrough layer in WSL2 (or however it's actually implemented) is present by default.
A lot of the foss tasklist is just aimless combinatorials. And they become obsolete to boot:
-clone a program that just came out but make it open source -port everything to every platform -make x run on any dependency of category Y
And then it gets exponential as every new project becomes a new target to port from and to as a dependency: e.g, port linux co-op to rust, or port it to w11, or replace the backend with wsl or hyperV interchangeably...
OTOH, it's quite aimless, this unfolds from the main weakness of foss that is without money there's little incentive. And all of the volunteer incentive is behind making new things, so there's a lot of horizontal exploration and almost no perfection.
Microsoft already knew Hyper-V quite well so a VM made sense, they just had to put some automagic management around it.
But the one thing they would never be able to overcome was CUDA and kernel modules. If you show people "Linux" and they can't build their software, then it might as well be hot garbage.
I use WSL2 daily and far more often than my actual Linux VMs. It's not the fastest, but it did solve a huge chunk of the problems with WSL1. No, it's not native, but I already have 3 monitors, a huge tower, and a Mac Mini M1 on my desk. I didn't need a native box at my fingertips (those go on a rack in the basement, lol).
WSL2 cross-OS I/O performance is lower than WSL1. Especially with the random access patterns and constant stat/access calls made by Linux-targetting programs. However that should be the rare option to take. Working on native ext4 FS of WSL2 is almost as fast as running native Linux. So you should really copy files in and work on them in WSL.
https://colinux.fandom.com/wiki/FAQ#Q0._Do_I_need_Administra...?
Realistically, the overhead isn't ever going to be lower than hardware virtualization unless one goes for an API proxy a-la wine and WSL1 - but that's tons of work.
I've not seen this at all, and I use both Ubuntu and macOS for Java dev.