Insights Into WSL 1.0

You may remember that Microsoft’s initial attempt at “Windows Services for Linux”, WSL 1.0 (or maybe just plain “WSL”), involved emulating Linux APIs on top of the Windows kernel. This was later scrapped in favour of the current WSL 2.0, which runs an actual Linux kernel, virtualized. Clearly, Microsoft found it problematic trying to keep things compatible with the native Linux kernel, and decided it was simpler to just run the real article. This report <https://www.theregister.com/2022/02/02/oracle_linux_microsoft/> links in passing to an interesting blog post <https://jmmv.dev/2020/11/wsl-lost-potential.html> covering some of the technicalities of how WSL 1.0 was implemented. Windows NT has, or had, the notion of different “environment subsystems” or “personalities” implemented in layers on top of the core kernel; in fact, Win32 is (or was) just one of these “personalities”, with the original POSIX layer being another. That blog post says that WSL1 was implemented as just such a “personality”. And if that had not been scrapped, it would have made some interesting kinds of integration across Windows and Linux processes possible. However, a reader comment to the original article <https://forums.theregister.com/forum/all/2022/02/02/oracle_linux_microsoft/#c_4408272>, claiming to come from a former “PM” (“Product Manager”?) for WSL, emphatically declares ... WSL is not an NT kernel "personality" and is in no way related to NT's POSIX subsystem. Not even slightly. They are entirely different implementations of different things and share zero architecture and implementation details. This reinforces an impression I’ve had, that much of the modularity of the original Windows NT architecture has decayed away over the years, sacrificed by Microsoft to marketing exigencies. And that includes the whole “environment subsystem” concept. So WSL1 was actually less modular than it might have appeared to begin with, and that would have added to the support headaches.
participants (1)
-
Lawrence D'Oliveiro