Hacker News new | past | comments | ask | show | jobs | submit login

Windows IO model - including network - is arguably much more well designed than anything POSIX, thanks not least to Dave Cutler and his team.

From the get-go Windows NT (Win32) had a common model for overlapped IO (async IO in today's parlance). This async capability permeated everything from disk IO to network IO, and works well today with USB, Thunderbolt etc. Mind you, this model has not changed while Unix/Linux/POSIX still have not found a common model that works for all. See for instance https://stackoverflow.com/questions/13407542/is-there-really...

Under the hood Windows was also designed with a completion-oriented model (IO completion ports) which scales better in most instances than the Linux readiness-oriented approach (I believe that MacOS uses a completion approach as well, so the readiness approach is not universal *nix). Basically, windows saves at least one context switch for every basic IO operation. Windows supports the Berkeley sockets API with some optional extensions to make socket operations overlapped/async as well, essentially supporting both the straight socket model as well as the completion oriented extensions.




This is a very enlightening post, thank you. I don't often develop cross platform to this depth, and I think it is a wise reminder that Microsoft actually knows a thing or two about operating systems, contrary to popular opinion. It's almost like the application teams sabotage the OS teams...


You appear to understand this stuff better than me, so you've gotten me a bit curious; how did something like Java NIO work before kernel 5.1?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: