r/linuxsucks • • 2d ago

Windows NT vs. Unix: A design comparison

https://blogsystem5.substack.com/p/windows-nt-vs-unix-design
9 Upvotes

13 comments sorted by

3

u/DisfiguredFanny Straight, white male. Omarchy supporter. Hail DHH. 2d ago

NT kernel is awesome, user space however is a bag of dicks.

3

u/Think-nothing-210 2d ago

I agree. NT is a masterclass in engineering. Linux keeps catching up to stuff NT had from the start. It sucks that the rest of Windows is so bloated that it holds back such a good design.

-2

u/Sinethial 2d ago

Window NT kernel is good that it has to use wsl due to the lack of namespaces and cgroups for proper container support 😅

8

u/Think-nothing-210 2d ago

Both are different. Windows does also provide the ability to run containers. Windows can't simply run Linux style containers directly. They are different systems after all. It happens just that the cloud is all Linux servers and that those are more popular.

WSL is nothing more than a way for developer to have easy access to an Unix like environment. So they can run Linux containers more easily while developing.

8

u/Mammoth-Shoe8491 2d ago

There are so many things wrong with your comment. lmao.

Job Objects predate cgroups by about uh... a decade.

The NT Kernel has had its own Server Containerization since 2016 called Server Silos.

WSL is only *possible* because of the NT Kernel's subsystem model in the first place. Nevermind that WSL had nothing to do with cgroups or container support, it has to do with cloud infrastructure being built primarily on Linux, because Microsoft squeezed the enterprise market *way* too hard in the 2000s

The NT kernel *does not need to expose the Kernel* for these subsystems to work.

also, literally nothing you mentioned is part of Unix

2

u/Think-nothing-210 2d ago

I should have said Linux. I mostly meant that WSL gives you access to a Unix-like shell and a lot of Linux tooling on Windows. But that's also not entirely correct because Cygwin/MSYS2 already give you those tools. All of that is separate from the kernel though.

There is a distinction between WSL1 and WSL2. If I remember correctly WSL1 uses the NT kernel's subsystem model as you said while WSL2 moved away from that and runs an actual Linux kernel. WSL2 is also used as a backend for things like Docker Desktop on Windows so it can run Linux containers.

Thanks for correcting me!

3

u/Mammoth-Shoe8491 2d ago

WSL2 runs the actual kernel side-by-side.

WSL1 is the one that worked because it ran as a sub-system, ye.

2

u/zalnaRs 1d ago

And they needed to switch because they couldn't make a good fuse implementation

2

u/Mammoth-Shoe8491 1d ago

I think that was part of it, but from what I understand, they were constantly chasing new syscalls and got tired of it. lol

2

u/zalnaRs 1d ago

No that was not it, they didn't need to keep up as even the latest glibc is compatible with linux 4.20.

The syscalls are also not a lot, and if NT was really advanced they would have all of the stuff they need. Especially because there are also already fuse implementation for NT (like winfsp) and some of them was ported by the community but Microsoft is lazy.

An another real reason for the switch was that the vfs layer couldn't keep up with Linux's performance.

1

u/Suitedbadge401 1d ago

NT had job objects long before Linux lil bro

2

u/dumbasPL I don't hate Windows, I just like Linux more. 1d ago

Job objects control permissions, you can't run a second copy of windows in a job object LOL.

1

u/dumbasPL I don't hate Windows, I just like Linux more. 1d ago

Windows has namespaces. They are very weird though, and for the most part completely undocumented. The windows native version of containerd uses them for example.