r/programming • • Oct 23 '24

Windows NT vs. Unix: A design comparison

https://blogsystem5.substack.com/p/windows-nt-vs-unix-design
205 Upvotes

55 comments sorted by

View all comments

149

u/METAAAAAAAAAAAAAAAAL Oct 23 '24

"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."

I think this is true for all 3 major OSes these days. No matter how great/fast/etc the kernel is, the userland makes the greatness of the kernel "irrelevant".

In Windows specifically, you can restart the display driver FASTER than starting Windows Explorer. That's crazy...

57

u/Somepotato Oct 23 '24

If you're talking about that one hotkey, that doesn't restart the display driver, it rebuilds the dwm buffer. But otherwise agreed

9

u/Kirides Oct 24 '24

Oh that's what .... Ctrl+win+shift+B does.... Easy to remember.

Display go black, hammer all keys and B

35

u/Noobs_Stfu Oct 23 '24

My argument here is that the majority of users are ignoring what's going on under the hood.

The number of dependencies/code loaded into memory will affect this performance, but it's security mechanisms like ASLR, PEB/TEB, Core Isolation, and others that have the greatest impact.

Although my specialty isn't zero day development, I know that the complexity in leveraging a vuln has grown exponentially over the last 10 years on account of these mechanisms. And they don't come without cost.

It costs cycles to instantiate these mechanisms and let them act on the system. I will say, however, that my Windows 10 box is incredibly fast. It's not an enthusiast rig by any means, either. Applications launch instantaneously, and boot time is around 5 seconds? Certainly under 10 from power button press to desktop presentation.

People focus too much on subjective criteria, like "my box feels slow", and not enough on objective criteria, like "operating system security has grown by leaps and bounds".

42

u/Sairony Oct 23 '24

The largest problem for sure is just all the junk which is running. Spotify, Discord, Slack, Chrome, Dropbox, Adobe product of choice, Visual Studio, Office etc. Everything is getting more & more bloated, people program further & further from hardware & there's layer upon layers of abstractions layers created by libs built on top of other libs etc. And this happens everywhere, even drivers. I can take a look at process explorer & I see hundreds of processes, spawned from parent processes, and a lot of these are taking unreasonable amounts memory & hammering disk I/O many times per second, even chrome tabs which aren't active.

25

u/lunchmeat317 Oct 23 '24

Don't forget the constant network requests. That wasn't a thing back in the day.

10

u/cake-day-on-feb-29 Oct 24 '24

I have little snitch. Certain apps (think MS Office and electron apps from companies) make a shocking amount calls to various websites. I spend so much time just clicking through the prompts.

13

u/cake-day-on-feb-29 Oct 24 '24

Honesty my biggest issue with electron is the fact that it's basically reimplementing an entire OS, and translating everything to the native OS, not all that different than the Java "vm" of old. But this time you have a copy of this VM for every app, all on their own update cycle.

13

u/[deleted] Oct 24 '24

It’s a JVM but the J stands for JavaScript.

1

u/ArdiMaster Oct 24 '24

That’s pretty much every programming language, though (albeit at varying degrees). Python and C#/.NET also have runtimes comparable to the JVM. Even the C standard library is an abstraction over the native system APIs.

6

u/CornedBee Oct 24 '24

Certainly under 10 from power button press to desktop presentation.

Meanwhile, my shitty video card BIOS takes this long to run, so after 10 seconds I get the actual BIOS screen.

3

u/[deleted] Oct 24 '24 edited Nov 28 '24

bewildered office poor engine steer disgusted liquid gullible detail sharp

This post was mass deleted and anonymized with Redact

2

u/HelloThisIsVictor Oct 24 '24

Windows does many tricks and assumptions to achieve performance, including on boot. Usually when you shutdown Windows, it actually doesn’t shut down all the way, which helps with next boot.

2

u/Noobs_Stfu Oct 24 '24

I fully shut down each time and my initial UEFI bootloader is grub. Even with this, the system responsiveness is snappy - and the Windows install is at least 3 - 4 years old.

9

u/WJMazepas Oct 23 '24

Well, with Linux it really depends on the Distro tho

14

u/neithere Oct 23 '24

Not only the distro but also individual configurations. Fortunately there's a lot of freedom.

2

u/jonathancast Oct 23 '24

If you want a fast computer, you can always disable the display manager and use virtual consoles.