News for hackers. Stuff that matters.
Re:Windows NT vs. Unix: A design comparison by apatheticonion on Monday September 09, 2024 @06:57PM (#41495162)
My understanding is that the portion of revenue Microsoft makes from Windows these days is nearly negligible (under 10%). Both XBox and Office individually make more money for Microsoft than Windows, which indicates that they don't have a compelling incentive to improve it technically. This would explain their infatuation with value extraction initiatives like ads in Explorer and Recall.

My understanding is that the main thing keeping Windows relevant is the support for legacy software, so they'd be hesitant to jeopardize that with any bold changes to the kernel or system APIs.

That said. Given my imagined cost of maintaining a kernel plus my small, idiolistic, naive world view; I'd love if it Microsoft simply abandoned NT and threw their weight behind the Linux kernel (or if GNU is too restrictive, BSD or alternatively write their own POSIX compliant kernel like MacOS).

Linux would be ideal given its features; containers, support for Android apps without emulation, abundance of supported devices, helpful system capabilities like UNIX sockets (I know they started to made progress there but they abandoned further development), and support for things like ROCm (which only works on Linux right now).

Microsoft could build Windows on top of that POSIX kernel and provide a compatibility layer for NT calls and Win32 APIs. I don't even care if it's open source.

The biggest value for me is development capabilities (my day job is writing a performance sensitive application that needs to run cross-platform and Windows is a constant thorn in my side).

Cygwin, msys2/git-bash are all fantastic but they are no replacement for the kind of development experience you get on Linux & MacOS.

WSL1 was a great start and gave me hope, but is now abandonware.

WSL2 is a joke, if I wanted to run Linux in a VM, I'd run Linux in a VM.

I guess a less extreme option would be for Microsoft to extend NT to be POSIX compliant - If I could target unix syscalls during development and produce binaries that worked on Windows, I supposed I'd be happy with that.

Re:Windows NT vs. Unix: A design comparison by delta_p_delta_x on Monday September 09, 2024 @07:14PM (#41495313)
> I'd love if it Microsoft simply abandoned NT and threw their weight behind the Linux kernel

I don't understand why people keep repeating this wish, rather than the arguably better, more competitive option: open-source the NT and Windows codebase, prepare an 'OpenWindows' (nice pun there, really) release, and simultaneously support enterprise customers with paid support licences, like places like Red Hat currently do.

> Cygwin, msys2/git-bash are all fantastic but they are no replacement for the kind of development experience you get on Linux & MacOS.

I couldn't disagree more. As someone who comes from a mostly-Windows pedigree, UNIX is... pretty backwards, and I look upon any attempt to shoehorn UNIX-on-Windows with a fair bit of disapproval, even if I concede that their individual developers and maintainers have done a decent job. Visual Studio (not Code) is a massively superior development and debugging tool to anything that the Unix crowd have cooked up (gdb? perf? Tell me when you can get flame graphs in one click).

Re:Windows NT vs. Unix: A design comparison by EvanAnderson on Monday September 09, 2024 @07:41PM (#41495532)
I have a fever dream vision of a "distribution" of an open source NT running in text mode with a resurrected Interix. Service Control Manager instead of systemd, NTFS (with ACLs and compression and encryption!), the registry, compatibility with scads of hardware drivers. It would be so much fun!
Re:Windows NT vs. Unix: A design comparison by ruthmarx on Tuesday September 10, 2024 @04:08AM (#41498392)
Isn't ReactOS close enough?
Re:Windows NT vs. Unix: A design comparison by EvanAnderson on Tuesday September 10, 2024 @12:34PM (#41502662)
I've kept meaning to look at ReactOS and put it off again and again. I felt Windows Server 2003 was "peak Windows" before Windows 7 so I'd imagine I'd probably like ReactOS.
Re:Windows NT vs. Unix: A design comparison by cherryteastain on Monday September 09, 2024 @07:25PM (#41495407)
> open-source the NT and Windows codebase

May be very difficult or impossible if the Windows codebase has third-party IP (e.g. for hardware compatibility) with restrictive licensing

Re:Windows NT vs. Unix: A design comparison by jen20 on Monday September 09, 2024 @08:41PM (#41495960)
Sun managed it with Solaris (before Oracle undid that work) - indeed they had to create a license which didn't cause problems with the third party components (the CDDL).
Re:Windows NT vs. Unix: A design comparison by p_l on Tuesday September 10, 2024 @03:57AM (#41498300)
The license happened less about third party components (GPLv2 would have worked for that, too, even if it's less understood area), but because GPLv3 was late, Sun wanted patent clause in license, and AFAIK engineers rebelled against licensing that would have prevented BSDs (or other) from using the code.

(For those who still believe "CDDL was designed to be incompatible with GPL", the same issues show up when trying to mix GPLv2 and GPLv3 code if you can't relicense the former to v3)

Re:Windows NT vs. Unix: A design comparison by apatheticonion on Monday September 09, 2024 @08:30PM (#41495892)
That's an interesting idea. Some thoughts come to mind:

- The relatively low revenue of Windows for Microsoft means that they have the potential opportunity of increasing Windows profitability by dropping the engineering costs associated with NT (though on the flipside, they'd acquire the engineering cost of developing Linux).

- Open sourcing NT would likely see a majority of it ported into Linux compatibility layers which would enable competitors (not that this is bad for us as consumers, it's just not good for business)

- Adopting the Linux kernel and writing a closed source NT compatibility layer, init system, and closed source desktop environment means that the "desktop" and Microsoft aspects of the OS could be retained as private IP - which is the part that they could charge for. I know I'd certainly pay for a Linux distribution that has a well made DE.

> UNIX is... pretty backwards,

I honestly agree. Many of the APIs show their age and, in the age of high level languages, it's frustrating to read C docs to understand function signatures/semantics. It's certainly not ergonomic - though that's not to say there isn't room to innovate here.

Ultimately, I value sameness. Aside from ergonomics, NT doesn't offer _more_ than POSIX and language bindings take care of the ergonomics issues with unix, so in many ways I'd argue that NT offers less.

> Visual Studio (not Code) is a massively superior development and debugging too [...] Tell me when you can get flame graphs in one click

Just because the tooling isn't as nice to use now doesn't mean that Microsoft couldn't make it better (and charge for that) if they adopted Linux. This isn't something entirely contingent on the kernel.

Re:Windows NT vs. Unix: A design comparison by delta_p_delta_x on Monday September 09, 2024 @08:54PM (#41496054)
I don't see why everything has to be Linux (which I will continue to maintain has neither the better kernel- nor user-mode).

Windows and NT have their own strengths as detailed in the very article that this thread links to. When open-sourced they could develop entirely independently, and it is good to have reasonable competition. Porting NT and the Windows shell to the Linux kernel for porting's sake could easily take years, which is wasted time and effort on satisfying someone's not-invented-here syndrome. It will mean throwing away 30+ years of hardware and software backward compatibility just to satisfy an imperfect and impractical ideal.

For perspective: something like WINE still can't run many Office programs. The vast majority of its development in recent years has been focused on getting video games to work by porting Direct3D to Vulkan (which is comparatively straightforward because most GPUs have only a single device API that both graphics APIs expose, and also given the fact that both D3D and Vulkan shader code compile to SPIR-V). Office programs are the bread and butter of Windows users. The OpenOffice equivalents are barely shadows of MS Office. To be sure, they're admirable efforts, but that only gets the developers pats on the back.

Re:Windows NT vs. Unix: A design comparison by jen20 on Monday September 09, 2024 @08:39PM (#41495947)
> Visual Studio (not Code) is a massively superior development and debugging tool to anything that the Unix crowd have cooked up (gdb? perf? Tell me when you can get flame graphs in one click).

Hard disagree on the development aspect of VS, which (last time I used it, in 2015) couldn't even keep up with my fairly slow typing speed.

The debugging tools are excellent, but they are certainly not any more excellent than those in Instruments on macOS (which is largely backed by DTrace).

Re:Windows NT vs. Unix: A design comparison by pathartl on Monday September 09, 2024 @08:51PM (#41496026)
VS2022 is actually pretty damn slick. I use it on the daily and it's much more stable than any previous version. It's still not as fast as a text editor (I _do_ miss Sublime's efficiency), but even going back to 2019 is extremely hard.
Re:Windows NT vs. Unix: A design comparison by Timwi on Tuesday September 10, 2024 @04:37AM (#41498567)
2015 is 9 years ago. We shouldn't keep comparing Windows/Microsoft software from that long ago with modern alternatives on Linux and Mac.

That said, I agree that Visual Studio was extremely slow and clunky in the first half of the 2010s.

Re:Windows NT vs. Unix: A design comparison by jen20 on Tuesday September 10, 2024 @09:37AM (#41500631)
I didn’t compare it with a modern alternative. I compared its debugging tools of Instruments of the same vintage, and pointed it out that last time I tried VS it couldn’t keep up with basic typing.
Re:Windows NT vs. Unix: A design comparison by Dalewyn on Tuesday September 10, 2024 @09:48AM (#41500731)
NT 10.0 hails from 2015 (Windows 10) and was re-released in 2021 (Windows 11).
Re:Windows NT vs. Unix: A design comparison by juunpp on Monday September 09, 2024 @09:08PM (#41496162)
> Visual Studio (not Code) is a massively superior development and debugging tool to anything that the Unix crowd have cooked up (gdb? perf?)

VS is dogshit full of bloat and a UI that takes a PhD to navigate. CLion and QTCreator embed gdb/lldb and do the debugging just fine. perf also gets you more system metrics than Visual Studio does; the click vs CLI workflow is mostly just workflow preference. But if you're going to do a UI, at least don't do it the way VS does.

Re:Windows NT vs. Unix: A design comparison by dajtxx on Tuesday September 10, 2024 @02:21AM (#41497728)
I can imagine the effort of open source Windows would be prohibitive.

Having to go through every source file to ensure there is nothing to cause offense in there; there may be licensed things they'd have to remove; optionally make it buildable outside of their own environment...

Or there may be just plain embarrassing code in there they don't feel the need to let outsiders see, and they don't want to spend the time to check. But you can be sure a very small group of nerds will be waiting to go through it and shout about some crappy thing they found.

Re:Windows NT vs. Unix: A design comparison by dijit on Tuesday September 10, 2024 @03:29AM (#41498129)
I'd venture that even more nerds would go through it and fix their specific problems.

It's always been quite clear that FOSS projects that have sufficient traction are the pinnicle of getting something polished. No matter how architecturally flawed or no matter how bad the design is: many eyes seem to make light work of all edge cases over time.

On the other hand, FOSS projects tend to lack the might of a large business to hit a particular business case or criticality, at least in the short term.

Open sourcing is probably impossible for the same reasons open sourcing Solaris was really difficult. The issues that were affecting solaris affect Windows at least two orders of magnitude harder.

It's the smart play, though they'd lose huge revenues from Servers that are locked in... but otherwise, Windows is a dying operating system, it's not the captive audience it once was as many people are moving to web-apps, games are slowly leaving the platform and it's hanging on mostly due to inertia. The user hostile moves are not helping to slow the decline either.

Re:Windows NT vs. Unix: A design comparison by EvanAnderson on Monday September 09, 2024 @07:10PM (#41495281)
> I guess a less extreme option would be for Microsoft to extend NT to be POSIX compliant...

Microsoft had this and abandoned it. I was building GNU software on NT in 2000 under Interix. It became Services for Unix and then was finally abandoned.

Re:Windows NT vs. Unix: A design comparison by lproven on Tuesday September 10, 2024 @05:12AM (#41498809)
> was finally abandoned.

Was finally _replaced_ by WSL.

Re:Windows NT vs. Unix: A design comparison by pxc on Tuesday September 10, 2024 @08:24AM (#41500039)
By WSL1. But WSL2 is a VM running a Linux kernel, not POSIX compatibility for Windows.

There's still all kinds of pain and werodness surrounding the filesystem boundary with WSL2. And contemporary Windows still has lots of inconsistency when trying to use Unix-style paths (which sometimes work natively and sometimes don't), and Unix-y Windows apps are still either really slow or full of hacks to get semi-decent performance. Often that's about Unix or Linux expectations like stat or fork, but sometimes other stuff (see for instance, Scoop's shim executable system that it uses to get around Windows taking ages to launch programs when PATH is long).

WSL2 also just isn't a real substitute for many applications. For instance, I'd like to be able to use Nix to easily build and install native Windows software via native toolchains on Windows machines at work. You can't do such a thing with WSL2. For that you need someone who actually knows Windows to do a Windows port, and by all reports that is very different from doing a port to a Unix operating system.

Idk if what people are asking for when they say 'POSIX compliant' with respect to Windows really has much to do with the POSIX standard (and frankly I don't think that matters). But they're definitely asking for something intelligible and real that Windows absolutely lacks.

Re:Windows NT vs. Unix: A design comparison by EvanAnderson on Tuesday September 10, 2024 @09:11AM (#41500458)
> But they're definitely asking for something intelligible and real that Windows absolutely lacks.

Interix was what Windows lacks, but it was abandoned. It wasn't a Linux compatibility layer like WSL1 (or just a gussied-up Linux VM like WSL2). It was a freestanding implementation of POSIX and building portable software for it was not unlike building software portable to various *nixes. GNU autotools had a target for it. I built software from source (including upgrading the GCC it shipped with).

It was much more elegant than WSL and was built in the spirit of the architecture of NT.

Re:Windows NT vs. Unix: A design comparison by RiverCrochet on Tuesday September 10, 2024 @10:03AM (#41500879)
IIRC Interix was a separate "subsystem" in the Windows API model - psxss.exe, with Win32 covered by csrss.exe and believe it or not there was an OS2 one.
Re:Windows NT vs. Unix: A design comparison by pxc on Tuesday September 10, 2024 @10:46AM (#41501333)
What does it say about the practical usefulness of this Windows facility that MS has, it seems, never maintained one of these 'personalities' long-term?
Re:Windows NT vs. Unix: A design comparison by EvanAnderson on Tuesday September 10, 2024 @12:36PM (#41502689)
I think it's probably business case and revenue potential, not practical usefulness. I felt like Interix was plenty useful but probably couldn't earn its keep. I think that pluggable personalities even exists in NT speaks to the general Microsoft embrace / extend / extinguish methodology. They were a means to an end to win contracts.
Re:Windows NT vs. Unix: A design comparison by RiverCrochet on Tuesday September 10, 2024 @04:22PM (#41505092)
There was a lot in the air in the early 90's when Windows NT was born - it wasn't a given that Windows, Intel, or heck even TCP/IP were going to be the tech mainstays they are today. So the whole "subsystem" thing is part of some seriously good long term strategic planning, though you know it was defintely to have one foot out of the door if their partnership with IBM went south, which it did.
Re:Windows NT vs. Unix: A design comparison by lproven on Wednesday September 11, 2024 @01:21PM (#41513427)
> What does it say about the practical usefulness of this Windows facility that MS has, it seems, never maintained one of these 'personalities' long-term?

I am no defender of MICROS~1 but I think this is a misrepresentation.

1. Win32 is an NT personality and it is still actively maintained after 31 years.

2. Win16 ran on NTVDM which arguably is tantamount to a personality, and that is still present and works in Windows 10 32-bit today.

3. Downvotes or not, I stand by my point: the original POSIX personality became Windows Services for Unix, which went through 4 releases: 1.0, 2.0, 3.0, and 3.5.

https://en.wikipedia.org/wiki/Windows_Services_for_UNIX

V2 was effectively replaced by Interix.

But WSU was effectively a proprietary x86-32 Unix. Those are all dead and gone now, Xinuos notwithstanding, and having such a tool is no use in C21.

So, it was axed 20Y ago. 12Y later it was replaced by WSL.

WSL 1 was replaced by WSL2, and I mourn its lost potential. I feel WSL1 should have become a proper NT personality, which would have resulted in some improvements to Windows' capabilities.

Re:Windows NT vs. Unix: A design comparison by pxc on Wednesday September 11, 2024 @03:20PM (#41514501)
My question was genuine, not just rhetorical. I appreciate the additional context here, especially that Win32 is implemented as a long-lived NT personality. It's indeed a bummer that Microsoft didn't see it as expedient to maintain the others or continue to grow WSL1.

Windows Services for Unix was also longer-lived than I'd realized. Was that just before its time or did it have some other problem?

Re:Windows NT vs. Unix: A design comparison by 486sx33 on Monday September 09, 2024 @07:38PM (#41495517)
Pulling WSL from windows 10 was particularly nasty
Re:Windows NT vs. Unix: A design comparison by therein on Monday September 09, 2024 @07:30PM (#41495446)
> Cygwin, msys2/git-bash are all fantastic but they are no replacement for the kind of development experience you get on Linux & MacOS.

> WSL1 was a great start and gave me hope, but is now abandonware.

Exactly my thoughts. I really admired the design and how far WSL1 got. It is just sad to see it abandoned.

> WSL2 is a joke, if I wanted to run Linux in a VM, I'd run Linux in a VM.

I couldn't have said it better. If I wanted to run Linux in a VM, I'd run Linux in a VM, why are we pretending something special is going on.

Re:Windows NT vs. Unix: A design comparison by wkat4242 on Monday September 09, 2024 @08:56PM (#41496078)
Yes WSL1 was really special. Talking to the NT kernel from a Linux environment.

I think it was mainly the docker crowd that kept asking for compatibility there :(

Re:Windows NT vs. Unix: A design comparison by pxc on Tuesday September 10, 2024 @08:43AM (#41500177)
Microsoft could have implementes the Docker API as part of WSL1 instead of loading up a real Linux kernel for it. That's how LX Zones on Illumos work for running Docker containers on non-Linux without hardware virtualization.

I'm sure it's tricky and hard (just like WSL1 and WINE are tricky and hard), but we know it's at least possible because that kind of thing has been done.

Re:Windows NT vs. Unix: A design comparison by michalf6 on Tuesday September 10, 2024 @10:04AM (#41500894)
>Exactly my thoughts. I really admired the design and how far WSL1 got. It is just sad to see it abandoned.

But why was it better, other than aesthetic preference?

Re:Windows NT vs. Unix: A design comparison by shiroiushi on Monday September 09, 2024 @10:02PM (#41496458)
>threw their weight behind the Linux kernel (or if GNU is too restrictive

The GPL isn't too restrictive. Google has no issue with it on Android (which uses a modified Linux kernel). GPL doesn't mean you have to open-source everything, just the GPL components, which in the case of the Linux kernel, is just the kernel itself. MS already contributes a bunch of drivers (for their hypervisor) to the Linux kernel. They could easily make a Linux-based OS with their own proprietary crap on top if they wanted to.

>support for Android apps without emulation

They wouldn't need CPU-level emulation, but the API would need some kind of compatibility layer, similar to how WINE serves this purpose for Windows applications on Linux.

>Microsoft could build Windows on top of that POSIX kernel and provide a compatibility layer for NT calls and Win32 APIs.

They don't need to: they can just use WINE. They could improve that, or maybe fork it and add some proprietary parts like CodeWeavers does, or they could even just buy out CodeWeavers.

Re:Windows NT vs. Unix: A design comparison by SideQuark on Monday September 09, 2024 @10:38PM (#41496657)
20+B annually is not “nearly negligible.” That’s more revenue than all but 3 other software companies: oracle 46B, SAP $33B, and salesforce 430B. It’s more annual revenue than Adobe and every other software company.
Re:Windows NT vs. Unix: A design comparison by PeterStuer on Tuesday September 10, 2024 @03:26AM (#41498109)
In Microsoft's perfect world your local machines would just be lightweight terminals to their Azure mainframe.
Re:Windows NT vs. Unix: A design comparison by alt227 on Tuesday September 10, 2024 @04:29AM (#41498521)
This is coming. IMO in 20 years this will be how all devices, including phones, work.
Re:Windows NT vs. Unix: A design comparison by alternatex on Tuesday September 10, 2024 @04:59AM (#41498728)
Without massive (exponential) battery/efficiency improvements it won't happen. Networking isn't something you can magically wave away. It has a cost.
Re:Windows NT vs. Unix: A design comparison by alt227 on Tuesday September 10, 2024 @05:10AM (#41498792)
Yes but by removing pretty much all processing on the end device and making it a thin client, you can extend battery life exponentially.
Re:Windows NT vs. Unix: A design comparison by pxc on Tuesday September 10, 2024 @08:36AM (#41500127)
Is it actually the case that local computation on mobile devices is much more expensive than running the radios? I was just the impression that peripherals like the speakers, real radios, and display often burn up much more power than local manipulation of bits.
Re:Windows NT vs. Unix: A design comparison by alt227 on Friday September 13, 2024 @07:06AM (#41530019)
You are definitely correct ni that the screen takes a bit chunk of the power, but it is my understanding that the cpu is taking the most. This is why you cannot run x86 systems on battery power very efficiently.

Look at it this way. Older laptops on x86 have the same screens as the newer arm based laptops, but the arm laptops have significantly more battery life using the same battery tech. This is definitely a sign that the processor is the biggest user of power in the system.

Re:Windows NT vs. Unix: A design comparison by cesarb on Tuesday September 10, 2024 @10:12AM (#41500970)
You'd need massive networking improvements too. Telling someone "try next to the stairs, the cellular signal's better there" is an example I saw yesterday (it was a basement level), and that's not uncommon in my experience. You have both obstacles (underground levels, tunnels, urban canyons, extra thick walls, underwater) and distance (large expanses with no signal in the middle of nowhere); satellites help with the later but not with the former. Local computing with no network dependencies works everywhere, as long as you have power.
Re:Windows NT vs. Unix: A design comparison by Lammy on Tuesday September 10, 2024 @03:14PM (#41504426)
Eventually all devices will be powered continuously via radio illumination by The Network itself, more like The Thing than like today's wireless charging <https://en.wikipedia.org/wiki/The_Thing_(listening_device)>
Re:Windows NT vs. Unix: A design comparison by pjmlp on Tuesday September 10, 2024 @07:08AM (#41499540)
Catching up with Google's Chromebook, so worshiped around here.
Re:Windows NT vs. Unix: A design comparison by PeterStuer on Tuesday September 10, 2024 @03:29AM (#41498134)
"I guess a less extreme option would be for Microsoft to extend NT to be POSIX compliant"

Their was a time MS sales posted NT to be more POSIX compatible than UNIXes.

Re:Windows NT vs. Unix: A design comparison by ruthmarx on Tuesday September 10, 2024 @04:03AM (#41498351)
> I'd love if it Microsoft simply abandoned NT and threw their weight behind the Linux kernel

Oh hell no!

Diversity in operating systems is important, and the NT architecture has several advantages over the Linux approach. I definitely don't want just one kernel reigning supreme, not yet at least - although that is probably inevitable.

Re:Windows NT vs. Unix: A design comparison by 7bit on Tuesday September 10, 2024 @04:25AM (#41498495)
> My understanding is that the main thing keeping Windows relevant is the support for legacy software, so they'd be hesitant to jeopardize that with any bold changes to the kernel or system APIs.

Without Windows, there would be no platform to sell office (macOS aside). That as a side note.

The important piece you are missing is this: The entirety of Azure runs on an optimized Variant of Hyper-V, hence all of Azure runs on Windows. That is SUBSTANTIAL!

Re:Windows NT vs. Unix: A design comparison by lproven on Tuesday September 10, 2024 @05:11AM (#41498799)
> I'd love if it Microsoft simply abandoned NT and threw their weight behind the Linux kernel

This entire article is an elegant argument why this would be a terrible idea. Didn't you RTFA?

> I guess a less extreme option would be for Microsoft to extend NT to be POSIX compliant

Way to expose and highlight your ignorance. :-( NT 3.1, the first release, was POSIX compliant in 1993, and every release since has been.