5 ms·
Its really difficult to compare the two. Lots of Linux simplicity might be just very superficial, hidden in the rarely visited dark corners, whereas in Windows
by zokier 10y ago
Its really difficult to compare the two. Lots of Linux simplicity might be just very superficial, hidden in the rarely visited dark corners, whereas in Windows the complexity commonly is bit more upfront. Much of this stems from the fact that NT is just much more modern design overall, while Linux builds upon the ancient UNIX design. So when you look at Linux you might only see the relatively simple original UNIX there and then think Linux as simple. But in reality lot of the complexity rises from trying to cram in all the new features we expect these days into the old design, especially when in factor in the complexity in userland.
Second view on the matter (which is more hearsay than hard fact) is that with the relatively advanced kernel WinNT team had built they were running into critical performance issues. This probably was exacerbated by Windows more often running on weak PC hardware at a time when UNIX systems were heftier workstations and servers. These perf issues required them to make major compromises to the system to make it sellable.
Another more minor reason might be that WinNT was from the ground up designed to be both portable (at least to Alpha in additon to i386) and flexible enough to provide different userland interfaces (in addition to Windows, it also had POSIX and OS/2 interfaces), whereas Linux was very much i386 and POSIX only early on.
edit: oops, forgot one more thing: Windows offers an API for drivers whereas in Linux drivers are generally considered a part of the kernel itself and the APIs they use are not public. This design decision makes Windows API surface inherently larger.
- reality_czech 10y agoI 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.