25 ms·
Windows NT vs. Unix: A design comparison
- nullindividual 2y agoThere's a large debate whether a 'hybrid' kernel is an actual thing, and/or whether NT is just a monolithic kernel. The processes section should be expanded upon. The NT kernel doesn't execute processes, it executes _threads_. Threads can be created in a few milliseconds where as noted, processes are heavy weight; essentially the opposite of Unicies. This is a big distinction. io_uring would be the first true non-blocking async I/O implementation on Unicies. It should also be noted that while NT as a product is much newer than Unicies, it's history is rooted in VMS fundamentals thanks to it's core team of ex-Digital devs lead by David Cutler. This pulls back that 'feature history' by a decade or more. Still not as old as UNIX, but "old enough", one could argue. [0] https://stackoverflow.com/questions/8768083/difference-between-posix-aio-and-libaio-on-linux https://stackoverflow.com/questions/8768083/difference-betwe...
- deleted 2y ago[deleted]
- mananaysiempre 2y ago> io_uring would be the first true non-blocking async I/O implementation on Unices. I would agree with that statement in isolation, except by that standard (no need for a syscall per operation) the first “true” asynchronous I/O API on NT would be I/O ring (2021), a very close copy of io_uring. (Registered I/O, introduced in Windows 8, does not qualify because it only works on sockets.) The original NT API is absolutely in the same class as the FreeBSD and Solaris ones, it’s just that Linux didn’t have a satisfactory one for a long long time.
- nullindividual 2y agoPOSIX AIO is not non-blocking async I/O; it can block other threads requesting the resource. IOCP is a true non-blocking async I/O. IOCP also extends to all forms of I/O (file, TCP socket, network, mail slot, pipes, etc.) instead of a particular type. POSIX AIO has usability problems also outlined in the previously linked thread. Remember, all I/O in NT is async at the kernel level. It's not a "bolt-on". IoRing is limited to file reads, unlike io_uring.
- mananaysiempre 2y agoPOSIX AIO + FreeBSD kqueue or Solaris ports are functionally equivalent to IOCP as far as I can tell.
- nullindividual 2y agoThis describes kqueue: https://speakerdeck.com/trent/pyparallel-how-we-removed-the-gil-and-exploited-all-cores?slide=37 https://speakerdeck.com/trent/pyparallel-how-we-removed-the-...
- trentnelson 2y agoI should do an updated version of that deck with io_uring and sans the PyParallel element. I still think it’s a good resource for depicting the differences in I/O between NT & UNIX. And yeah, IOCP has implicit awareness of concurrency, and can schedule optimal threads to service a port automatically. There hasn’t been a way to do that on UNIX until io_uring.
- nullindividual 2y agoYes, please! And if you're interested, RegisteredIO and I assume you'd drop in IoRing. In a nicely wrapped PDF :-)
- trentnelson 2y agoYeah I’d definitely include RegisteredIO and IoRing. When I was interviewing at Microsoft a few years back, I was actually interviewed by the chap that wrote RegisteredIO! Thought that was neat.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- trentnelson 2y agoNone of the UNIXes have the notion of WriteFile with an OVERLAPPED structure, that’s the key to NT’s asynchronous I/O. Nor do they have anything like IOCP, where the kernel is aware of the number of threads servicing a completion port, and can make sure you only have as many threads running as there are underlying cores, avoiding context switches. If you write your programs to leverage these facilities (which are very unique to NT), you can max perform your hardware very nicely.
- a-dub 2y agonotably the NT equivalent of select(): WaitForSingleObject and WaitForMultipleObjects had a benefit that one select/wait type syscall could be tickled by any of a network, file or the NT equivalent of a pthread signal.
- formerly_proven 2y ago> There's a large debate whether a 'hybrid' kernel is an actual thing, and/or whether NT is just a monolithic kernel. I don't think it's a concept that meaningfully exists. Microkernels are primarily concerned with isolating non-executive functions (e.g. device drivers) for stability and/or security (POLA) reasons. NT achieves virtually none of that (see e.g. Crowdstrike). The fact that Windows ships a thin user-mode syscall shim which largely consists of thin-to-nonexistent wrappers of NtXXX functions is architecturally uninteresting at best. Arguably binfmt_misc would then also make Linux a hybrid kernel.
- hernandipietro 2y agoOriginally, Windows NT 3.x was more "microkernelithic" as graphics and printer drivers where isolated. NT 4 moved them to Kernel mode to speedup the system.
- delta_p_delta_x 2y ago> The NT kernel doesn't execute processes, it executes _threads_ This is amongst the most important and visible differences between NT and Unix-likes, really. The key idea is that processes manage threads. Pavel Yosifovich in Windows 10 System Internals Part I puts it succinctly: A process is a containment and management object that represents a running instance of a program. The term “process runs” which is used fairly often, is inaccurate. Processes don’t run - processes manage. Threads are the ones that execute code and technically run. NtCreateProcess is extremely expensive and its direct use strongly discouraged (but Cygwin and MSYS2, in their IMO misguided intention to force Unix paradigms onto Windows, wrote fork() anyway), but thread creation and management is extremely straightforward, and the Windows threading API is as a result much nicer than pthreads.
- PaulDavisThe1st 2y agoIt is hard to accept that this is written by someone with any idea about how Linux works (as a Unix). A process (really, a "task") is a containment and management object that represents a running instance of a program. A program ("task") does not run, its threads do. The significant difference between Windows-related OS kernels and Unix-y ones is that process creation is much more heavyweight on the former. Nevertheless, on both types of systems, it is threads that execute code and technically run.
- jjtheblunt 2y agoMach before Linux was using task and threads as you seem to attribute to Linux. A nice historical overview is… https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/Mach/Mach.html https://developer.apple.com/library/archive/documentation/Da...
- PaulDavisThe1st 2y agoI worked on Mach in the early 1990s :) For example: https://www.usenix.org/conference/usenix-mach-iii-symposium/adding-scheduler-activations-mach-30 https://www.usenix.org/conference/usenix-mach-iii-symposium/...
- PaulDavisThe1st 2y ago> The processes section should be expanded upon. The NT kernel doesn't execute processes, it executes _threads_. Threads can be created in a few milliseconds where as noted, processes are heavy weight; essentially the opposite of Unicies. This is a big distinction. I am not sure what point you are attempting to make here. As written, it is more or less completely wrong. NT and Unix kernels both execute threads. Threads can be created in a few microseconds. Processes are heavy weight on both NT and Unix kernels. The only thing I can think of is the long-standing idea that Unix tends to encourage creating new processes and Windows-related OS kernels tend to encourage creating new threads. This is not false - process creation on Windows-related OS kernels is an extremely heavyweight process, certainly comparing it with any Unix. But it doesn't make the quote from you above correct. On a separate note, the state of things at the point of creation of NT is really of very little interest other than than to computer historians. It has been more than 30 years, and every still-available Unix and presumably NT have continued to evolve since then. Linux has dozens to hundreds of design features in it that did not exist in any Unix when NT was released (and did not exist in NT either).
- epcoa 2y agoProcesses and threads on NT are distinct nominative types of objects (in a system where “object” has a much more precise meaning) and the GP is at least correct that the former are not schedulable entities. This distinction doesn’t really exist on Linux for instance where there are at one approximation on the user side only processes (at least to use the verbiage of the clone syscall - look elsewhere and they’re threads in part due to having to support pthreads), and the scheduler schedules “tasks” (task_struct) (whereas in NT the “thread” nomenclature carries throughout). FreeBSD may have separate thread and proc internally but this is more an implementation detail. I guess this all to say at the level lower than an API like pthreads, process/thread really isn’t easily comparable between NT and most Unixes. It’s not so much “heavyweight” vs “lightweight” but that NT has been by design more limited in how you can create new virtual memory spaces. For better or worse NT tied the creation of VM spaces to this relatively expensive object to create which has made emulating Unix like behavior historically a pain in the ass.
- 2y ago
- emily-c 2y agoBefore VMS there was the family of RSX-11 operating systems which also had ASTs (now called APCs in NT parlance), IRPs, etc. Dave Cutler led the RSX-11M variant which significantly influenced VMS. The various concepts and design styles of the DEC family of operating systems that culminated in NT goes back to the 1960s. It's sad that the article didn't mention VMS or MICA since NT didn't magically appear out of the void two years after Microsoft hired the NT team. MICA was being designed for years at DEC West as part of the PRISM project.
- rbanffy 2y agoIn many ways NT was a new, ground up implementation of “VMS NT”. It started elegant, but all the backwards compatibility, technical debt, bad ideas, and dozens of versions later, with an endless list of perpetual features driven by whoever had a bigger wand at Microsoft at the time of their inception, takes a toll. Windows now is much more complicated than it could be. It shocks me some apps get Windows NT4 style buttons even on Windows 11.
- emily-c 2y ago>In many ways NT was a new, ground up implementation of “VMS NT”. Most definitely. There was a lot of design cleanup from VMS (e.g. fork processes -> DPCs, removing global PTEs and balance slots, etc), optimizations (converging VMS's parallel array structure of the PFN database into one), and simplification (NT's Io subsystem with the "bring your own thread" model, removing P1 space, and much more). SMP was also designed into NT from the beginning. You can start seeing the start of these ideas in the MICA design documents but their implementation in C instead of Pillar (variant of Pascal designed for Mica) in NT was definitely the right thing at the time.
- markus_zhang 2y agoHow do you get Windows NT4 style buttons on 11? That's something I want to do with my application!
- dspillett 2y ago
- Dwedit 2y agoThreads aren't created in milliseconds, that would be really slow. It's more like microseconds.
- nullindividual 2y agoTypo, thanks for the correction. Too late to edit :-)
- qsdf38100 2y agoWNT is VMS+1 V->W N->M S->T
- queuebert 2y agoIn true Windows form, you have a memory access error.
- nullindividual 2y ago> https://www.youtube.com/watch?v=xi1Lq79mLeE&t=4314s https://www.youtube.com/watch?v=xi1Lq79mLeE&t=4314s "New Technology", but yes, it's funny
- steve1977 2y agoInitially actually (afaik) it stood for N10, for the Intel i860 CPU. I think “New Technology” came from marketing then.
- nullindividual 2y agoIf you watch the interview with David Cutler to the time code I linked to, he explains that NT stands for New Technology which marketing did not want.
- lproven 2y agoIn which he specifically says that there may have been some point, early on, where it stood for N-10. I just watched it. He does not say what you are maintaining he says.
- JeremyNT 2y agoOne of my very favorite facts about Windows 2000, as revealed in its boot screen, is that it's based on New Technology Technology. (I no longer work with Windows very much, but this little bit of trivia has stuck with me over the years)
- pmontra 2y ago
- lr1970 2y ago> It should also be noted that while NT as a product is much newer than Unicies, it's history is rooted in VMS fundamentals thanks to it's core team of ex-Digital devs lead by David Cutler. WNT = VMS + 1 (next letter in alphabet for all three)
- amatwl 2y agoFor the record, NT comes from the codename for the Intel i860 (N10) which was the original target platform for NT.
- nullindividual 2y agoThis is incorrect per David Cutler. https://www.youtube.com/watch?v=xi1Lq79mLeE&t=4314s https://www.youtube.com/watch?v=xi1Lq79mLeE&t=4314s
- lproven 2y agoHe doesn't actually disagree, you know.
- mannyv 2y agoNT used to mean "New Technology," if I remember correctly. Not sure if that was the internal codename or a marketing creation anymore.
- deleted 2y ago[deleted]
- slt2021 2y agoProcess is a way to segregate resources (memory, sockets, file descriptors, etc). You kill a proc - it will release all memory and file descriptors. Thread is a way to segregate computation. You spawn a thread and it will run some code scheduled by the OS. you kill/stop a thread and it will stop computation, but not the resources.
- TomMasz 2y agoComing from working with Vax/VMS to NT I was struck by the similarities between them. It was only years later I found out about NT's DEC connections.
- kev009 2y agoThis is great! It would be interesting to see darwin/macos in the mix. On the philosophical side, one thing to consider is that NT is in effect a third system and therefore avoided some of the proverbial second system syndrome.. Cutler had been instrumental in building at least two prior operating systems (including the anti-UNIX.. VMS) and Microsoft was keen to divorce itself from OS/2. With the benefit of hindsight and to clear some misconceptions, OS/2 was actually a nice system but was somewhat doomed both technically and organizationally. Technically, it solved the wrong problem.. it occupies a basically unwanted niche above DOS and below multiuser systems like UNIX and NT.. the same niche that BeOS and classic Mac OS occupied. Organizationally/politically, for a short period it /was/ a "better DOS than DOS and better Windows than Windows" with VM86 and Win API support, but as soon as Microsoft reclaimed their clown car of APIs and apps it would forever be playing second fiddle and IBM management never acknowledged this reality. And that compatibility problem was still a hard one for Microsoft to deal with, remember that NT was not ubiquitous until Windows XP despite being a massive improvement.
- tivert 2y ago> This is great! It would be interesting to see darwin/macos in the mix. But that's just another UNIX.
- kev009 2y agoOnly in the user's perception. The implementation is nothing like UNIX, being a Mach2.5 derivative and later additions like DriverKit.
- steve1977 2y agomacOS is a proper UNIX. As was OSF/1 (aka Digital UNIX aka Tru64 UNIX), which also had Mach 2.5 kernel.
- kev009 2y agoSo is z/OS. UNIX branding under The Open Group is correctly focused on the user's perception and has little to do with kernel implementation. Mach is is no more UNIX than NT is VMS, to call one the other in this context of kernel discussion is reductionist and impedes correct understanding of the historical roots and critical differences.
- nyrikki 2y agoThere are a number of issues, like ignoring the role of VMS, that windows 3.1 had a registry, the performance problems of early NT that lead to the hybrid model, the hype of microkernels at the time, the influence of plan 9 on both etc... Cutler knew about microkernels from his work at Digital, OS/2 was a hybrid kernel, and NT was really a rewrite after that failed partnership. The directory support was targeting Netware etc...
- nullindividual 2y agoAnd don't forget Alternate Data Streams for NTFS! Made specifically for Mac OS.
- netbsdusers 2y agoWhat exactly was "hybrid" about the OS/2 kernel? "Hybrid" has always been basically a made up concept, but in OS/2 it seems especially bizarre to apply it to what's obviously a monolithic kernel, even one that bears a lot of similarity with older unix.
- nyrikki 2y agoReal systems rarely can pass idealistic academic ideals. Balancing benefits and costs of microkernel and monolithic kernels is common. It looks like Google SEO gaming by removal of old content is making it hard to find good sources, but look at how OS/2 used ring 2 if you want to know. Message passing and context switching between kernel and user mode is expensive, and if you ever used NT 3.51 that was clearly visible as were the BSoDs when MS shifted to more of a 'hybrid' model.
- AshamedCaptain 2y agoYou can even call Windows/386 or 3.x "hybrid", and in my opinion it would be more accurate to call Windows/386 a hybrid kernel than calling NT one. There's a microkernel that manages VMs, and there is a traditional, larger kernel inside each VM (either Windows itself, or DOS). The microkernel also arbitrates hardware between each of the VMs, but it is the VMs themselves that contain most of the drivers, which are running in "user space"! In comparison Windows NT is basically a monolithic kernel. Everything runs in the same address space, so there's 0 protection. Or at least, in any definition where you call NT a hybrid kernel then practically any modular kernel would be hybrid. In later versions of NT the separations between kernel-mode components this post is praising have almost completely disappeared and even the GUI is running in kernel mode...
- stevekemp 2y agoI wonder how many of the features which other operating systems got much later, such as the unified buffer cache, were due to worries of software patents?
- kev009 2y agoUBC is one of the more technically challenging things to retrofit onto BSD, see https://www.usenix.org/legacy/event/usenix2000/freenix/full_papers/silvers/silvers.pdf https://www.usenix.org/legacy/event/usenix2000/freenix/full_... -- in particular note that it wasn't a universal performance improvement as of that paper. Some long lived UNIX like HP-UX never accomplished it. See http://mcvoy.com/lm/papers/SunOS.vm_arch.pdf http://mcvoy.com/lm/papers/SunOS.vm_arch.pdf and http://mcvoy.com/lm/papers/SunOS.vfs_arch.pdf http://mcvoy.com/lm/papers/SunOS.vfs_arch.pdf
- PaulHoule 2y ago(1) The has been some convergence such as FUSE in Linux which lets you implement file systems in user space, Proton emulates NT very well, and (2) Win NT’s approach to file systems makes many file system operations very slow which makes npm and other dev systems designed for the Unix system terribly slow in NT. Which is why Microsoft gave up on the otherwise excellent WSL1. If you were writing this kind of thing natively for Windows you would stuff blobs into SQLLite (e.g. a true “user space filesystem”) or ZIP files or some other container instead of stuffing 100,000 files in directories.
- nullindividual 2y ago> NT’s approach to file systems makes many file system operations very slow This is due to the file system filters. It shows when using DevDrive where there are significant performance improvements.
- PaulHoule 2y agoGreat! I’m thinking of adding a new SSD to my machine and would love to try this out.
- nullindividual 2y agoYou can provision a VHDX on your pre-existing NTFS volume (IIRC VHDX overhead is <=1% for Hyper-V, not sure if that's still the case and/or applies to DevDrive). But yes, I would say an additional drive is ideal. I did just that to put games on DevDrive. https://devblogs.microsoft.com/visualstudio/devdrive/ https://devblogs.microsoft.com/visualstudio/devdrive/ https://learn.microsoft.com/en-us/windows/dev-drive/#set-up-options https://learn.microsoft.com/en-us/windows/dev-drive/#set-up-...
- immibis 2y agoI wonder how much of Linux's performance is attributable to it not having such grand architectural visions (e.g. unified object manager) and therefore being able to optimize each specific code path more.
- delta_p_delta_x 2y agoNT is why I like Windows so much and can't stand Unix-likes. It is object-oriented from top to bottom, and I'm glad in the 21st century PowerShell has continued that legacy. But as someone who's used all versions of Windows since 95, this paragraph strikes me the most: > What I find disappointing is that, even though NT has all these solid design principles in place… bloat in the UI doesn’t let the design shine through. The sluggishness of the OS even on super-powerful machines is painful to witness and might even lead to the demise of this OS. I couldn't agree more. Windows 11 is irritatingly macOS-like and for some reason has animations that make it appear slow as molasses. What I really want is a Windows 2000-esque UI with dense, desktop-focused UIs (for an example, look at Visual Studio 2022 which is the last bastion of the late 1990s-early 2000s-style fan-out toolbar design that still persists in Microsoft's products). I want modern technologies from Windows 10 and 11 like UTF-8, SSD management, ClearType and high-quality typefaces, proper HiDPI scaling (something that took desktop Linux until this year to properly handle, and something that macOS doesn't actually do correctly despite appearing to do so), Windows 11's window management, and a deeper integration of .NET with Windows. I'd like Microsoft to backport all that to the combined UI of Windows 2000 and Windows 7 (so probably Windows 7 with the 'Classic' theme). I couldn't care less about transparent menu bars. I don't want iOS-style 'switches'. I want clear tabs, radio buttons, checkboxes, and a slate-grey design that is so straightforward that it could be software-rasterised at 4K resolution, 144 frames per second without hiccups. I want the Windows 7-style control panel back.
- kev009 2y agoIt's never been commonplace but can't you still run alternate shells (the Windows term for the GUI, not the command prompt in UNIX parlance)?
- andrewla 2y agoPractically speaking there are a number of developer-facing concerns that are pretty noticeable. I'm primarily a Linux user but I worked in Windows for a long time and have grown to appreciate some of the differences. For example, the way that command line and globbing works are night and day, and in my mind the Windows approach is far superior. The fact that the shell is expected to do the globbing means that you can really only have one parameter that can expand. Whereas Win32 offers a FindFirstFile/FindNextFile interface that lets command line parameters be expanded at runtime. A missing parameter in unix can cause crazy behavior -- "cp *" but on windows this can just be an error. On the other hand, the Win32 insistence on wchar_t is a disaster. UTF-16 is ... just awful. The Win32 approach only works if you assume 64k unicode characters; beyond that things go to shit very quickly.
- stroupwaffle 2y agoIf wchar_t holds the majority of code points for given use, then there are some benefits to having a fixed-width character and certain algorithms. But it is fairly easy to convert wchar_t to-and-from UTF8 depending on use. UTF16 is not awful it is the same as an 8-bit character set but twice longer.
- andrewla 2y agoUTF-16 is fine so long as you are in Plane 0. Once you have to deal with surrogate pairs, then it really is awful. Once you have to deal with byte-order-markers you might as well just throw in the towel. UTF-8 is well-designed and has a consistent mechanism for expanding to the underlying code point; it is easy to resynchronize and for ASCII systems (like most protocols) the parsing can be dead simple. Dealing with Unicode text and glyph handling is always going to be painful because this problem is intrinsically difficult. But expansion of byte strings to unicode code points should not be as difficult as UTF-16 makes it. Windows was converted to UCS-2 before higher code planes were designed and they never recovered.
- Dwedit 2y agoThe wchar_t thing is made much worse by disagreements on what type that actually is. On Win32, it's a 16-bit type, guaranteed to be UTF-16 code points (or surrogate pairs). But on some other compilers and operating systems, wchar_t could be a 32-bit type. Another problem with UTF-16 on Windows is that it does not enforce that surrogate pairs are properly matched. You can have valid filenames or passwords that cannot be encoded in UTF-8. The solution was to create another encoding system called "WTF-8" that allows unmatched surrogate pairs to survive a round trip to and from UTF-16.
- chasil 2y agoI would imagine that Windows was closer to UNIX than VMS was, and there were several POSIX ports to VMS. VMS POSIX ports: https://en.m.wikipedia.org/wiki/OpenVMS#POSIX_compatibility https://en.m.wikipedia.org/wiki/OpenVMS#POSIX_compatibility VMS influence on Windows: https://en.m.wikipedia.org/wiki/Windows_NT#Development https://en.m.wikipedia.org/wiki/Windows_NT#Development "Microsoft hired a group of developers from Digital Equipment Corporation led by Dave Cutler to build Windows NT, and many elements of the design reflect earlier DEC experience with Cutler's VMS, VAXELN and RSX-11, but also an unreleased object-based operating system developed by Cutler at Digital codenamed MICA." Windows POSIX layer: https://en.m.wikipedia.org/wiki/Microsoft_POSIX_subsystem https://en.m.wikipedia.org/wiki/Microsoft_POSIX_subsystem Xenix: https://en.m.wikipedia.org/wiki/Xenix https://en.m.wikipedia.org/wiki/Xenix "Tandy more than doubled the Xenix installed base when it made TRS-Xenix the default operating system for its TRS-80 Model 16 68000-based computer in early 1983, and was the largest Unix vendor in 1984." EDIT: AT&T first had an SMP-capable UNIX in 1977. "Any configuration supplied by Sperry, including multiprocessor ones, can run the UNIX system." https://www.bell-labs.com/usr/dmr/www/otherports/newp.pdf https://www.bell-labs.com/usr/dmr/www/otherports/newp.pdf UNIX did not originally use an MMU: "Back around 1970-71, Unix on the PDP-11/20 ran on hardware that not only did not support virtual memory, but didn't support any kind of hardware memory mapping or protection, for example against writing over the kernel. This was a pain, because we were using the machine for multiple users. When anyone was working on a program, it was considered a courtesy to yell "A.OUT?" before trying it, to warn others to save whatever they were editing." https://www.bell-labs.com/usr/dmr/www/odd.html https://www.bell-labs.com/usr/dmr/www/odd.html Shared memory was "bolted on" with Columbus UNIX: https://en.m.wikipedia.org/wiki/CB_UNIX https://en.m.wikipedia.org/wiki/CB_UNIX ...POSIX implements setfacl.
- jhallenworld 2y agoNT has its object manager.. the problem with it is visibility. Yes, object manager type functionality was bolted-on to UNIX, but at least it's all visible in the filesystem. In NT, you need a special utility WinObj to browse it.
- anthk 2y agoUnder ReactOS you have a bundled NT obj explorer under explorer.exe and maybe shell32.dll. Maybe if you can run that explorer under NT systems you could explore them under the original NT OSes too. Edit: https://winclassic.net/thread/1852/reactos-registry-ntobjectnamespace-folders-windows https://winclassic.net/thread/1852/reactos-registry-ntobject...
- rbanffy 2y agoI don’t think the registry is a good idea. I don’t mind every program having its own dialect of a configuration language, all under the /etc tree. If you think about it, the /etc tree is just a hierarchical key-value store implemented as files where the persistent format of the leaf node is left to its implementer to decide.
- mixmastamyk 2y agoI like what the elektra project was trying to do, but it didn't catch on. Basically put config into the filesystem with a standard schema, etc. Could use basic tools/permissions on it, rsync it, etc. Benefits of the registry but less prone to failure and no tools needed to be reinvented.
- phendrenad2 2y agoSo what's wrong with the registry if a file-based registry is okay? The registry could be an abstraction layer over a Unix /etc filesystem, after all.
- JackSlateur 2y ago"rm -rf /etc/nginx" versus "try to remember where are the miriads of random keys spread everywhere"
- alt227 2y agoThen it seems like the issue you have is how vendors are storing keys in the registry, not the registry itself. In your example, if nginx made a single node in the registry with all its keys under that then it would be just as easy to remove that single node as it would be to remove the single directory. However in the real world it is never as simple as you suggest. Linux apps often litter the filesystem with data. an app might have files in /etc and /opt with shortcut scripts in /root/bin and /usr/sbin. Config files in /home and /usr directories. Linux file systems are just as littered as windows registries in my experience, if not worse because they differ in different distros.
- 2y ago
- runjake 2y agoThe NT kernel is pretty nifty, albeit an aging design. My issue with Windows as an OS, is that there's so much cruft, often adopted from Microsoft's older OSes, stacked on top of the NT kernel effectively circumventing it's design. You frequently see examples of this in vulnerability write-ups: "NT has mechanisms in place to secure $thing, but unfortunately, this upper level component effectively bypasses those protections". I know Microsoft would like to, if they considered it "possible", but they really need to move away from the Win32 and MS-DOS paradigms and rethink a more native OS design based solely on NT and evolving principles.
- fortran77 2y ago> The NT kernel is pretty nifty, albeit an aging design. Unix is an Apollo-era technology! Also an aging design.
- _yb2s 2y agoExcept unix nowadays is just a set of concepts and conventions incorporated into modern OSs
- jiggawatts 2y agoHow “modern” are they when they’re just a bunch of shell scripts on top of POSIX? SystemD caught up to NT4 and the original MacOS.
- xattt 2y ago> SystemD caught up to NT4 and the original MacOS. The transition happened to the huffing and puffing/kicking and screaming of many sysadmins.
- ruthmarx 2y agoStill a minority of sysadmins though. Most seem to have embraced it to an extent that's honestly a little sad to see. I liked to think of the linux community as generally being a more technical community, and that was true for a long time when you needed more grit to get everything running, but nowadays many just want Linux to be 'free windows'.
- bawolff 2y ago> Internationalization: Microsoft, being the large company that was already shipping Windows 3.x across the world, understood that localization was important and made NT support such feature from the very beginning. Contrast this to Unix where UTF support didn’t start to show up until the late 1990s I feel like this is a point for unix. Unix being late to the unicode party means utf-8 was adopted where windows was saddled with utf-16 --- The NT kernel does seem to have some elegance. Its too bad it is not open source; windows with a different userspace and desktop environment would be interesting.
- chungy 2y agoWindows would be so much better if it were actually UTF-16. It's worse than that: it's from a world where Unicode thought "16-bits ought to be enough for anybody" and Windows NT baked that assumption deep into the system; it wasn't until 1996 that Unicode had to course-correct, and UTF-16 was carved out to be mostly compatible with the older standard (now known as UCS-2). For as long as you don't use the surrogate sequences in strings, you happen to be UTF-16 compatible; if you use the sequences appropriately, you happen to be UTF-16 compatible; if you use them in invalid ways to UTF-16, now you've got a mess that's a valid name on the operating system. I can't really blame NT for this, it's unfortunate timing and it remains for backwards compatibility purposes. Java and JavaScript suffer similar issues for similar reasons.
- chungy 2y agoI'll throw this out there too: UTF-8 isn't necessarily better than UTF-16; they both support the entirety of the Unicode character space. UTF-8 is convenient on Unix systems since it fits into 8-bit character slots that were already in place; file systems have traditionally only forbidden the NULL byte and forward-slash, and all other characters are valid. From this fact, you can use UTF-8 in file names with ease on legacy systems, you don't need any operating system support for it. UTF-8 is "space optimized" for ASCII text, while most extra-ASCII Latin, Cyrillic, Greek, Arabic characters need two bytes each (same as UTF-16); most of Chinese/Japanese/Korean script in the BMP requires three bytes in UTF-8, whereas you still only need two bytes in UTF-16. To go further beyond, all SMP characters (eg, most emoji) require four bytes each in both systems. Essentially, UTF-8 is good space-wise for mostly-ASCII text. It remains on-par with UTF-16 for most western languages, and only becomes more inefficient than UTF-16 for east-Asian languages (in such regions, UTF-16 is already dominant).
- Circlecrypto2 2y agoA great article that taught me a lot of history. As a long time Linux user and advocate for that history, I learned there is actually a lot to appreciate from the work that went into NT.
- RachelF 2y agoThe original NT was a great design, built by people who knew what they were doing and had done it before (for VMS). It was superior to the Unix design when it came out, benefiting from the knowledge of 15 years. I worked on kernel drivers starting in with NT 3.5. However, over the years, the kernel has become bloated. The bloat is both in code and in architecture. I guess this is inevitable as the original team has long gone, and it is now too large for anyone to understand the whole thing.
- parl_match 2y ago> Unix’s history is long—much longer than NT’s Fun fact: NT is a spiritual (and in some cases, literal) successor of VMS, which itself is a direct descendant of the RSX family of operating systems, which are themselves a descendant of a process control family of task runners from 1960. Unix goes back to 1964 - Multics. Although yeah, Unix definitely has a much longer unbroken chain.
- phendrenad2 2y agoOne thing I don't see mentioned in this article, and I consider to be the #1 difference between NT and Unix, is the approach to drivers. It seems like NT was designed to fix a lot of the problems with drivers in Windows 3.x/95/98. Drivers in those OSs came from 3rd party vendors and couldn't be trusted to not crash the system. So ample facilities were created to help the user out, such as "Safe Mode" , fallback drivers, and a graphics driver interface that disables itself if it crashes too many times (yes really). Compare that to any Unix. Historic, AT&T Unix, Solaris, Linux, BSD 4.x, Net/Free/OpenBSD, any research Unix being taught at universities, or any of the new crop of Unix-likes such as Redox. Universally, the philosophy there is that drivers are high-reliability components vetted and likely written by the kernel devs. (Windows also has a stable driver API and I have yet to see a Unix with that, but that's another tangent)
- jonathanyc 2y ago> and a graphics driver interface that disables itself if it crashes too many times (yes really) I actually ran into this while upgrading an AMD driver and was very impressed! On Linux and macOS I was used to just getting kernel panics. It’s too bad whatever system Crowdstrike hooked into was not similarly isolated.
- Dalewyn 2y ago>So ample facilities were created to help the user out, such as "Safe Mode" , fallback drivers, and a graphics driver interface that disables itself if it crashes too many times (yes really). Pretty sure most of this was already in place with Windows 95; I know Safe Mode definitely was along with a very basic VGA driver that could drive any video card in the world.
- p0seidon 2y agoThis is such a well-written read, just so insightful and broad in its knowledge. I learned a lot, thank you (loved NT at that time - now I know why).
- desdenova 2y agoUnfortunately NT doesn't have any usable distribution, so it's still a theoretical OS design.
- teleforce 2y ago>As a result, NT did support both Internet protocols and the traditional LAN protocols used in pre-existing Microsoft environments, which put it ahead of Unix in corporate environments. Fun facts, to accelerate networking and Internet capability of Windows NT due to the complexity of coding a compatible TCP/IP implementation, the developers just took the entire TCP/IP stacks from BSD, and call it a day since BSD license does allows for that. They cannot do that with Linux since it's GPL licensed codes, and this probably when the FUD attack started for Linux by Microsoft and the culmination of that is "Linux is cancer" statement by the ex-CEO Ballmer. The irony is that Linux now is the most used OS in Azure cloud platform (where Butler was the chief designer) not BSDs [2]. [1] History of the Berkeley Software Distribution: https://en.wikipedia.org/wiki/History_of_the_Berkeley_Software_Distribution#4.3BSD https://en.wikipedia.org/wiki/History_of_the_Berkeley_Softwa... [2] Microsoft: Linux Is the Top Operating System on Azure Today: https://news.ycombinator.com/item?id=41037380 https://news.ycombinator.com/item?id=41037380
- nullindividual 2y agoNot quite. NT 3.1 used a TCP stack from Spider Systems[0]. It was completely rewritten by Microsoft in 3.5[1]. The userland utilities, ping, tracert, etc were brought over from BSD. [0] https://en.wikipedia.org/wiki/Spider_Systems https://en.wikipedia.org/wiki/Spider_Systems [1] https://web.archive.org/web/20151229084950/http://www.kuro5hin.org/story/2001/6/19/05641/7357 https://web.archive.org/web/20151229084950/http://www.kuro5h...
- teleforce 2y agoAre you pretty sure on that? These are some quotes among others on the topic in a forum discussions back in 2005: "While Microsoft did technically 'buy' their TCP/IP stack from Spider Systems, they did not "own" it. Spider used the code available and written for BSD, so it doesn't appear that Microsoft directly copied BSD code (which, again, it is perfectly legal and legitimate to copy), they got it from a third party. Also ftp, rcp and rsh seems to have come with the bundle. I have heard that ftp was, but have never used rcp and rsh on Windows, so don't know what version(s) those were or were not included in any particular Windows version. Anyone can look through the .exes for those files and look for "The Regents of the University of California" copyright notice, if they want to see for themselves (rather than take the word of some anonymous geeks on a forum) ;)" [1] Windows TCPIP Stack Based on Unix ? https://www.neowin.net/forum/topic/381190-windows-tcpip-stack-based-on-unix/ https://www.neowin.net/forum/topic/381190-windows-tcpip-stac...
- Const-me 2y agoI would add that on modern WinNT, Direct3D is an essential part of the kernel, see dxgkrnl.sys. This means D3D11 is guaranteed to be available. This is true even without any GPU, Windows comes with a software fallback called WARP. This allows user-space processes to easily manipulate GPU resources, share them between processes if they want, and powers higher level technologies like Direct2D and Media Foundation. Linux doesn’t have a good equivalent for these. Technically Linux has dma-buf subsystem which allows to share stuff between processes. Unfortunately, that thing is much harder to use than D3D, and very specific to particular drivers who export these buffers.
- movedx 2y agoBut why should Linux have an equivalent of such features?
- deleted 2y ago[deleted]
- lelandbatey 2y agoWhy should a kernel have anything? Because it's useful and convenient, as the OP mentioned.
- movedx 2y agoIt _can be_ useful. It can also _not_ be useful to others. It sounds like it's not a choice in this case, but a forced feature, and that's fine for some and not for others. So again, why _must_ Linux have an equivalent?
- scoodah 2y agoNo one used the word must until you right now. The OP comment was posting a valid thing that Windows has that Linux does not. It’s fine if Linux doesn’t have it but I don’t understand where you’re coming from as presenting this as though someone said Linux must have this.
- ThinkBeat 2y agoArchitecturally WindowsNT was a much better designed system than Linux when it came out. I wish it had branched to one platform as a workstation OS (NTNext). and one that gets dumber and worse in order to make it work well for gaming. Windows 7/8/10/11 etc, Technically one would hope that NTNext would be Windows Server, but sadly no. I remember installing WindowsNT on my PC in awe how much better it was than Dos/Windows3 and later 95. And compatibility back then was not great. There was a lot that didn't work, and I was more than fine with that. It could run win32, os/2, and posix and it could be extended to run other systems in the same way. Posix was added as a nessecity to bid for huge software contracts from the US government, and MS lost a huge contract and lost interest in the POSIX sub system, and in the os/2 sub system. Did away with it, until they re-invented a worse system for WSL. Note subsystem in WindowsNT means something very different than subsystem for Linux.
- kbolino 2y agoWSL was a real subsystem. It worked in similar ways to the old subsystems. However, the Linux kernel is different enough from Windows, and evolves so much faster, that Microsoft wasn't able to keep up. WSL2 is mostly just fancy virtualization but this approach has better compatibility and, thanks to modern hardware features, better performance, than WSL ever did.
- Const-me 2y ago> thanks to modern hardware, very little performance penalty I would not call 1 order of magnitude performance penalty for accessing a local file system “little”: https://github.com/microsoft/WSL/issues/4197 https://github.com/microsoft/WSL/issues/4197
- kbolino 2y agoYeah, that's pretty bad. The fact that mounting the volume as a network share gets better performance is surprising and somewhat concerning. However, what I was talking about performance-wise was the overhead of every system call. That overhead is gone under WSL2. Maybe it wasn't worth it for that reason alone, but original WSL could never keep up with Linux kernel and ecosystem development. Being able to run nearly all Linux programs with only some operations being slow is probably still better than being able to run only some Linux programs with all operations being slow.
- userbinator 2y agoControversial opinion: DOS-based Windows/386 family (including 3.11 enhanced mode, 95, 98, up to the ill-fated ME) are even more advanced than NT. While Unix and NT, despite how different they are in the details are still "traditional" OSes, the lineage that started at Windows/386 are hypervisors that run VMs under hardware-assisted virtualisation. IMHO not enough has been written about the details of this architecture, compared to Unix and NT. It's a hypervisor that passes through most accesses to the hardware by default, which gave it a bad reputation for stability and security, but also a great reputation for performance and efficiency.
- omnibrain 2y agoIsn’t it similar when you use Hyper-V?
- wmf 2y agoIs that architecture actually good or is it just complex? If it's more advanced, why did MS replace it with NT? It has long been known that you can trade off performance and protection; in retrospect 95/98 just wasn't reliable enough.
- userbinator 2y agoI think it's because that architecture was less understood than the traditional OS model at the time; and they could've easily virtualised more of the hardware and gradually made passthrough not the default, eventually arriving at something like Xen and other bare-metal hypervisors that later became common. ...and as the sibling comment alludes to, MS eventually adopted that architecture somewhat with Hyper-V and the VBS feature, but now running NT inside of the hypervisor instead of protected-mode DOS.
- tracker1 2y agoI remember using NT4 for web dev work in the later 90's... was kind of funny how many times browsers (Netscape especially) would crash from various memory errors that never happened in Win9x... how many of those were early exploits/exploitable issues. That and dealing with Flash around that time, and finding out I can access the filesystem. I pretty much ran NT/Win2K at home for all internet stuff from then on, without flash at all. I do miss the shell replacement I used back in those days, I don't remember the name, but also remember Windowblinds.
- jonathanyc 2y agoGreat article, especially loved the focus on history! I’ve subscribed. > Lastly, as much as we like to bash Windows for security problems, NT started with an advanced security design for early Internet standards given that the system works, basically, as a capability-based system. I’m curious as to why the NT kernel’s security guarantees don’t seem to result in Windows itself being more secure. I’ve heard lots of opinions but none from a comparative perspective looking at the NT vs. UNIX kernels.
- benchloftbrunch 2y agoProbably because of the bad example set by XP Home (which deliberately crippled a lot of NT's advanced security features) having insecure defaults, and most people not bothering and just running as admin all the time.
- lukeh 2y agoNo one was using X.500 for user accounts on Solaris, until LDAP and RFC 2307 came along. And at that point hardly anyone was using X.500. A bit more research would have mentioned NIS.
- AdeptusAquinas 2y agoCould someone explain the 'sluggish ui responsiveness' talked about in the conclusion? I've never experienced it in 11, 10, 8 or 7 etc - but maybe thats because my windows machines are always gaming machines and have a contemporary powerful graphics card. I've used a mac pro for work a couple of times and never noticed that being snippier than my home machine.
- IgorPartola 2y agoI think this is taking about a much older version of Windows, such as XP and Vista. Vista was particularly bad.
- virgulino 2y agoInside Windows NT, the 1st edition, by Helen Custer, is one of my all-time favorite books! A forgotten gem. It's good to see it being praised.
- phibz 2y agoThe article hit on some great high points of difference. But I feel like it misses Cutler and team's history with OpenVMS and MICA. The hallmarks of their design are all over NT. With that context it reads less like NT was avoiding UNIX's mistakes and more like it was built on years of learning from the various DEC offerings.
- IgorPartola 2y agoWhat I don’t see in the comments here is the argument I remember hearing in the late 90s and early 2000s: that Unix is simpler than Windows. I certainly feel like it was easier for me to grasp the POSIX API compared to what Windows was doing at the time.
- fargle 2y agothis is a lovely and well written article, but i have to quibble with the conclusion. i agree that "it’s not clear to me that NT is truly more advanced". i also agree with the statement "It is true that NT had more solid design principles at the onset and more features that its contemporary operating systems" but i don't agree with is that it was ever more advanced or "better" (in some hypothetical single-dimensional metric). the problem is that all that high minded architectural art gets in the way of practical things: - performance, project: (m$ shipping product, maintenance, adding features, designs, agility, fixing bugs) - performance, execution (anyone's code running fast) - performance, market (users adopting it, building new unpredictable things) it's like minix vs. linux again. sure minux was at the time in all theoretical ways superior to the massive hack of linux. except that, of course, in practice theory is not the same as practice. in the mid 2000-2010s my workplace had a source license for the entire Windows codebase (view only). when the API docs and the KB articles don't explain it, we could dive deeper. i have to say i was blown away and very surprised by "NT" - given it's abysmal reliability i was expecting MS-DOS/Win 3.x level hackery everywhere. instead i got a good idea of Dave Cutler and VMS - it was positively uniformly solid, pedestrian, uniform and explicit. to a highly disgusting degree: 20-30 lines of code to call a function to create something that would be 1-2 lines of code in a UNIX (sure we cheat and overload the return with error codes and status and successful object id being returned - i mean they shouldn't overlap, right? probably? yolo!). in NT you create a structure containing the options, maybe call a helper function to default that option structure, call the actual function, if it fails because of limits, it reports how much you need then you go back and re-allocate what you need and call it again. if you need the new API, you call someReallyLongFunctionEx, making sure to remember to set the version flag in the options struct to the correct size of the new updated option version. nobody is sure what happens if getSomeMinorObjectEx() takes a getSomeMinorObjectParamEx option strucure that is the same size as the original getSomeMinorObjectParam struct but it would probably involve calling setSomeMinorObjectParamExParamVersion() or getObjectParamStructVersionManager()->SelectVersionEx(versionSelectParameterEx). every one is slightly different, but they are all the same vibe. if NT was actual architecture, it would definitely be "brutalist" [1] the core of NT is the antithesis of the New Jersey (Berkeley/BSD) [2] style. the problem is that all companies, both micro$oft and commercial companies trying to use it, have finite resources. the high-architect brutalist style works for VMS and NT, but only at extreme cost. the fact that it's tricky to get signals right doesn't slow most UNIX developers down, most of the time, except for when it does. and when it does, a buggy, but 80%, solution is but a wrong stackoverlflow answer away. the fact that creating a single object takes a page of code and doing anything real takes an architecture committee and a half-dozen objects that each take a page of (very boring) code, does slow everyone down, all the time. it's clear to me, just reading the code, that the MBA's running micro$oft eventually figured that out and decided, outside the really core kernel, not to adopt either the MIT/Stanford or the New Jersey/Berkeley style - instead they would go with "offshore low bidder" style for the rest of whatever else was bolted on since 1995. dave cutler probably now spends the rest of his life really irritated whenever his laptop keeps crashing because of this crap. it's not even good crap code. it's absolutely terrible; the contrast is striking. then another lesson (pay attention systemd people), is that buggy, over-complicated, user mode stuff and ancillary services like control-panel, gui, update system, etc. can sink even the best most reliable kernel. then you get to sockets, and realize that the internet was a "BIG DEAL" in the 1990s. ooof, microsoft. winsock. then you have the other, other, really giant failure. openness. open to share the actual code with the users is #1. #2 is letting them show the way and contribute. the micro$oft way was violent hatred to both ideas. oh, well. you could still be a commercial company that owns the copyright and not hide the, good or bad, code from your developers. MBAAs (MBA Assholes) strike again. [1] https://en.wikipedia.org/wiki/Brutalist_architecture https://en.wikipedia.org/wiki/Brutalist_architecture [2] https://en.wikipedia.org/wiki/Worse_is_better https://en.wikipedia.org/wiki/Worse_is_better
- rkagerer 2y agoCan we talk about NT picoprocesses? Up until this feature was added, processes in NT were quite heavyweight: new processes would get a bunch of the NT runtime libraries mapped in their address space at startup time. In a picoprocess, the process has minimal ties to the Windows architecture, and this is used to implement Linux-compatible processes in WSL 1. They sound like an extremely useful construct. Also, WSL 2 always felt like a "cheat" to me... is anyone else disappointed they went full-on VM and abandoned the original approach? Did small file performance ever get adequately addressed?
- tjoff 2y agoI'm surprised they didn't go the WSL2 route from the start. Seems much easier to do. But WSL is so cool and since I mostly run windows in VMs without nested virtualization support I've pretty much only used that one and am super thankful for it.
- torginus 2y agoHonestly, before WSL 1 was a thing, Cygwin already existed, and it was good enough for most people.
- tjoff 2y agoCygwin is capable but I feel WSL is a total game changer.
- netbsdusers 2y agoI think (but am not sure) that WSL was a consolation prize of the cancelled Project Astoria, the initiative from the dying days of Windows Phone to support running Android apps on Windows. Implementing this with virtualisation would have been more painful and less practical on the smartphones of the day.
- lproven 2y ago> Also, WSL 2 always felt like a "cheat" to me... is anyone else disappointed they went full-on VM and abandoned the original approach? Oh yes, some of us are. This was a decent look: https://jmmv.dev/2020/11/wsl-lost-potential.html https://jmmv.dev/2020/11/wsl-lost-potential.html HN discussion: https://news.ycombinator.com/item?id=25154300 https://news.ycombinator.com/item?id=25154300
- deleted 2y ago[deleted]
- chriscappuccio 2y agoWindows was great at running word processors. BSD and Linux were great as internet scale servers. It was until Microsoft tried running Hotmail on NT that they had any idea there was a problem. Microsoft used this experience to fix problms that ultimately made Windows better for all users across many use cases. All the talk here about how Windows had a better architecture into he beginning conveniently avoids the fact that windows was well known for being over-designed while delivering much less than its counterparts in the networking arena for a long time. Its not wrong to admire what windows got right, but Unix got so much right by putting attention where it was needed.
- nullindividual 2y agoLet's not forget TerraServer[0] which was in production prior to the acquisition of Hotmail (let alone the conversion from FreeBSD). [0] https://www.microsoft.com/en-us/research/publication/the-microsoft-terraserver/ https://www.microsoft.com/en-us/research/publication/the-mic...
- davidczech 2y agoNeo
- nmz 2y ago> Linux’s io_uring is a relatively recent addition that improves asynchronous I/O, but it has been a significant source of security vulnerabilities and is not in widespread use. Funny, opening the manpage of aio on freebsd you get this on the second paragraph > Asynchronous I/O operations on some file descriptor types may block an > AIO daemon indefinitely resulting in process and/or system hangs. > Operations on these file descriptor types are considered “unsafe” and > disabled by default. They can be enabled by setting the > vfs.aio.enable_unsafe sysctl node to a non-zero value. So nothing is safe.
- CoolCold 2y agothose are unsafe from different perspectives - AFAIR, io_uring just passed some/many filtering mechanics applied to other subsystems in kernel when say reading/writing files, so security frameworks could not be enforced. Something about auditd subsystem as well.
- walki 2y agoI feel like the NT kernel is in maintenance only mode and will eventually be replaced by the Linux kernel. I submitted a Windows kernel bug to Microsoft a few years ago and even though they acknowledged the bug the issue was closed as a "won't fix" because fixing the bug would require making backwards incompatible changes. Windows currently has a significant scaling issue because of its Processor Groups design, it is actually more of an ugly hack that was added to Windows 7 to support more than 64 threads. Everyone makes bad decisions when developing a kernel, the difference between the Windows NT kernel and the Linux kernel is that fundamental design flaws tend to get eventually fixed in the Linux kernel while they rarely get fixed in the Windows NT kernel.
- nullindividual 2y agoNT kernel still gets improvements. Think IoRing (copy of io_uring, but for file reads only) which is a new feature. I think things like Credential Guard, various virtualization (security-related, not VM-related) are relatively new kernel-integrated features, etc. Kernel bugs that need to exist because of backwards compat are going to continue to exist since backwards compat is a design goal of Windows.
- JackSlateur 2y agoI have the same feeling Windows is more and more based on virtualization And the other hand, more and more microsoft stuff is Linux native It would not surprise me if Linux runs every windows, somewhere far deep, in the next decades More hybridations are probably coming, but where will it stop ? And why ?
- netbsdusers 2y agoI think rumours of NT's terminal illness have been greatly exaggerated. There are numerous new developments I am hearing about from it, like the adoption of RCU and the memory partitions. It's not clear to me how processor groups inhibit scaling. It's even sensible to constrict the movement of threads willy-nilly between cores in a lot of cases (because of NUMA locality, caches, etc.) And it looks like there's an option to not confine your program to a single processor group, too.
- 2y ago
- jart 2y ago> Unified event handling: All object types have a signaled state, whose semantics are specific to each object type. For example, a process object enters the signaled state when the process exits, and a file handle object enters the signaled state when an I/O request completes. This makes it trivial to write event-driven code (ehem, async code) in userspace, as a single wait-style system call can await for a group of objects to change their state—no matter what type they are. Try to wait for I/O and process completion on a Unix system at once; it’s painful. Hahaha. Try polling stdin, a pipe, an ipv4 socket, and an ipv6 socket at the same time.
- _7acn 2y agoThe sluggishness of the system on new hardware is an accurate observation, but I think the author should also take a look at macOS or popular Linux distros, where it's significantly worse
- _7acn 2y ago„I think Apple is AmAzInG so I will downvote you”
- sebstefan 2y ago>The C language: One thing Unix systems like FreeBSD and NetBSD have fantasized about for a while is coming up with their own dialect of C to implement the kernel in a safer manner. This has never gone anywhere except, maybe, for Linux relying on GCC-only extensions. Microsoft, on the other hand, had the privilege of owning a C compiler, so they did do this with NT, which is written in Microsoft C. As an example, NT relies on Structured Exception Handling (SEH), a feature that adds try/except clauses to handle software and hardware exceptions. I wouldn’t say this is a big plus, but it’s indeed a difference. Welp, that's an unfortunate use of that capability given what we see today in language development when it comes to secondary control flows.
- deleted 2y ago[deleted]
- ssrc 2y agoI remember reading those books (ok, it was the 4.3 BSD edition instead of 4.4) alongside Bach's "The Design of the Unix Operating System" and Uresh Vahalia's "UNIX internals: the new frontiers" (1996). I recommend "UNIX internals". It's very good and not as well known as the others.
- ExoticPearTree 2y agoI have been using Windows and Linux for about 20+ years. Still remember the Linux Kernel 2.0 days and Windows NT 4. And I have to admit that I am more familiar with the Linux kernel than the Windows one. Now, that being said, I think the Windows kernel sounded better on paper, but in reality Windows was never as stable as Linux (even in it's early days) doing everyday tasks (file sharing, web/mail/dns server etc.). Even to this day, the Unix philosophy of doing one thing and doing it well stands: maybe the Linux kernel wasn't as fancy as the Windows one, but it did what it was supposed to do very well.
- torginus 2y agoWindows is way more stable than Linux when you consider the entire desktop stack. The number of crashes, and data loss bugs I've experienced when using Linux over the years constantly puts me off from using it as a daily driver
- 1970-01-01 2y agoI remember when 'Linux doesn't get viruses' was a true statement. It did things well because it wasn't nearly as popular as WinNT (because it wasn't nearly as user friendly as WinNT) and you needed an experienced administrator to get anything important running..
- deleted 2y ago[deleted]
- pseudosavant 2y agoGreat article that is largely on point. I find it funny that it ends with a bit about how the Windows UI might kill off the Windows OS. Predicting the imminent demise of Windows is as common, and accurate, of a take as saying this is the year of Linux on the desktop or that Linux takes over PC gaming.
- Ericson2314 2y agoI am 1/3 of the way through this, and it doesn't I am afraid seem like a very good breakdown. For example. - Portability. Who cares, even in the 1990s, NetBSD is a thing. We've known learned that portability across conventional-ish hardware doesn't actually affect OS design in vary Overall, the author is taking jargon / marketing terms too much at face value. In many cases, Windows and Unix will use different terms to describe the same things, or we have terms like "object-oriented kernel" that, by default, I assume don't actually mean anything: "object oriented" was too popular and adjective in the 1990s to be trusted. - "NT doesn’t have signals in the traditional Unix sense. What it does have, however, are alerts, and these can be kernel mode and user mode." Topic sentence should not start with the names of things. It is extraneous. My prior understanding is that NT is actually better in many ways, but I don't feel like I am any closer to learning why.
- pavlov 2y ago> ‘we have terms like "object-oriented kernel" that, by default, I assume don't actually mean anything’ The author did explain what it specifically means in the context of the NT kernel: centralized access control, common identity, and unified event handling.
- gunapologist99 2y agoExcellent article. The admittedly abbreviated history unfortunately completely missed the shared (and contentious) history between IBM's 16- and 32-bit OS/2 in the run-up to 32-bit Windows NT.
- btbuilder 2y agoinput_string = "VMS" output_string = ''.join([chr(ord(char) + 1) for char in input_string]) print(output_string)
- pid1wow 2y agoThey say Windows has a more advanced security system, but what does that actually mean in practice? Okay, it has everything is an object, then you can just set permissions on objects. Okay, the OS just has to check if you have permission to an object before you access that object. What if there are just a billion objects and you can't tell which ones need which permission, as an administrator. I couldn't tell if this example actually exists from the article as it only talks abstractly about the subject. But Windows security stuff just sounds like a typical convoluted system that never worked. This is probably one of the one places where UN*X is better off, not that it's any good since it doesn't support any use case other than separating the web server process from the DNS server process, but that it's very simple. What if the objects do not describe the items I need to protect in sufficient detail? How many privilege escalation / lateral movement vulns were there in Windows vs any UN*X?
- methods21 2y agoAt the time, NT being able to run on multiple architectures (e.g Alpha), was rather impressive esp. at the time. Believe this was based from a lot of the knowledge of the former DEC team working on NT. Reading the comments here, esp. about drivers, it makes me now think how much engineering went towards this and perhaps the limitations around the driver architecture, that could have been put towards a stronger driver design AND hot add of certain SW, as I probably lost a year of my life waiting on NT reboots.