Live data from Hacker News

Apple’s Darwin OS and XNU Kernel Deep Dive

tansanrao.com

41–50 of 186 posts

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#41
post #16

Earlier quoted context omitted.

There was never a right time for Apple to make such a switch. NeXTSTEP predates Linux, and when it was adapted into Mac OS X, Apple couldn't afford a wholesale kernel replacement project on top of everything else, and Linux in the late 1990s was far from being an obviously superior choice. Once they were a few versions in to OS X and solidly established as the most successful UNIX-like OS for consumer PCs, switching…

I agree with all of this. Moreover depending on what Torvalds chooses to do Apple may have ended up with a more expensive XNU in the end which would have been a disaster. Although I think Apple can deal with Torvalds just fine who really knows how that would have played out.

It would not be fine. It would have never been fine. It would have been a titanic clash of egos and culture, producing endless bickering and finger-pointing, with little meeting of minds. Apple runs the most vertically integrated general systems model outside of mainframes. Linux and its ecosystem represent the least.

In any case, as others have noted, the timeline here w.r.t nextstep is backwards.

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#42
post #14

Earlier quoted context omitted.

> Whenever I see the Darwin kernel brought into the discussion I can't help but wonder how different things could have been if Apple had just forked Linux XNU is only partially open sourced – the core is open sourced, but significant chunks are missing, e.g. APFS filesystem. Forking Linux might have legally compelled them to make all kernel modules open source–which while that would likely be a positive for humanity,…

At one point NeXT considered distributing GCC under the GPL with some proprietary parts linked at first boot into the binary. Stallman after speaking with lawyers rejected this. https://sourceforge.net/p/clisp/clisp/ci/default/tree/doc/Wh... Look for "NeXT" on this page.

Stallman’s insistence that a judge would side with him is pretty arrogant in my opinion; eg looking at Oracle v. Google decades later and how folks deciding the case seemed to be confused about technical matters.

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#43
post #27

Couldn't Apple have used ZFS instead of inventing APFS? Maybe modifying it to use less physical memory?

I remember reading back in 2007-2008 that Apple was interested in bringing ZFS support to Mac OS X, but discussions ended once Oracle purchased Sun. This was a bummer; I would’ve loved ZFS on a Mac. After a cursory Google search, I found this article: https://www.zdnet.com/article/zfs-on-snow-leopard-forget-abo...

Kind of surprising that the Oracle deal would have killed it given that Jobs and Ellison were such close friends.

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#44

Earlier quoted context omitted.

> Supporting ZFS in a UNIX kernel requires excessively extensive modifications to the design and implementation of the VMM, namely: FYI: Apple did a bunch of that work. They ported ZFS to OSX shortly after it was open sourced. With with only support landing in 10.5. With it being listed as an upcoming feature in 10.6. But something happened and they abandoned it. The rumour is a sun exec let the cat out of the bag ab…

> The rumour is a sun exec let the cat out of the bag about it being the next main filesystem for osx (ie not just support for non root drives) and this annoyed Jobs so much he canned the whole project. Very petty if true.

It would fit jobs though.

That’s one of the famous rumors.

As others here have said Oracle bought Sun two years later. Between me increased memory requirements, uncertainty due to Sun’s status as an ongoing concern, and who knows what else maybe it really did make sense not to go forward.

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#45
post #40

Earlier quoted context omitted.

Making a switch is one thing, but using Linux from the start for OS X would have made more sense. The only reason that didn't happen is because of Jobs' attachment to his other baby. It wasn't a bad choice, but it was a choice made from vanity and ego over technical merit.

This presumes that Apple brought in Jobs as a decision maker, and NeXTSTEP was attached baggage. At the time, the reverse was true - Apple purchased NeXTSTEP as their future OS, and Jobs came along for the ride. Given the disaster that was Apple's OS initiatives in the 90s, I doubt the Apple board would have bought into a Linux adventure.

