Yikes! NT kernel is far far
far better designed than any * nix¹. POSIX is an API (and not a very good one), not a kernel type anyway. Windows has had a POSIX layer for a while. The NT kernel actually has its own API that both the Win32 and POSIX APIs are implemented on top of.
Why is NT better than * nix (particularly Linux)? Two areas mainly:
- Virtual memory
This one's pretty obvious if you've ever written a malloc. Compare VirtualAlloc² with the mess of mmap/madvise/mprotect. I'm not even sure you can get the nice explicit reserve/commit of Windows with pure POSIX APIs.
Linux in particular used to have a very questionable virtual memory implementation³, but I suspect it's been much improved.
NT can demand-page kernel memory; Linux kills processes if the kernel needs memory.
- Async I/O
Here's how platforms do async I/O:
POSIX: You don't.⁴
Linux: Sleep. Wait for the kernel to wake you up when something happens so you can yell “IS ANYONE READY YET? HOW ABOUT NOW?!” at your file descriptors.
FreeBSD: Like Linux, but the API is less stupid.
Windows: Tell the kernel to run a callback when an I/O operation completes.
Personally I'm really excited for ReactOS. Linux is a 1970s kernel design.
---
¹ Well, Solaris and DragonFlyBSD have a lot of good ideas and good implementation.
² https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
³ https://lwn.net/1999/0121/a/vmreview.html
⁴ Okay okay, you have select(2) and poll(2), but then you're using select and poll.