3 ms·
I disagree that the Windows kernel is a "more modern design overall." There are certainly a few bits and pieces that are nicer. One example is I/O completion
by reality_czech 10y ago
I disagree that the Windows kernel is a "more modern design overall." There are certainly a few bits and pieces that are nicer. One example is I/O completion ports, which are nicer than epoll and friends. But there are also places where Linux is way ahead, like multicore scalability, virtualization, or resource management.
Fundamentally, the WinNT kernel and the Linux kernel both use preemptive multitasking, virtual memory addresses, paged memory, file and process abstractions, and so on. WinNT is written in a weirdly limited dialect of C++; Linux is written in a weirdly augmented dialect of C. Most people would have to agree that they're more similar than different.
It's true that Linux was originally i386-only, but that didn't really affect the kernel design much. It was always written in portable C, with just a bare minimum of assembly language where needed.
Probably the worst things about the WindowsNT kernel were:
* The decision to bolt on vestigial OS/2 and POSIX interfaces (mostly done for political reasons, to get contracts where "POSIX-compatible" was a requirement).
* The decision to push parts of the Window Manager into the kernel, making life harder for servers.
* NTFS is overly complex (streams, anyone?) and has mediocre performance.
* All the horrible hacks to keep old proprietary software running (though a lot of these were in userspace, not the kernel)
* Horrible coding style-- using macros instead of void*, for example, and hungarian notation everywhere.
- _RPM 10y agoWhat's the dialect of C that the kernel is written in? You need the GNU compiler, but would that be considered a dialect?
- shakna 10y agoIts augmented with C macros that are not only rarely seen elsewhere, but considered bad practice in most other C projects. Augmented to the point where it feels very much like an Object Oriented language.
- reality_czech 10y agoI disagree that Linux's macros would be considered "bad style" in other projects. Perhaps we have been contributing to different projeects :) I do agree that there are some object-oriented-like features in Linux, like the use of tables of function pointers as VTables.