But the OS should be as lean as possible because the entire reason is to run other programs.
But the OS should be as lean as possible because the entire reason is to run other programs.
That's why there's no accurate 1:1 comparison between operating systems. Windows, MacOS, and LInux will treat physical memory very differently bot at idle, and during heavy use.
Sure, Win 11 has a lot of bloat and poorly coded Web apps that should be removed or rewritten in native, but the kernel is still top notch at managing even limited memory and handling OOM cases.
You have to remember the Win (and MacOS) kernel is tuned to consumer desktop user use cases, while Linux kernel is tuned to server/DC use-cases.
That's why ~15 years ago when I was in uni, you'd get audio stutter when playing music/movies of spinning rust on linux while torrenting file on the same HDD, and not on Windows/MacOS, due to different queuing algorithms used thet prioritised audio decoding tasks over everything else, which Linux kernel out of the box didn't, unless you tinkered and changed it.
I don’t mind the kernel doing kernel things. The issue is system services and other software that are either unnecessary or badly coded. You can’t disable them because of “reasons” and they’re just wasting your time and your electricity.
That depends on the distro / flavor of kernel; the Linux kernel is pretty flexible and you can cut it however you want. If you use a distro like CachyOS for example, you'll find that they use a kernel tuned for desktop use-case, so you don't need to tinker with anything.
In my mind Classic Mac OS (minus its design issues) is the ideal to strive for here.
It was barely even an OS and more like a substrate for GUI applications to run on top of. Even “essentials” like networking and USB support were implemented by way of extensions which could be disabled at will. If you disabled all extensions you’d get something resembling a full color version of the original 1985 System 1.0 that took almost no resources. This was great for squeezing out every last drop for things like games and emulators.
The surface area of stuff that an OS has to do today is absolutely massive, and the dependency graphs are poorly understood even by the engineers who work on those systems. Innocuous pieces of functionality have a way of becoming load-bearing over time.
If you ran around disabling random bits of functionality in Windows because you wanted to reclaim some resources for your games, you'd probably wedge the OS, cause random crashes, and prevent your games from even launching. Like you might think "Well my game doesn't need Bluetooth, I only use a wired controller!" but I would not be surprised at all if yanking out the Bluetooth stack from the OS caused random crashes and hangs.
Windows almost categorically can’t because it’s only ever been developed organically and is pathologically backwards compatible, which keeps it forever tied to past design decisions.
Linux could get a much closer but is hamstrung by monolithic kernel design which puts more functionality there.
You’d need a clean sheet design which positions most subsystems as discrete components.
The nice thing about classic Mac OS is that its modularity was more accessible. All one had to be capable of to pare down or customize their install was move files in or out of /System Folder/Extensions/ and /System Folder/Control Panels/. I'd like to see a Linux desktop distribution that works that way.
It’s not that huge. I use OpenBSD and the code is surprisingly approachable and readable. And even with no support for runtime modules, it’s pretty easy to customize and strip out whole features. Current complexity in something like linux is stretching the subsystems to support a huge array of use cases.
Why though? The OS should be the layer between hardware and applications/the user. Provide a GUI SDK+toolkit and a firewall. The OS should be responsible for a dozen different cloud sync bs things that I play whack-a-mole to disable anyway.