News for hackers. Stuff that matters.
Re:Satya Nadella just fixed Microsoft’s biggest problem by drinchev on Friday July 15, 2016 @05:17AM (#12099726)
I was a Windows user for a long time.

5 years ago I switched to OS X, because I think it's closer to the deployment environment I use as a dev.

However what OS X did ( when they killed the old one - MacOS 9 and rewrote the whole thing on UNIX based kernel ) was the single greatest move, which I think pays off even these days.

This is what I hope should happen with Windows. They should decide on POSIX kernel and completely rewrite most of it. This will put Windows as an option for me.

Re:Satya Nadella just fixed Microsoft’s biggest problem by orf on Friday July 15, 2016 @05:48AM (#12099818)
Suggesting a rewrite of something as important as the NT kernel is ignorant at best.

I think Bash on Windows is a great compromise.

Re:Satya Nadella just fixed Microsoft’s biggest problem by Gravityloss on Friday July 15, 2016 @07:57AM (#12100339)
Why is the NT kernel so important? It hasn't touched my life much in about eight years, private or professional. Nokia thought Symbian was very important too.
Re:Satya Nadella just fixed Microsoft’s biggest problem by protomyth on Friday July 15, 2016 @08:31AM (#12100484)
Why switch from a tested kernel that is technically very nice? Nothing about the kernel prevents proper support of POSIX and it has a lot more drivers and hardware support than any existing kernel.

Your exposure to the kernel in the last 8 years is not representative of 90+% of computer users.

Re:Satya Nadella just fixed Microsoft’s biggest problem by gnoway on Friday July 15, 2016 @08:45AM (#12100547)
Unless you're OK with breaking compatibility with all existing Windows apps - most of which you have no control over - rewriting the kernel as a POSIX thing is going to look a lot like 'bash on windows' in reverse. You'd have to have some kind of shim layer to translate all the old system calls, so most everyone's existing software is going to be slower and there will be bugs, etc. Including your own, since Windows is a kernel, a ton of drivers, a userland (including basic runtimes), a windowing system, a basic set of productivity tools and games, etc.

I think this would be a total disaster that killed Windows, personally.

Re:Satya Nadella just fixed Microsoft’s biggest problem by pdkl95 on Friday July 15, 2016 @11:16AM (#12101567)
> 'bash on windows' in reverse

That would be "wine", which has worked surprisingly well several years.

Re:Satya Nadella just fixed Microsoft’s biggest problem by overgryphon on Friday July 15, 2016 @11:40AM (#12101755)
Wine is fine for getting around an expected limitation, but would you run your workloads on wine in a production datacenter? It would be a disaster.
Re:Satya Nadella just fixed Microsoft’s biggest problem by Gravityloss on Friday July 15, 2016 @12:36PM (#12102181)
I wonder what companies really have designed new backends for windows for years anymore? Technically you could run many generic things there (databases or JVM), but what would you actually gain? Likely if you have to use windows, you're left in some legacy niche, looking backwards and not into the future.
Re:Satya Nadella just fixed Microsoft’s biggest problem by WayneBro on Friday July 15, 2016 @12:08PM (#12101966)
I'd run my entire development stack on Bash on Windows though. That's what it's there for. It's glorious!

Similarly, my laptop probably wouldn't be able to handle a production workload for any length of time...but it doesn't have to either.

Re:Satya Nadella just fixed Microsoft’s biggest problem by mohaine on Friday July 15, 2016 @08:39AM (#12100520)
The kernel isn't that import but all the software that depends on it and the win32 libs is. There is lots of software that is w32 only, more then enough to keep windows around for years.
Re:Satya Nadella just fixed Microsoft’s biggest problem by swalsh on Friday July 15, 2016 @11:48AM (#12101808)
There are thousands, probably millions of small business critical pieces of code running on systems all over the world running more than just .NET code. You'll have to emulate or recreate nearly the entire operating system, at which point... what did you accomplish? Businesses are going to compare the cost/benefits of upgrading their OS vs upgrading some old code, and decide it's not worth it.

Perhaps you've been lucky enough to move to more modern systems, but you're in the tech circle. For everyone else, it's not an easy option. Have you ever worked for a fortune 500 company? There are systems that are nearly 20 years old with billions of dollars running through them. Moving that is not a light decision.

Re:Satya Nadella just fixed Microsoft’s biggest problem by youdontknowtho on Friday July 15, 2016 @11:23AM (#12101627)
That's the thing. There are many things that are really important that don't actually touch every single person on the planet.

One of the most widely used OS's ever is called Tron. Does that effect me? Not really. Is it important? I think so. I thought so at least enough to do some reading on the subject. Was it important from a CoSci standpoint? Maybe. NT is important from multiple angles, as well. Also, it's importance doesn't take away importance from the things that may actually touch your life. Such is the nature of things.

Re:Satya Nadella just fixed Microsoft’s biggest problem by cptskippy on Friday July 15, 2016 @11:30AM (#12101687)
There's nothing about the NT kernel that needs to be rewritten to implement a POSIX or SUS compliant user-mode subsystem. They once had a Windows Services for UNIX (SFU) subsystem that was POSIX compliant. The new "Bash on Windows", officially called "Windows Subsystem for Linux", appears to be targeting the Linux Standard Base (LSB) and not striving for POSIX or SUS compliance.

LSB is mostly a superset of POSIX. POSIX is a subset of SUS. OSX is SUS compliant, though not POSIX certified. Windows is POSIX certified though not SUS compliant. And no one is LSB certified except a few Linux Distros.

This leaves me wondering exactly what target Microsoft should be aiming for since everyone seems to be playing by their own rules. It's like playing Monopoly with your friend's family who has their own house rules that aren't really like your family's house rules both of which are incompatible with the official rules.

Re:Satya Nadella just fixed Microsoft’s biggest problem by dbgllm on Friday July 15, 2016 @11:52AM (#12101833)
You mention a target as compliance or certification, but I don't think this is a direct concern for the WSL. They want to support specific use-cases, at least at first.

---

"Moving forward we will be investigating new areas of interest while continuing to support the following scenarios:

+ GNU command line tools such as grep, sed, and awk

+ File system and symlink support within the WSL environment

+ Ability to run apt / apt-get for installs, updates, and package testing

+ Basic functionality for languages such as NodeJS/npm, Python, Perl

+ Command line tools such as Vim, Emacs, Git, and SSH"

https://blogs.msdn.microsoft.com/wsl/2016/07/08/bash-on-ubun...

Re:Satya Nadella just fixed Microsoft’s biggest problem by cptskippy on Friday July 15, 2016 @12:07PM (#12101962)
I don't think it's a direct concern either. Though if I had to guess they'd target LSB over any of the others.

I think it's telling that they called it the "Windows Subsystem for Linux" where are their prior Subsystems (SUA/SFU) were for "Unix".

Re:Satya Nadella just fixed Microsoft’s biggest problem by drinchev on Friday July 15, 2016 @09:32AM (#12100780)
I think software is going to the direction of emulation anyway.

At this point you have platforms like Electron, which run in a browser environment. Java software which runs inside JVM. Now there's even linux sub-system inside windows, etc.

I think there is a way to do it the other way around. MS put effort in creating something similar to WINE and make a special "Windows POSIX", which let's say for the next decade is released along with the classic Windows ( Same as NT before ). Where they try to emulate / rewrite the software piece by piece until the stability is reached to switch.

I don't see this as an impossible idea to me. Actually if they did something like this I will be so happy to switch back.

Re:Satya Nadella just fixed Microsoft’s biggest problem by dbgllm on Friday July 15, 2016 @11:14AM (#12101558)
I don't think your kernel of choice is of direct interest here; I'm fairly certain what you're interested in is access to your familiar tools, which the "Bash on Ubuntu on Windows" system would potentially provide.

As for a POSIX sub-system on Windows, well there once existed such a system that was near-compliant, but MS stopped supporting it a few years back. As for Wine, I think cygwin fulfills a similar role.

Anyway, you want your tools. You might even want your familiar filesystem and its hierarchy. I think the primary reason Microsoft deemed it worth it to implement Bash on Ubuntu on Windows was to provide webdevs access to the same tools they had on osx/linux.

All in all, I think a bit of reading on these subjects would help, because I think you're confusing the kernel with the userland.

Note: I'm faily young and inexperienced, and when I heard the "Bash on Ubuntu on Windows" announcement, I didn't really know what the meant. But learning about these bits on wikipedia/various blogs was certainly interesting.

Re:Satya Nadella just fixed Microsoft’s biggest problem by dragonwriter on Friday July 15, 2016 @09:32AM (#12100784)
More significantly, the underlying technology beneath Linux on Windows, especially if it can be made a generally available, documented target for development, is a great thing. Not even a compromise, I think it's potentially better than making Windows into yet-another-POSIX kernel.
Re:Satya Nadella just fixed Microsoft’s biggest problem by kidmenot on Friday July 15, 2016 @08:56AM (#12100596)
> This is what I hope should happen with Windows. They should decide on POSIX kernel and completely rewrite most of it.

They simply can't afford it, not because they lack the resources but from a strategic point of view. See the other comments talking about compatibility. Windows works for many, many, many people and businesses. It would be a suicide move. People, and even more importantly businesses, don't jump on any hot new thing just because it's available, because change has huge costs in an enterprise context. If Microsoft ever tried to pull the rug from under them, you can be pretty sure that would be the end for them.

Re:Satya Nadella just fixed Microsoft’s biggest problem by norea-armozel on Friday July 15, 2016 @09:35AM (#12100806)
I agree that they're not likely to do a full abandonment of the Windows stack, it still makes money for them so why mess with a good thing? I think more likely is that as Azure expands they'll try to make more money off of that platform and use Windows (desktop/server) as their supplementary income which in itself is a big gamble IMO.
Re:Satya Nadella just fixed Microsoft’s biggest problem by overgryphon on Friday July 15, 2016 @11:35AM (#12101719)
Azure runs on Windows.
Re:Satya Nadella just fixed Microsoft’s biggest problem by newjersey on Friday July 15, 2016 @09:25AM (#12100746)
> If Microsoft ever tried to pull the rug from under them, you can be pretty sure that would be the end for them.

It is necessary though. Microsoft seems to be preparing for a post-Windows eventuality as well. Doesn't mean they have to write their own operating system.

Edit: it is mostly for azure anyway... I think Microsoft might as well ride Windows as long as it can and give it up.

Re:Satya Nadella just fixed Microsoft’s biggest problem by faragon on Friday July 15, 2016 @12:49PM (#12102269)
This one's pretty obvious if you've ever written a malloc. Compare VirtualAlloc² with the mess of mmap/madvise/mprotect. I'm not even sure you can get the nice explicit reserve/commit of Windows with pure POSIX APIs.

Then, can you explain why the C library provided by Microsoft in their compilers has such slow 'realloc()' implementation? (e.g. expanding a 10MB allocation to 20MB using realloc())

Re:Satya Nadella just fixed Microsoft’s biggest problem by UK-AL on Friday July 15, 2016 @10:49AM (#12101356)
There are lots of flaws with the POSIX models. NT's creater (cutler) fixed a lot of them. Your dismive attitude is probably due to ignorance instead deep knowledge of what the NT kernel is capable of.

Just a few days ago there was post about how NT's IO by default is more performant.

Re:Satya Nadella just fixed Microsoft’s biggest problem by youdontknowtho on Friday July 15, 2016 @11:19AM (#12101591)
Cutler is a nerd-hero of mine.

Yeah, the NT kernel design is pretty frickin awesome. There is a great book about the run up to NT's release. He took on the job because he thought that writing operating systems would happen fewer and fewer times in the future. I think he actually said that he thought this might be one of the last times a commercial OS would be written from scratch.

The thing about operating systems is that everyone thinks they know everything there is to know, but wow are they off the mark.

Re:Satya Nadella just fixed Microsoft’s biggest problem by niroze on Friday July 15, 2016 @02:03PM (#12102765)
Awesome! Glad someone is actually talking sense here :)

The idea that windows=bad across the board is terrible.

Most don't even know what VMS is/was.

Re:Satya Nadella just fixed Microsoft’s biggest problem by scholia on Friday July 15, 2016 @09:04AM (#12100637)
Microsoft killed the old one and replaced it with new stuff -- Windows New Technology -- long before Apple did. In fact, when Apple was shopping around for a new OS base, Windows NT was one of the options that Apple considered. (Didn't consider it very seriously, Hancock told me, but still, she did consider it.)
Re:Satya Nadella just fixed Microsoft’s biggest problem by PeCaN on Friday July 15, 2016 @12:32PM (#12102147)
Yikes! NT kernel is far far far better designed than any * nix¹. POSIX is an API (and not a very good one), not a kernel type anyway. Windows has had a POSIX layer for a while. The NT kernel actually has its own API that both the Win32 and POSIX APIs are implemented on top of.

Why is NT better than * nix (particularly Linux)? Two areas mainly:

- Virtual memory

This one's pretty obvious if you've ever written a malloc. Compare VirtualAlloc² with the mess of mmap/madvise/mprotect. I'm not even sure you can get the nice explicit reserve/commit of Windows with pure POSIX APIs.

Linux in particular used to have a very questionable virtual memory implementation³, but I suspect it's been much improved.

NT can demand-page kernel memory; Linux kills processes if the kernel needs memory.

- Async I/O

Here's how platforms do async I/O:

POSIX: You don't.⁴

Linux: Sleep. Wait for the kernel to wake you up when something happens so you can yell “IS ANYONE READY YET? HOW ABOUT NOW?!” at your file descriptors.

FreeBSD: Like Linux, but the API is less stupid.

Windows: Tell the kernel to run a callback when an I/O operation completes.

Personally I'm really excited for ReactOS. Linux is a 1970s kernel design.

---

¹ Well, Solaris and DragonFlyBSD have a lot of good ideas and good implementation.

² https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...

³ https://lwn.net/1999/0121/a/vmreview.html

⁴ Okay okay, you have select(2) and poll(2), but then you're using select and poll.

Re:Satya Nadella just fixed Microsoft’s biggest problem by amaks on Friday July 15, 2016 @07:41PM (#12104508)
> Linux in particular used to have a very questionable virtual memory implementation³, but I suspect it's been much improved.

The document you're referencing is written in 1999. I suspect a lot has changed since then.

Re:Satya Nadella just fixed Microsoft’s biggest problem by amaks on Friday July 15, 2016 @07:42PM (#12104510)
Also, nobody is using select and poll in Linux these days, epoll is the way to go.
Re:Satya Nadella just fixed Microsoft’s biggest problem by PeCaN on Friday July 15, 2016 @09:09PM (#12104753)
> Linux: Sleep. Wait for the kernel to wake you up when something happens so you can yell “IS ANYONE READY YET? HOW ABOUT NOW?!” at your file descriptors.

> FreeBSD: Like Linux, but the API is less stupid.

Yeah, I covered epoll (and kqueue, which also applies to Solaris and OS X).

Re:Satya Nadella just fixed Microsoft’s biggest problem by cptskippy on Friday July 15, 2016 @11:11AM (#12101535)
I believe what you're asking for is called the "Windows Subsystem for Linux" that they launched earlier this year.

The NT Kernel originally was POSIX compliant and there was a UNIX user-mode subsystem available called "Windows Services for UNIX". Unfortunately over the years the distinction between the NT Kernel and the Win32 subsystem eroded and Microsoft eventually dropped the Windows Services for UNIX subsystem around 2008.

With Vista however, the MinWin initiative took off to extricate the Win32 Subsystem from the NT Kernel. This was carried forward with 7 and completed for 8. It's because of this separation that they were able to share the same Kernel in Phone, RT, Desktop and Server OSes. It's also how WinRT and UWP apps can run on Phone, RT, Desktop and Server because they do not rely on the Win32 subsystem to operate.

The Windows Subsystem for Linux is Microsoft's new Linux (not UNIX) user-mode subsystem.

Re:Satya Nadella just fixed Microsoft’s biggest problem by franto on Friday July 15, 2016 @09:30AM (#12100770)
Don't forget that Windows is also used as servers, compared to MacOS used primary on desktops.
Re:Satya Nadella just fixed Microsoft’s biggest problem by whatever_dude on Friday July 15, 2016 @09:58AM (#12100955)
Other than the tools available (which will become irrelevant since Windows 10 will support the Unix command line in the next big update), why do you think Windows should adopt a POSIX kernel? What difference would it make to the end user?
Re:Satya Nadella just fixed Microsoft’s biggest problem by Arzh on Friday July 15, 2016 @11:27AM (#12101658)
But that was an easy call for Mac since no one really cared about OS9, windows on the other hand still cares about supporting old tech since the people who give them a bunch of money a year are still running it.
Re:Satya Nadella just fixed Microsoft’s biggest problem by JustSomeNobody on Friday July 15, 2016 @09:58AM (#12100956)
Long ago Bill Gates always pushed for backwards compatibility. That carries on today. So until Microsoft is completely gone, Windows will always carry with it the cruft of generations past.
Re:Satya Nadella just fixed Microsoft’s biggest problem by JoeAltmaier on Friday July 15, 2016 @11:11AM (#12101538)
Its changing. Win phones, surface, WinRT did a lot of restructuring.
Re:Satya Nadella just fixed Microsoft’s biggest problem by vborovikov on Friday July 15, 2016 @11:16PM (#12105092)
They considered that option in late 80s while working on NT kernel and decided not to do that. Instead POSIX services became a standalone subsystem running in user mode.
Re:Satya Nadella just fixed Microsoft’s biggest problem by ZenoArrow on Friday July 15, 2016 @11:06AM (#12101492)
> "They should decide on POSIX kernel and completely rewrite most of it."

What features do you want from POSIX that Windows doesn't already provide?

Re:Satya Nadella just fixed Microsoft’s biggest problem by JoeAltmaier on Friday July 15, 2016 @11:08AM (#12101509)
The point of POSIX is conformity, not extra features. Though I don't see how that fixes Windows either. It can already do many things more than POSIX. In fact most OSs support POSIX for application capture, but certainly don't depend upon it entirely.
Re:Satya Nadella just fixed Microsoft’s biggest problem by ZenoArrow on Friday July 15, 2016 @11:30AM (#12101683)
So in other words the main benefit of POSIX conformity (with regards to Windows) is application portability, right?

Is the Linux subsystem in Windows 10 not good enough to handle this? What *nix applications do people want to be able to run in Windows that they can't already?

Re:Satya Nadella just fixed Microsoft’s biggest problem by douche on Friday July 15, 2016 @10:54AM (#12101404)
Microsoft already had that moment, 20 years ago - moving from the DOS-based 95/98/ME variants to the NT-based 2000/XP branch.