Why wouldn't Apple have been interested in a Linux option? They bought NeXTSTEP because of Jobs. Linux was already useable as a desktop OS in 2000, and they could have added in the UX stuff and drivers for their particular macs on top of it. There wouldn't have been any downsides for them, and it would have strengthened something that was hurting their biggest rival.

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#46
post #20

Earlier quoted context omitted.

Supporting ZFS in a UNIX kernel requires excessively extensive modifications to the design and implementation of the VMM, namely: 1. Integration of the kernel's VM with ZFS's adaptive replacement cache which runs in user space – memory pressure cooperation, page accounting and unified memory management. It also requires extensive VM modifications to support ZFS's controlled page eviction, fine-grained dirty page trac…

> Supporting ZFS in a UNIX kernel requires excessively extensive modifications to the design and implementation of the VMM, namely: FYI: Apple did a bunch of that work. They ported ZFS to OSX shortly after it was open sourced. With with only support landing in 10.5. With it being listed as an upcoming feature in 10.6. But something happened and they abandoned it. The rumour is a sun exec let the cat out of the bag ab…

> But something happened and they abandoned it. The rumour is...

The reality is NetApp sued Sun/Oracle over ZFS patents.

https://www.theregister.com/2010/09/09/oracle_netapp_zfs_dis...

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#47
post #44

Earlier quoted context omitted.

> The rumour is a sun exec let the cat out of the bag about it being the next main filesystem for osx (ie not just support for non root drives) and this annoyed Jobs so much he canned the whole project. Very petty if true.

It would fit jobs though. That’s one of the famous rumors. As others here have said Oracle bought Sun two years later. Between me increased memory requirements, uncertainty due to Sun’s status as an ongoing concern, and who knows what else maybe it really did make sense not to go forward.

The ZFS code was already released under the CDDL. What was stopping Apple from writing their own implementation like OpenZFS and FreeBSD, regardless of what happened with Sun?

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#48
post #16

Earlier quoted context omitted.

There was never a right time for Apple to make such a switch. NeXTSTEP predates Linux, and when it was adapted into Mac OS X, Apple couldn't afford a wholesale kernel replacement project on top of everything else, and Linux in the late 1990s was far from being an obviously superior choice. Once they were a few versions in to OS X and solidly established as the most successful UNIX-like OS for consumer PCs, switching…

Making a switch is one thing, but using Linux from the start for OS X would have made more sense. The only reason that didn't happen is because of Jobs' attachment to his other baby. It wasn't a bad choice, but it was a choice made from vanity and ego over technical merit.

In 1996, Apple evaluated the options and decided (quite reasonably) that NeXTSTEP - the whole OS including kernel, userland, and application toolkit – was a better starting point than various other contenders (BeOS, Solaris, ...) to replace the failed Copland. Moreover, by acquiring NeXT, Apple got NeXTSTEP, NeXT's technical staff (including people like Bud Tribble and Avie Tevanian), and (ultimately very importantly) Steve Jobs.

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#49
post #40

Earlier quoted context omitted.

This presumes that Apple brought in Jobs as a decision maker, and NeXTSTEP was attached baggage. At the time, the reverse was true - Apple purchased NeXTSTEP as their future OS, and Jobs came along for the ride. Given the disaster that was Apple's OS initiatives in the 90s, I doubt the Apple board would have bought into a Linux adventure.

Why wouldn't Apple have been interested in a Linux option? They bought NeXTSTEP because of Jobs. Linux was already useable as a desktop OS in 2000, and they could have added in the UX stuff and drivers for their particular macs on top of it. There wouldn't have been any downsides for them, and it would have strengthened something that was hurting their biggest rival.

> Linux was already useable as a desktop OS in 2000

Apple made its decision in 1996.

Re: Apple’s Darwin OS and XNU Kernel Deep Dive

#50

The article states that "pager daemons" that manage swap files runs in user space, and the kernel memory can also get swapped out, but never explained how a user space daemon swaps out kernel memory. Do they have hard-coded exceptions for special daemons, or use special system calls? Where can I find out more details about the user space memory management specifically?

https://github.com/apple-oss-distributions/xnu
Post reply on HN