5 ms·
Have a look at FreeBSD's linuxulator. It basically maps syscalls (and a bunch of other stuff) from one OS to another. Alexander Leidinger has written a whole lo
by teamhappy 11y ago
Have a look at FreeBSD's linuxulator. It basically maps syscalls (and a bunch of other stuff) from one OS to another. Alexander Leidinger has written a whole lot of blog posts about it - this one's a good start: http://www.leidinger.net/blog/2010/10/27/the-freebsd-linuxulator-explained-for-developers-basics/ http://www.leidinger.net/blog/2010/10/27/the-freebsd-linuxul...
- stormbrew 11y agoIs there a source for this being a syscall emulation layer and not some kind of colocation of the linux kernel in a subsystem somehow? The latter would be much more interesting to me, since what I really want out of "running linux on my desktop" is for it to actually act like the linux machines my code is targeting, and I'm dubious that a syscall layer will achieve that to the degree I want.
- kybernetikos 11y agoA good few years ago now I used to use a project called cooperative Linux that was like what you describe - a user mode Linux kernel running as a service in windows.
- stormbrew 11y agoYeah there were actually a couple of projects along this line at various points, but they always suffered in various ways from not being well integrated into the system. What you really want is for the colocated kernel to have first class access to some basic things about the primary kernel (like file systems -- including page caching and networking) so they're not going through an expensive and awkward translation layer. Cygwin and things like colinux exist on opposite ends of that awkward divide, but something officially supported by the OS could maybe straddle it better.
- kuma4 11y agoI feel it is related to Windows Server container. Maybe Ubuntu works like a Docker container on Windows.
- joshumax 11y agoThere was also another project I worked with a while back called LBW (http://cowlark.com/lbw/ http://cowlark.com/lbw/) which allowed some unmodified Linux binaries to run on windows using Internix and some really neat syscall handler trickery.
- tavert 11y agoAlso the more recent https://github.com/wishstudio/flinux https://github.com/wishstudio/flinux
- xenadu02 11y agoOne of my coworkers is from MS and worked on the Android apps on Windows project. This comes out of that cancelled work: It's a full implementation of Linux syscalls in user mode that registers a driver to perform kernel-mode tasks on behalf of the subsystem. The NT kernel has always been fairly agnostic and not tied specifically to Win32; it originally had an OS/2 text-mode and POSIX subsystem in addition to Win32. The NT kernel even uses a Unix-like "\\?\" root filesystem where disks, kernel objects, sockets, etc are mounted. From what I can gather Microsoft is paying Canonical to help with a few user-mode bits and the Windows apt-get stuff uses the official Canonical sources. As I said to him: "NT is the only major OS I know of that has always had personality subsystems. Cutler’s vision finally pays off after 3 decades of waiting"
- nbevans 11y agoI love your last paragraph. Exactly what I was thinking. NT Subsystems were its party trick and its taken far too long for them to be introduced on the grand stage. I bet Dave Cutler is smiling his face off!
- keithpeter 11y agoThankyou for this concise summary. Much clearer now.
- bitcrazed 11y agoClose, except ... There is NO Windows "apt-get stuff" - it's just apt-get. From Ubuntu.
- beagle3 11y ago> "NT is the only major OS I know of that has always had personality subsystems." In what way is a "subsystem" different than a "library" or a "process" or a "driver" (if it runs in kernel space)? Any process can use the native API. What's special about a "subsystem"?
- vram22 11y agoWhat was his vision? I know that Dave Cutler was heavily involved in designing NT, and was earlier the same with DEC VMS. (Had read the book Inside Windows NT.) But don't know what vision you refer to. Was it about the personality subsystems?
- teamhappy 11y agoFrom linux(4): The linux module provides limited Linux ABI (application binary inter- face) compatibility for userland applications. The module provides the following significant facilities: +o An image activator for correctly branded elf(5) executable images +o Special signal handling for activated images +o Linux to native system call translation It is important to note that the Linux ABI support it not provided through an emulator. Rather, a true (albeit limited) ABI implementation is provided. https://www.freebsd.org/cgi/man.cgi?query=linux&apropos=0&sektion=0&manpath=FreeBSD+10.2-RELEASE&arch=default&format=html https://www.freebsd.org/cgi/man.cgi?query=linux&apropos=0&se... "Mapping syscalls from one OS to another" was really just an example to give the OP an idea of how this sort of thing works without a VM. Edit: Nevermind then
- stormbrew 11y agoI wasn't asking about freebsd (I've used that, even!), I was asking about this new thing on Windows and whether there's been official word that it is indeed the same sort of thing. Looks like it is indeed this sort of thing, though.
- ashitlerferad 11y agohttp://blog.dustinkirkland.com/2016/03/ubuntu-on-windows.html http://blog.dustinkirkland.com/2016/03/ubuntu-on-windows.htm...
- stormbrew 11y agoThanks, this is what I was actually looking for. :)