Comment by al_borland
Comment by al_borland 3 days ago
Is this because, in the WSL example, it’s not Linux that’s the subsystem, but rather a Windows subsystem that enables running Linux. Thus the name, Windows Subsystem for Linux?
Comment by al_borland 3 days ago
Is this because, in the WSL example, it’s not Linux that’s the subsystem, but rather a Windows subsystem that enables running Linux. Thus the name, Windows Subsystem for Linux?
> It is because the NT kernel implements multiple personalities, so it could compete in the UNIX market.
That wasn’t the original primary reason for it… Windows NT began life as NT OS/2… at first, an evolved OS/2 API was going to be its primary API… then as Windows 3.x took off and the IBM-Microsoft relationship further soured, the OS/2 API was downgraded to a backward compatibility afterthought, and eventually (in Windows XP) dropped entirely.
And because they weren’t even sure what the primary API was going to be at first… and the whole idea of multiple OS “personalities” was all the rage - IBM’s Mach-based Workplace OS sought to unify AIX and OS/2 (and they even talked about extending that to OS/400), Taligent (IBM-Apple joint venture) had similar objectives - so it is understandable they made this API flexibility a focus of their early plans
And the guy they hired as technical lead in developing NT, Dave Cutler - had come from DEC, which had the very real problem of selling two largely incompatible operating systems (Unix and OpenVMS) - and they also sought to unify them through multiple personalities, as their next generation operating system MICA which would merge Unix and OpenVMS, which Cutler was working on, until DEC management decided to cancel the project, and Cutler went to Microsoft to do the same thing there
> the whole idea of multiple OS “personalities” was all the rage
It IS honestly kind of cool. If Microsoft would invest into their solid OS instead of enshitifying it, they could implement Linux and Darwin on a single system. That would be quite a selling point.
If Microsoft wanted to invest more in Windows, I think the most useful thing would be to add more POSIX/Linux APIs and semantics to the Win32 API, to make it easier to port Linux software to being native Win32 apps… look at what Cygwin does, and identify the pain points (e.g. fork, exec without changing PID), and implement them in Win32 so Cygwin can be a thinner layer.. e.g. the NT kernel itself actually does have the moral equivalent of fork(), but Cygwin can’t use it because the Win32 subsystem (CSRSS.EXE) isn’t fork-aware, so instead Cygwin has to resort to highly complex and slow hacks instead… well, why not just make Win32 fork-safe? Of course, probably making every DLL and COM object fork-safe is way too much work (even on Linux, not all shared libraries are), but they could expose a way to “taint” a process as unforkable if any of those components get activated in it… maybe they could make Cygwin such a thin layer it becomes unnecessary, what if UCRT gave you equivalent functionality and all you had to do was ‘#define POSIX’?
I think that would be far more useful in practice than trying to close the gap between WSL1 and WSL2, which is what I’d interpret your “implement Linux” proposal as meaning
As far as trying to emulate Darwin goes, I think relatively few would be interested in running macOS apps on Windows, and I wonder whether there is a risk Apple might sue
I wonder if AI coding agents are going to improve to the point that they might radically change the incentives here - if adding new features becomes a lot cheaper, maybe the cost-benefit analysis will shift towards implementing more of this stuff
It is because the NT kernel implements multiple personalities, so it could compete in the UNIX market. The component in the kernel that implements a personality is called a subsystem. It used to be a correct technical term, but of course using it to describe a well-integrated VM isn't correct.