| It's not that great. The idea it's amazing is a bit of a meme. There are many things about the Windows kernel that are much worse than Linux. Consider: exclusive file locking for almost everything. UNIX lets you delete or move an open file, the Windows kernel doesn't and this creates enormous complexity at higher levels of the userspace stack especially for any kind of auto updater. It's also one reason Windows updates are so painful. Windows has pathetically low performance in the filesystem layer, largely thanks to its filter driver design. It's not uncommon to find apps written originally for Linux are basically un-portable to Windows because they assume fast file IO and Windows just can't provide it. This was also a major motivator of the WSL2 effort. Windows actually has a feature called Dev Drive. It's a whole alternative filesystem that's faster than NTFS. They call it Dev Drive because they assume only devs need good filesystem performance (gah). You can't run Windows itself on a Dev Drive though, because of tech debt-y "reasons". This ridiculous approach of assuming developers are special is carried over to other things too. The Windows kernel supports symlinks but this support is nearly useless because it's disabled out of the box for security reasons (symlinks play a role in some kinds of attack on UNIX). So you have to turn on Developer Mode in the control panel to be able to use them. Hard links do work but only for directories, iirc. Sometimes you'll see the Windows approach to security be praised (SIDs, object manager etc). It does have a more principled design than Linux, that's true, but the standard here is macOS/XNU not Linux and the Windows kernel's sandboxing support is far worse than macOS. Windows processes are extraordinarily heavy compared to a Linux process. They take more RAM, start up much slower, and context switching is slower. Again, this difference often renders Linux software un-portable because they assume they can fork and exit processes very fast, but on Windows you just can't. You pretty much have to replace a multi-process design with threads. Despite the Windows kernel not being a competitive advantage to Microsoft (IMHO), and despite that they run public symbol servers, they keep it closed source. If you really want to understand the Windows kernel you can do so down to the level of individual function calls with public information, but you can't actually read them. The reason is probably security-through-obscurity for DRM, Warbird and other such things, not that it seems to help much. This makes it frustrating to figure out what's going on. Relatedly, the Windows kernel is an absolute war zone. It's nothing like Linux, which is a conventional textbook OS design. On Windows the kernel is riddled with deliberate traps, code obfuscation engines and "tilt sensors" designed to try and block attempts to hook internal functions by malware or other kinds of malicious software. This shows up in other places too: for example, the API to Linux is the system call instruction. On Windows the kernel theoretically doesn't have a stable syscall interface and you're supposed to go via public APIs like kernel32.dll, which in turn just forwards to ntdll. In practice it does have stable syscalls because MS never randomized the system call interface, so apps trying to detect hooking in userspace do invoke system calls directly (often for anti-cheat purposes). The result is there are like three different ways to invoke NT system calls, all of which are extremely overlapping and duplicative (kernel32, ntdll, system calls), all of which are used by apps in reality but only one of which is documented. |
I see that in general Windows takes a "big monolith" approach to things that Linux can handle as a large array of small pieces. An app can be a few files on Windows, a help database is one file, a source code repository would be one file if all the VCSes weren't imports from Linux.
This might be Conway's law in action. On Windows you were more likely a proprietary shop writing software that just does what it should do - if you needed to change it then you changed the software. On Linux because it's a bazaar you have a lot more of trying to tinker with the things that are already there, or add on small pieces. The average unit of deployment on Microsoft platforms is (or was) Turbo Pascal or Visual C++ 6 or QuickBooks or Microsoft Office; the unit of deployment on open-source platforms is grep or sed.