top | item 37182616

(no title)

everial | 2 years ago

> The kernel team is absolutely top tier. The kernel itself is of much higher quality than what you'd find on Linux, or MacOS.

Have recommended sources for this or learning more? My experience with Windows doesn't match this at all, though from my perspective it's hard to tell if it's kernel as opposed to any of the layers above it.

discuss

order

PaulHoule|2 years ago

Notably Microsoft does not document an API to the kernel, the official userspace interface in Windows is the DLLs they provide. In that since, Wine, which provides DLLs that implement the same interface over the Linux kernel is conforming to the way windows works, and Cygwin, which provided a POSIX-like libc that ran on the Windows kernel is a Windows-centric way to implement POSIX.

(That said, the path of WSL 1, which emulated the Linux syscall interface on Windows, takes advantage of the idea Windows NT had from the very beginning which was implementing "personalities" that could pretend to be other OS, such as the original plan for Windows NT to be OS/2 compatible.)

acomjean|2 years ago

Windows was kinda a wreck till “windows NT” they brought in David Cutler who did Vax/VMS to help architect it. It was pretty amazing the transition from 95/95/me/vista to windowsNT/2000/XP. They put my old operating systems book appendixes online which have details about windows 2000 (Mach and bsd are the other os covered)

https://bcs.wiley.com/he-bcs/Books?action=resource&itemId=04...

Check out appendix C for details on windows 2000 architecture or this which should link to the pdf.

https://higheredbcs.wiley.com/legacy/college/silberschatz/04...

Dalewyn|2 years ago

>the transition from 95/95/me/vista to windowsNT/2000/XP.

Windows Vista is part of the Windows NT lineage, specifically NT 6.0.

ohgodplsno|2 years ago

There's an absurd number of components to the Windows Kernel, so here's a kind of disjointed list of various things, from different time frames.

Windows Research Kernel - https://github.com/HighSchoolSoftwareClub/Windows-Research-K... - More or less Windows XP

I/O Completion ports - https://learn.microsoft.com/en-us/windows/win32/fileio/i-o-c... - io_uring, but mostly better, since NT 3.5

General architecture info: https://en.wikipedia.org/wiki/Architecture_of_Windows_NT

A bunch of things you'll find in Windows Internals, which is pretty much the bible for Windows (https://empyreal96.github.io/nt-info-depot/Windows-Internals..., or buy it online. Mark Russinovich is a treasure trove of Windows knowledge)

The various Windows subsystems - Windows is built from the start to be able to impersonate other OSes. While the most obvious one is WSL (despite WSL2 being just a VM), there's an OS/2 Subsystem, a POSIX Subsystem, a Win32 subsystem...

Very few things actually run in kernel mode. There exists a almost-kernel-but-not-quite mode called executive mode, which is a much better option than Linux's all or nothing user-or-kernel (and, as far as I know, Mach has the same problem)

NT is a hybrid kernel: not quite monolithic, not quite micro. This allows Windows to do things like swapping your video drivers live as it's running, unlike Linux and Mach which would miserably crash. Hell, it can even recover from a video driver crash and restart it safely, and all you'll see is a few seconds of black screen.

The breadth of devices it supports is absolutely breathtaking. (well, in part because they very much have a hand in forcing manufacturers to respect the standards that they write)

All of Sysinternals (Mark Russinovich's work, again) is also an amazing resource: https://learn.microsoft.com/en-us/sysinternals/

Now, mind you, this is purely about technical merits: the NT Kernel is a miracle of technology. The APIs it exposes, and that most Microsoft products expose are downright batshit insane sometimes. But that's also what happens when you support 35 years of software. Also, the HANDLE pattern that most Win32 API uses is the superior alternative to dumb pointers (https://floooh.github.io/2018/06/17/handles-vs-pointers.html)

Oh and a bunch of The Old New Things articles, but I can't be arsed to look them up right now, sorry.

tester756|2 years ago

That's great collection of things

Maybe it will open eyes for people who for some reason acted as if Windows internals were some outdated tech mess just because Windows did some questionable choices when it comes to UI/UX

User23|2 years ago

As an historical aside, I’m 99% sure that the handle pattern had its origins in the 68k Mac system software. It is pretty cool to give the OS liberty to move your memory around at will without breaking behavior.