Re:Satya Nadella just fixed Microsoft’s biggest problem
by amaks on Friday July 15, 2016 @07:41PM
(#12104508)
> Linux in particular used to have a very questionable virtual memory implementation³, but I suspect it's been much improved.
The document you're referencing is written in 1999. I suspect a lot has changed since then.
Re:Satya Nadella just fixed Microsoft’s biggest problem
by amaks on Friday July 15, 2016 @07:42PM
(#12104510)
Also, nobody is using select and poll in Linux these days, epoll is the way to go.
Re:Satya Nadella just fixed Microsoft’s biggest problem
by PeCaN on Friday July 15, 2016 @09:09PM
(#12104753)
> 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.
Yeah, I covered epoll (and kqueue, which also applies to Solaris and OS X).
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.