Talk:OS X/@comment-67.172.161.83-20150707085335/@comment-24886041-20150707211031

As someone who lived through the AT&T/BSD kerfuffle, I can probably make it a bit clearer for you and others.

BSD is the Berkeley fork of what WAS AT&T Unix. In reality, there was no division between the two at the beginning, with people from universities and corporations and government working together to improve the UNIX codebase. However, UNIX itself was managed by AT&T, so eventually Berkely Regents forked off an educational version to prevent things from getting locked up.

All of this, both BSD and UNIX SVR became the reference implementations for POSIX-compliant OSes. AT&T sued Berkeley in the 90's over BSD, and the courts decided that they couldn't claim copyright when much of the functional code in UNIX was actually written by Berkeley, not AT&T.

While the court case was being decided, a number of public forks of BSD came about, the main ones being NetBSD, FreeBSD and OpenBSD (and later DragonflyBSD). Each one had a different mandate: NetBSD was designed to run on anything with a CPU, OpenBSD was designed to only use non-AT&T code and aimed at code security over everything else (including functionality), and FreeBSD was the successor to BSD with only the bits stripped out that AT&T complained about in its lawsuit -- it was basically the "trunk" BSD distribution, with all the new features, aimed at a limited processor set.

When Gil Amelio brought Steve Jobs back (along with NeXT), they were in a tough situation, with projects Copland and Gershwin failing, and no real route forward for the Mac OS from OS 8, which had been created as a stop-gap between System 7 and something with enterprise-level internals. The two contenders were BeOS and NeXTStep, both designed by former Apple employees, and both which adhered to the Apple HIG. BeOS was the likely contender, but JPG asked too high a price from Apple, and then Jobs went into private talks with Amelio, and suddenly within a month, Apple owned NeXT and Be was out of the picture.

NeXTStep was based upon the CMU Mach kernel, and was POSIX compliant. Because it was designed on a modular object-oriented architecture, NeXTStep was able to keep the kernel, the POSIX layer and the userland interface and processes in separate boxes... which meant that Apple could now pull out its ancient by this time Copland design docs, and implement them in place of the NeXTStep userland box. The original concept was for there to be a blue box, a yellow box and a pink box -- and others as needed. This would include the classic Mac OS, a Java OS, the new Cocoa OS for native apps, and even a Windows NT-compatible OS, all running on the same kernel and POSIX base.

However, the NeXTStep POSIX layer wasn't really up for the job; it had taken a bunch of code from the original BSD codebase via NetBSD and FreeBSD, and mixed in custom NeXT code targeted specifically at the limited NeXT hardware. I can remember how wonderful it all worked together, and how painful it was to cross-compile DEC Alpha code to work under ksh on a NeXT cube.

What Apple did next was the obvious solution at the time: they hired the lead FreeBSD developer, and replaced the custom NeXTStep POSIX code with a more open FreeBSD-based layer, and rebranded the xNU kernel/BSD layer as Darwin. This was important, because it meant that Rhapsody (the code name for the pre-OS X system they were building) would be platform independant, and Apple was starting to have issues with its main supplier, Motorola.

The reason for this is that under Amelio, Apple had moved the Mac to an licensed hardware architecture, and one of those licenses was sold to Motorola. Then when Power Computing and Motorola ended up stealing most of the profits but none of the development costs from Apple, they eventually pulled the program, leaving the developer of their CPUs deep in sunk costs on developing a hardware platform, with no legal way to sell the results of that investment.

Having a platform-agnistic base meant that they were future-proofing the operating system to outlive the current line of hardware, which was important after the failure that was Copland.

Eventually, Apple did switch from using Motorola PPC chips to IBM ones, but IBM couldn't keep up with the demand, and Apple was not a preferred customer for IBM's chips. So eventually, Apple switched to Intel; this had been their safety plan since they purchased NeXT (and was a requirement for whichever OS they used; Be also offered both PPC and Intel versions of its OS), and they had been secretly developing and maintaining an Intel build of OS X alongside the publicly available PPC version that ran on their hardware.

So Mac OS X 10.4.7 came out on both PPC (G3-G5) AND Intel platforms.

As a result, it is both accurate to say that OS X has its roots in BSD Unix AND in FreeBSD, because FreeBSD is the non-AT&T (read: free to use) part of BSD Unix.

I do find this decision an interesting one; Darwin was part of an intentional push at Apple to open source the components that were generic to computing, and only keep the "special sauce" closed Apple source. Apple already had a license from AT&T to use the closed AT&T UNIX code, including that in BSD Unix; Apple had for years sold A/UX, which was a fully POSIX compliant OS that ran on top of the System 6 and System 7 OS, and could run UNIX and Mac OS software side by side. It was, however,  not up to the task of operating in a consumer environment, nor was MKLinux, which Apple also spun up in the 90's to explore running a UNIX-like OS that didn't have any of the AT&T/BSD baggage on Apple hardware.

I hope this makes things a bit clearer for some; I may clean some of this up and add it as back story to this article at some point.