r/sysadmin • Systems Engineer • Aug 18 '16

PowerShell is open source, available for Linux and OS X

https://github.com/PowerShell/PowerShell
1.3k Upvotes

369 comments sorted by

View all comments

83

u/segagamer IT Manager Aug 18 '16

Next up;

The Windows kernel.

38

u/[deleted] Aug 18 '16

You're joking, but I wouldn't be shocked if they open sourced the Windows kernel. Even if they did something like Apple (open source the kernel but keep closed some of the things needed for the whole OS install), I think it would be a smart move.

Of course, it could compromise some of their copy protection efforts, but I still suspect they have plans to do it at some point.

23

u/[deleted] Aug 18 '16

There's probably no easy way to open source the Windows kernel, given 30 years of contributions from various developers.

7

u/Kalc_DK Aug 19 '16

Well we can probably assume that they all worked for Microsoft and their work in the kernel was owned entirely by Microsoft. Only issue is if they licensed other technologies from other companies in their microkernel.

3

u/spiderbiten Aug 19 '16

NT was forked from OS/2.

OS/2 was jointly developed by IBM and Microsoft.

There were articles years ago when people cried for IBM to open source OS/2 that they couldn't because of the co-ownership with Microsoft.

2

u/localtoast has a hat collection Sep 11 '16

Late, but NT was not descended from OS/2 - it came from DEC's Mica/Prism/Emerald projects. Cutler basically copied the repo to a tape when he went to MS.

0

u/[deleted] Aug 19 '16

[deleted]

5

u/deadbunny I am not a message bus Aug 19 '16

"stolen", you mean used under the terms of the licence?

→ More replies (1)

5

u/[deleted] Aug 18 '16

I don't really know about that. I just wouldn't be surprised if they were working on making it possible, even if they haven't finalized any plans to actually do it, and even if they're not working particularly hard on it.

11

u/[deleted] Aug 18 '16

In order to open source .NET, Microsoft basically had to completely rewrite it.

5

u/tas50 Ex-DevOps. Now Product Aug 19 '16

It's not the developers that kill you. It's the licensed code from 3rd parties. Without a doubt MS has a good chunk of software in the kernel that they didn't write. Look at what Sun went through when they open sourced Java. There was a non-trivial chunk of Java that never went open source since Sun didn't actually write it.

→ More replies (1)
→ More replies (1)
→ More replies (9)

16

u/[deleted] Aug 18 '16

Why would anybody want that mess anyways?

47

u/minimim Aug 18 '16 edited Aug 18 '16

It's actually a good kernel design. Seriously lacking on file-systems, to the point of being useless, but still. Also, the networking is old and slow.

It was designed by Dave Cutler, based on his work on VMS. Linux is starting work on an interface that can finally compete with the Windows kernel.

11

u/KarmaAndLies Aug 18 '16

The only criticism of the Windows Kernel that I have is that it doesn't allow granular throttling of process IO or IO prioritisation, both of which Linux supports out of the box. Other than that the design seems fairly solid.

PS - Talking about IO, not CPU throttling which it does support.

3

u/contextfree Aug 18 '16

I thought support for low-priority IO was added in Vista?

4

u/KarmaAndLies Aug 18 '16

They have support for "background" prioritisation. Problem is that bundles CPU and IO, which is problematic for some workflows.

2

u/koro666 Aug 19 '16

This is only at the Win32 API layer. You can call NtSetInformationProcess or NtSetInformationThread to set CPU, Memory and I/O priorities separately.

I can give you more details if you want.

2

u/minimim Aug 18 '16

Is it based on groups of processes? Or just individually?

4

u/KarmaAndLies Aug 18 '16 edited Aug 18 '16

Linux supports both. But once you have that core functionality, configuring it is just as difficult as your worst tool.

5

u/minimim Aug 18 '16

I know Linux supports doing it trough groups of processes, I meant to ask about Windows. And it's easy to configure it on Linux trough Systemd.

2

u/KarmaAndLies Aug 18 '16

Windows doesn't support it. That was my original complaint.

Windows only supports flagging a process as "background" which gives both IO low priority but also CPU low priority. That's kind of poor compared to what Linux offers you.

2

u/minimim Aug 18 '16

For sure, Linux offers fine-grained control over this.

2

u/minimim Aug 18 '16

Imagine you have a Web Application running in a Web server (say Apache) which will spawn 1999 threads to serve multiple requests. All of those threads will access a DB (say, MySQL), which will do half of the work, but will have just 2 threads. Before cgroups, these had to be put in different systems altogether, paying a heavy cost of a network transaction between them. Just installing systemd will put them in different process groups and ensure fairness between the groups, solving the problem.

→ More replies (1)

11

u/Zaphod_B chown -R us ~/.base Aug 18 '16

I've been told different and since MS allows kernel hooks from apps/drivers/third party it is partly the reason why Windows has been so easy to exploit over the years. However, I honestly admit I have not been keeping up on the Windows Kernel development for a long time now.

→ More replies (12)

13

u/localtoast has a hat collection Aug 18 '16

people really underrate NT. it's unfortunate that the discourse with the recently FOSS-friendly MS is to abandon it in favour of Linux.

→ More replies (1)
→ More replies (1)
→ More replies (7)