105 points · by doener · 10y ago · 16 comments
Now I've not really used Windows much in the past 10 years. I switched to OSX and then to Ubuntu (when the desktop experience became more bearable, and the license issues with OSX more important to me). But reading about the NT kernel feels like reading about how a kernel should be designed. It really is that much cleaner in my opinion than anything I ever read on OSX or Linux. If they ever did open source it, I'd certainly join a subculture of before-it-got-hip Windows kernel lovers with XMonad as a window manager ;)
[0] http://www.amazon.com/Windows-Internals-Book-User-Edition/dp...
[1] http://forum.sysinternals.com/when-is-the-7th-edition-book-f...
If anyone would be so kind to humor me with such a comparison or pointer...
Meanwhile, QNX and Minix 3 took a more UNIX philosophy approach than UNIX by decomposing the whole thing into communicating components. QNX did it fast and ultra-reliable where Minix 3 is at least reliable. Easier to update due to architecture, even live updates. They each did this with little manpower and resources compared to what went into UNIX's.
My direct comparison for UNIX is with them. It shows UNIX architecture is fundamentally flawed in terms of flexibility, reliability, security, determinism, and ease of maintenance. I'd compare Windows kernel with other monoliths on servers and desktops. Usability and stability are better than most that are still around with other attributes hit and miss (or comparable). UNIX desktops have gotten much better than before but still too many WTF moments. And more dependency hell than I used to deal with on Windows. (sighs)
Neither Linux or Windows NT in the modern iterations are true monolithic kernels - e.g. on Linux FUSE allows filesystems in user space, loadable and unloadable kernel modules, Windows has a User mode drivers framework which is increasingly used post Vista.
Neither QNX or Minix are as feature full as Linux or Windows NT - almost all development on Linux and Windows is in driver development, not core kernel work (e.g. scheduler, IO system, memory manager).
Windows NT remains a more modern kernel (in terms of internal consistent object model, basic kernel primitives) than either BSD or Linux, but whether it's absolutely better is a harder argument.
In general the argument regarding micro/monolithic kernels is old hat in practice we can make extra-ordinarily reliable monolithic kernels, while we can also avoid a lot of the pain associated with microkernels - e.g. minimising context switch time. The reliability, security, flexibility argument is largely made redundant by man-power dropped into modern kernels - better use Linux because although it's theoretically inferior it has 1000s of days of development thrown at it.
Kernel development also appears to be transitioning to using safety in compilers to improve reliability, but that's been a research topic for decades - the answer to 'can we build a sufficiently smart compiler' has been 'maybe' for a long time - though LLVM and Rust's compiler show a way forwards.
(I bet you would enjoy the concurrency and I/O sections from The Be Book and The Design and Implementation of the FreeBSD Operating System too.)
https://users.cs.jmu.edu/abzugcx/Public/Student-Produced-Ter...
The benaphores were a brilliant idea. Plus, the general threading approach that avoided issues with direct, pointer manipulation. Add microkernels, memory protection, and threading all the way down for quite a unique kernel with incredible performance on old hardware. I'd be curious what a vanilla port of BeOS kernel on modern, multicore hardware would do vs a typical OS in fair benchmarks. We'd also include a little note that only one does it relatively safely. ;)
It's a great combination of theory and practice - it describes concepts and then shows them on the live kernel. For example, the author introduces the concept of cache coloring and then he shows in WinDbg the actual variable on the process data structure where the color is stored.
http://www.amazon.com/What-Makes-It-Page-Windows/dp/14791142...