7 ms·
> "port" Windows services and applications to the Linux kernel. In every category imaginable, the NT kernel is better designed. Async IO, better power manageme
by dmitrygr 5y ago
> "port" Windows services and applications to the Linux kernel.
In every category imaginable, the NT kernel is better designed. Async IO, better power management, pageable kernel memory, stable driver API. I'd much rather KDE shell on NT kernel.
I get that Linux is popular, but no objective evaluation would claim that Linux kernel is better in any metric other than "how open source is it?" Spend some time to read the NT docs and get familiar with the design and you'll see.
This may be a hard pill to swallow, but in many areas linux's design is still very much "my first kernel" (I will give credit where it is due though, it is slowly being patched piece by piece, slowly). Whereas NT was written by a team who's done it a few times and avoided a lot of pitfalls (eg: synchronous by default IO, really??)
- DeathArrow 5y agoNT kernel is not only providing a stable API but also a stable ABI. Making guarantees that software will continue to work in the future.
- otabdeveloper4 5y ago> synchronous by default IO, really?? Yes really. Synchronous, multi-threaded is the sane default from any perspective. (Performance, safety, developer convenience, flexibility, you name it.) P.S. I've been making high-performance "web-scale" services for more than a decade.
- monocasa 5y agoEven Windows doesn't agree with that. They started with a syscall wrapper for running Linux binaries, and ended up running a full Linux kernel next to the NT one because that was faster. There are absolutely parts of Linux with all the architecture and engineering rigor of a favela. Real big "I want a new room and have two sheets of corrugated steel, a neighbor's wall, and an afternoon" energy. There are also major parts of it that have benefited from decades of 'this tweak that won't be driver ABI compatible increases efficiency in this use case by measurable but single digit perf'. And yes, there's politics to getting that merged, but the barrier is way lower in Linux. You try a lot of that in how Microsoft builds software and at best you put a target on your back because you just made a lot of work for another team. At worst that amount of differently siloed work just kills the idea in the first place.
- dmitrygr 5y ago> They started with a syscall wrapper for running Linux binaries, and ended up running a full Linux kernel next to the NT one because that was faster Actually, it was because NTFS semantics do not match ext semantics and lots of linux apps expect the latter. MS was clear on that...
- monocasa 5y agoNo, it's not NTFS versus ext in the sense you mean. The Microsoft messaging on this is misleading at best. It's that the NT filesystem stack puts the FS cache between user space and the FS driver, whereas on Linux it sits between FS driver and the block device driver. What that means is that on Linux, you get caching of blocks containing FS metadata for free, but on NT it has to be manually performed. That kills perf when looking at a lot of metadata. When they say NTFS is to blame, they mean the NT FileSystem stack.
- dmitrygr 5y ago> You try a lot of that in how Microsoft builds software And yet on same hardware, windows gets twice the battery life and idles at about half the power. Maybe NT's way IS better afterall?
- monocasa 5y agohttps://www.phoronix.com/scan.php?page=news_item&px=Windows-Linux-Power-Dell-XPS https://www.phoronix.com/scan.php?page=news_item&px=Windows-... Same power efficiency. And did you come back here an hour later to get another quip in?
- dmitrygr 5y ago> Same power efficiency. Are we looking at the same graph? https://openbenchmarking.org/embed.php?i=1807102-RA-DELLXPSBO89&sha=c390920&p=2 https://openbenchmarking.org/embed.php?i=1807102-RA-DELLXPSB... windows is idling at less than half the power! Idle power matters since most laptops spend most of their time idle waiting for the comparatively-slow humans to press keys > And did you come back here an hour later to get another quip in? And "quip" is a questionable (bordering on implied ad-hominem) word choice given that my only fault is disagreeing with you.
- tombert 5y ago> In every category imaginable, the NT kernel is better designed. Async IO, better power management, pageable kernel memory, stable driver API. I can't comment on most of these things since I don't know much coding about them, but I will definitely grant you the stable driver API. Drivers are a huge pain in the ass in Linux, and until DKMS it was pretty common for upgrading my kernel to break my wifi card, which was really annoying. > I get that Linux is popular, but no objective evaluation would claim that Linux kernel is better in any metric other than "how open source is it?" I mean, that's a pretty big feature. Didn't Linux get multicore support well before Windows almost entirely because Linux was open source and popular on servers? When something is open source, companies (or people) don't have to wait for a specific monolithic company to decide that a certain feature is worthy. > synchronous by default IO, really?? I will totally admit a lot of ignorance as I don't work in kernel spaces, but hasn't Linux had Async IO in the form of `epoll` for like 20 years? It's not the default but I feel like it's pretty commonly used. ----- Of the things I do like about Linux (outside of open source), it follows the "everything's a file" mantra from Unix. It makes it fairly fun and easy to arbitrarily glue applications together (admittedly at the cost of performance sometimes). Also, I like that you can choose different filesystems more or less arbitrarily. I don't have a Linux laptop anymore (I run macOS), but I when I did I was running ZFS on root with Ubuntu, and ZFS is pretty awesome. As far as I'm aware, with Windows you're basically stuck with NTFS.
- pjmlp 5y agoWindows NT was born with multicore support from the get go, hence why the unit of execution is threads not processes.
- tombert 5y agoFair enough, a quick Google has confirmed I was wrong! This is what I get for repeating things without researching them first.
- dralley 5y ago>I will totally admit a lot of ignorance as I don't work in kernel spaces, but hasn't Linux had Async IO in the form of `epoll` for like 20 years? It's not the default but I feel like it's pretty commonly used. As an API, epoll is kind of... suboptimal. Of course, lots of great things have been built with it, but there's a reason it's being replaced with io-uring, which is a lot more similar to Windows iocp.
- The_Colonel 5y ago> I get that Linux is popular, but no objective evaluation would claim that Linux kernel is better in any metric other than "how open source is it?" There's probably many areas where Linux comes strongly ahead - a much wider array of supported architectures, and even on the windows supported ones Linux scales much better by the virtue of being deployed from the smallest embedded computers to (all of) the largest supercomputers.
- EvanAnderson 5y agoLinux supports a larger number of architectures than NT ever did, but NT was originally implemented on a non-x86 processor to insure portability. The MIPS, PowerPC, Alpha, and IA64 ports of NT are all dead, but they were all supported in the past. The speed that Microsoft brought up NT on ARM illustrates the portability too.
- throwawayboise 5y agoYeah one of the features of NT is its hardware abstraction. Even though those other platforms have fallen by the wayside I would presume that abstraction layer is still there.
- com2kid 5y agoThey never let the ARM port lapse. One developer kept it compiling as a personal project.
- EvanAnderson 5y agoWhen I first used Interix back in the late 90s I had this dream that someday I'd see a version of NT that booted into text mode and ran an all-POSIX userland. That's never going to happen now but, architecturally, NT could totally pull it off. Edit: Microsoft wouldn't ever open-source NT but, damn, GNU/Windows NT would be a sweet OS to use. (Make it license-compatible with ZFS and it'd be awesome.)
- baq 5y agoPOSIX or not, a gui-less private build is most likely the backbone of azure.
- vetinari 5y agoNot necessarily private; Windows Server (without year-number) is GUI-less. Windows Server (with year-number) you can choose right in the installer, if you want "Desktop experience" or not.
- anthk 5y agoSo, ReactOS. It even has some BTRFS support, and crazy enough, it works with the original Windows 2003/XP kernel.
- fomine3 5y agoYou want WSL1?
- EvanAnderson 5y agoNot particularly. I'd rather have seen Interix hang around. Interix was implemented in more of a pure "NT" manner, being a subsystem, as compared w/ WSL1. WSL1 just shims Linux syscalls. I'd rather build software from source targeting Interix (as just another "Unix"-flavored build target) than running native Linux binaries.
- DeathArrow 5y agoYou can install Windows without GUI. It's called Windows Server Core. I think you might even use Windows 10 without GUI.
- shrubble 5y agoMicrosoft bought Hotmail in 1997. Hotmail was programmed in C++ and Perl--both of these programming languages had already been ported to NT at that time. It took them 7 years to get it stable enough to run on Windows Server, and they had to rewrite the entire stack to do it. Until then, they were running the service on Unix. https://news.softpedia.com/news/Windows-Live-Hotmail-Was-Powered-by-UNIX-Servers-until-2004-131323.shtml https://news.softpedia.com/news/Windows-Live-Hotmail-Was-Pow...
- jborean93 5y agoI think the parent comment is talking about the NT kernel rather than the Win32 subsystem that is Windows. Today NT really only has 1 subsystem (Windows) but it definitely can support multiple ones, it even had one for Unix (really more a POSIX layer) back in the day.
- EvanAnderson 5y agoTwo subsystems for POSIX, really. There was the original POSIX subsystem[0] that shipped in NT 3.1 thru 4.0, and the third-party OpenNT that became Interix[1] after Microsoft purchased it. [0] https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem [1] https://en.wikipedia.org/wiki/Windows_Services_for_UNIX https://en.wikipedia.org/wiki/Windows_Services_for_UNIX
- jen20 5y ago> NT kernel is better designed. Async IO This was true until io_uring, but io_uring is far more useful for far more purposes than overlapped IO.
- macdice 5y agoInteresting developments there: https://docs.microsoft.com/en-us/windows/win32/api/ioringapi/ https://docs.microsoft.com/en-us/windows/win32/api/ioringapi...
- DeathArrow 5y agoMaybe they can add a native POSIX layer to the NT kernel. One of the reasons NT kernel is great is it was developed by the same people who developed VMS.