The subsystem concept was introduced with Windows NT and part of its core design concept. Perhaps as part of Microsoft's [[Embrace Extend Extinguish]] strategy, but also for other business reasons of partner relationships and government contracts. > Several of the major goals for Windows NT centered around the need for it to many different types of applications seamlessly on the same graphical desktop. Windows NT runs applications written for existing operating systems such as MS-DOS, OS/2, and Windows 3.1. It is also runs applications written to newer application programming interfaces such as POSIX and Win32. # Subsystems Subsystems as a general rule do not depend on each other but only on the [[NT Executive]] (kernel) but can communicate with each other. (using kernel IPC?) Over time the dividing line between the subsystems has become very thin until the point that they can no longer be considered fully independent from a technical standpoint. ## Win32 Subsystem The main "integral subsystem" which the operating system itself uses, as well as nearly all application software developed for the Windows platform. ## Session Manager Subsystem It is the "process zero" started by the kernel and equivalent to Unix [[Init]] systems. > The Session Manager Subsystem, or smss.exe, is a component of the Microsoft Windows NT family of operating systems, starting in Windows NT 3.1. It is executed during the startup process of those operating systems. ## Local Security Authority Subsystem Service Handles login and security policies. > the security subsystem, which handles the logon process and monitors the security of the system > Local Security Authority Subsystem Service (LSASS) is a process in Microsoft Windows operating systems that is responsible for enforcing the security policy on the system. It verifies users logging on to a Windows computer or server, handles password changes, and creates access tokens. ## OS/2 Subsystem Released with [[Windows NT]] and removed in [[Windows XP]] in 2003. To provide backwards compatibility with command line [[OS/2]] applications. > NT (up to and including Windows 2000) shipped with an OS/2 subsystem which ran character-mode 16-bit OS/2 applications. Microsoft also had a Presentation Manager add-on for NT which supported OS/2 GUI applications, a semi-secret product hinted at in documentation but never actually advertised. Supposedly after the breakup between IBM and MS, MS went out of its way to avoid any patent entanglements and also buried mentions of OS/2. > I can crash any Windows OS by inserting a doggle into a USB port as the kernel is not protected from exception handling. This was done by Microsoft to circumvent the patents of IBM. OS/2 had a communications manager that protected the kernel and also enabled true mulit-tasking and parallel threading, something that is only partially enabled even with Windows 10. ## Microsoft POSIX Subsystem Released with [[Windows NT]] (3.x?) and replaced with [[#Windows Services for UNIX]] in [[Windows XP]] in 2003. Developed almost entirely to obtain government contracts which required POSIX compliance. Extremely minimal. I played a little with it in college. Runtime consists of `psxss.exe` and `psxss.dll`. ## Windows Services for UNIX Released with [[Windows XP]] in 2003 and removed in [[Windows 8]] in 2012. Developed by [[Interix]] and based on [[OpenBSD]]. ## Windows Subsystem for Linux Released with [[Windows 10#Anniversary Update]] in 2016. > Windows Subsystem for Linux (WSL) is a feature of Windows that allows developers to run a Linux environment without the need for a separate virtual machine or dual booting. ### WSL 1 ### WSL 2 WSL 2 is built on top of the Windows hypervisor and emulates a full [[Linux]] kernel. Making it no longer technically a subsystem. - WSL2 uses [[Plan9]]'s network protocol for communicating between the host and virtual machine - WSL2 uses the VHDX format for the virtual machine disk image ## Windows Subsystem for Android - [Website](https://learn.microsoft.com/en-us/windows/android/wsa/) - [Source](https://github.com/microsoft/WSA) (issues only) # Non-Subsystems The DOS and Win16 compatibility layers were not implemented in terms of a subsystem, but instead as Win32 applications. > You have probably noticed that the Win32, OS/2, and POSIX servers have consistently been used as examples in our discussion of environment subsystems. In contrast, MS-DOS and 16-bit Windows have not been mentioned. This is because MS-DOS and 16-bit Windows applications (sometimes called Win16 applications) are not supported by their own environment subsystems running in separate user-mode processes. Instead, they are supported by special Win32 applications called _**virtual (MS-)DOS machines (VDM)**_ . VDMs provide MS-DOS and Win16 applications with an execution environment that looks to them like native MS-DOS. # References ## Articles - https://www.os2museum.com/wp/nt-and-os2/ ## MS Documentation - https://learn.microsoft.com/en-us/previous-versions//cc767884(v=technet.10) - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc961760(v=technet.10)?redirectedfrom=MSDN ## Wiki / SO - https://stackoverflow.com/questions/5792498/what-exactly-is-a-subsystem - https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem - https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux - https://en.wikipedia.org/wiki/Session_Manager_Subsystem - https://superuser.com/questions/1642403/wsl-for-linux-where-are-files-stored - https://superuser.com/questions/1749690/what-is-this-weird-process-i-see-in-wsl-called-plan9