| NT kernel is IMO pretty good. Here’s a few points. ABI for device drivers allows to add support for new hardware without recompiling the kernel. First-class support for multithreading, Vista even added thread pool to the userland API. Efficient asynchronous APIs for IO including files, pipes, and everything else. Linux only got this recently with io_uring, NT implemented IOCP decades go in version 3.5. NT security descriptors with these access control lists and nested security groups are better than just 3 roles user/group/root in Linux. This makes launching new processes and opening files more expensive due to the overhead of access checks, but with good multithreading support it’s IMO a reasonable tradeoff. Related to the above, CreateRestrictedToken kernel call for implementing strong sandboxes. Good GPU support, Direct3D being a part of the kernel in dxgkrnl.sys. This enables good multimedia support in MediaFoundation framework because it allows applications to easily manipulate textures in VRAM without the complications of dma-buf in Linux. Related to the above, GPU-centric 2D graphics (Direct2D) and text rendering (DirectWrite) in the userland API. |
I’ll bite. POSIX permissions are lousy, and NT permissions are mostly worse. It’s way too easy to mess up, and it’s way too hard to specify a sensible policy like “only a specific user can access such—and-such path”. At least NT can restrict directory traversal.
S3 got it right when they deprecated object-level ACLs.
> This makes launching new processes and opening files more expensive due to the overhead of access checks,
fork() is terrible and slow. CreateProcess is overcomplicated, but creating a process directly is a vastly better design IMO.
> but with good multithreading support it’s IMO a reasonable tradeoff.
Huh? Linux has had proper multithreading support since NPTL, which was a long time ago. Windows, in contrast, didn’t have reasonable support for multithreading on systems with >64 CPUs until Windows 11:
https://learn.microsoft.com/en-us/windows/win32/procthread/p...
I assume this is related to the way that Windows leaks all kinds of bizarre threading details into the user ABI.
I will grant that Linux’s original threading was an abomination.
> Related to the above, CreateRestrictedToken kernel call for implementing strong sandboxes.
Eww. The Windows sandboxing scheme is IMO an overcomplicated mess. Seccomp is not particularly friendly, but it does exactly what it says on the tin, and I would be far more comfortable running untrusted user code under seccomp than under Windows restrictions from token, jobs, integrity, etc.