Discussing with Mac owners, I got several versions of where Mac OS X comes from. It is known to have some root in BSD, but how much, and where?

Some say that Mac OS X has a FreeBSD kernel, with all the utilities above that makes it an OS being Mac specific. (Not speaking about user apps here, only all of the init, ls, cd, and others. binutils? )

Others say Mac OS X is a Darwin kernel, that is pure Mac, and that the OS utilities come from BSD.

Where's the truth?

  • 12
    The title of this question should really be "Where does Mac OS X come from", as all versions of Mac OS prior to X are a completely different non-unix-based operating system.
    – Sandy
    Commented Aug 18, 2010 at 16:27
  • 1
    @Sandy: fixed the Xes Commented Aug 19, 2010 at 17:16
  • I was going to suggest 'hell' but then I had the unpleasant memory of Microsoft and their ghastly 'Windows'... Other than that? NeXTSTEP and BSD if memory serves me right and I'm sure the answers note that.
    – Pryftan
    Commented Jan 31, 2018 at 0:38

3 Answers 3


The history of MacOS is a little bit more convoluted. I was very interested in this in the late 90's as Mach had been pitched around the world as a faster way of building a Unix system.

The origin of the kernel is a bit more complicated.

It all starts with AT&T distributing their operating system to some universities for free. This Unix was improved extensively at Berkeley and became the foundation for the BSD variations of Unix and incorporated several new innovations like the "Fast File System" (UFS), introduced symlinks and the sockets API. AT&T went on their own way and built System V at the same time.

Meanwhile, research continued and some folks adopted the work from BSD as a foundation. At CMU, the BSD kernel was used as the foundation for prototyping a few new ideas: threads, an API to control the virtual memory system (through pluggable "pagers" - user level mmap), a kernel-level remote procedure call system and most importantly the idea of moving some kernel level operations to user space. This became the Mach kernel.

I am not 100% sure if mmap came from Mach, and later was adopted by BSD, or if Mach merely pioneered the idea and BSD added their own mmap based on the ideas of Mach.

Although the Mach kernel was described as a micro-kernel, up to version 2.5 it was merely a system that provided the thread, mmap, message passing features but remained a monolithic kernel, all the services were running on kernel mode.

At this time Rick Rashid (now at Microsoft) and Avie Tevanian (now at Apple) had come up with a novel idea that could accelerate Unix. The idea was to use the mmap system call to pass data to be copied from user space to the "servers" implementing the file system. This idea was essentially a variation of trying to avoid making copies of the same data, but it was pitched as a benefit of micro kernels, even if the feature could be isolated from a micro kernel.

The benchmarks of this VM-backed faster Unix system is what drove people at NeXT and at the FSF to pick Mach as the foundation for their kernels.

NeXT went with the Mach 2.5 kernel (which was based on either BSD 4.2 or 4.3) and GNU would not actually start on the work for years. This is what the NeXTSTEP operating systems were using.

Meanwhile at CMU, work continued on Mach and they finally realized the vision of having multiple servers running on top of a micro kernel with version 3.0. I am not aware of anyone in the wild being able to run Mach 3.0 as all of the interesting user-level servers used AT&T code so they were considered encumbered, so it remained a research product.

Around this time the Jolitz team had done a port of 4.3+ BSD to the 386 architecture and published their porting efforts on DrDobbs. 386BSD was not actively maintained and a group emerged to maintain and move 386BSD forward, the NetBSD team. Internal fights within the NetBSD group caused the first split and FreeBSD was formed out of this. NetBSD at the time wanted to focus on having a cross-platform BSD, and FreeBSD wanted to focus on having a Unix that did great on x86 platforms. A little bit later, NetBSD split again due to some other disputes and this lead to the creation of OpenBSD.

A fork of BSD 4.3 for x86 platforms went commercial with a company called BSDi, and various members of the original Berkeley team worked there and kept good relations with the BSD team at the University.

AT&T was not amused and started the AT&T vs BSDi lawsuit, which was later expanded to sue the University as well. The lawsuit was about BSDi using proprietary code from AT&T that had not been rewritten by Berkeley. This set back BSD compared to the up and coming Linux operating system.

Although things were not looking good for the defendants, at some point someone realized that SystemV had incorporated large chunks of BSD code under the BSD license and AT&T had not fulfilled their obligations in the license. A settlement was reached in which AT&T would not have to pull their product from the market, and the University agreed to rip out any code that could still be based on AT&T code.

The university then released two versions of BSD 4.4 encumbered and 4.4 lite. The encumbered version would boot and run, but contained AT&T code. The lite version did not contain any code from AT&T but did not work.

The various BSD efforts re-did their work on top of the new 4.4 lite release and had a booting system within months.

Meanwhile, the Mach 3.0 micro kernel remained not very useful without any of the user-land servers.

A student from a Scandinavian university (I believe, I might have this wrong) was the first one to create a full Mach 3.0 system with a complete OS based on the 4.4 lite release, I believe this was called "Lites". The system worked, but was slow.

During the 1992-1996 and by now BSD already had an mmap() system call as well as most other Unix systems. The "micro kernel advantage" that was not there, never really came to fruition. NeXT still had a monolithic kernel. The FSF was still trying to get Mach to build, and not wanting to touch the BSD code or contribute to any of the open source BSD efforts, they kept charging away at a poorly specified kernel vision and they were drowning on RPC protocols for their own kernel. The micro kernel looked great on paper, but turned out to be over engineered and just made everything slower.

At this point we also had the Linus vs Andy debate over micro-kernels vs monolithic kernels and the world started to realize that it was just impossible to add all of those extra cycles to a micro kernel and still come ahead of a well designed monolithic kernel.

Apple had not yet acquired NeXTSTEP, but was also starting to look into Mach as a potential kernel for their future operating systems. They hired the Open Software Foundation to port Linux to the Mach kernel, and this was done out of their Grenoble offices, I believe this was called "mklinux".

When Apple bought NeXT what they had on their hands was a relatively old Unix foundation, a 4.2 or 4.3 based Unix and by now, not even free software ran well out of the box on those systems. They hired Jordan Hubbard away from FreeBSD to upgrade their Unix stack. His team was responsible for upgrading the user land, and it is not a surprise that the MacOS userland was upgraded to the latest versions available on BSD.

Apple did switch their Mach from 2.5 to 3.0 at some point, but decided to not go with the micro-kernel approach and instead kept everything in-process. I have never been able to confirm if Apple used Lites, hired the scandinavian hacker, or if they adopted the 4.4 lite as their OS. I suspect they did, but I had already moved on to Linux and had stopped tracking the BSD/Mach world.

There was a rumor in the late 90's that Avie at Apple tried to hire Linus (who was already famous at this point) to work on his baby, but Linus chose to continue working on Linux.

History aside, this page describes the userland and the Mach/Unix kernel:


I found this graphic of the history of OSX: alt text

  • It was my understanding that the main reason Stallman at FSF pursued Mach was not performance but ease of using a debugger: he could use the debugger to debug Mach servers far more easily than debugging code running in kernel space. Although maybe it was the performance that convinced him this was a viable way to implement.
    – skiphoppy
    Commented Aug 18, 2010 at 18:47
  • 4
    If you really want to see a true microkernel in action, try out QNX. In QNX4, the kernel was only 32 K-bytes, and only handled message passing, CPU scheduling and interrups. All other parts of the QNX OS could be swapped out without shutting down or rebooting the system, and it was extremely robust. At one time there was a window emulator for QNX called Willows that ran windows applications faster than native windows. While this has nothing to do with OS-X per se, QNX proved that microkernels are indeed viable when done right.
    – user46261
    Commented Aug 31, 2013 at 17:02
  • 22
    image no longer available.
    – john-jones
    Commented Sep 1, 2013 at 7:10
  • 8
    Image still not available
    – Sildoreth
    Commented Apr 17, 2015 at 17:56
  • Steve Jobs offered Linus a job in 2000. Linus talks about it here. wired.com/2012/03/mr-linux/all/1 Commented Sep 16, 2015 at 13:30

On the Unix side, OS X is a descendant of NeXTSTEP, which was derived from 4.3BSD with the core parts of the kernel replaced with Mach.

The NeXT programming API, which eventually came to be called OpenStep, is the basis of today's Cocoa API for OS X. Two APIs have diverged greatly since Apple bought NeXT in 1997, though there are ongoing efforts to provide open source API-compatible Cocoa clones.

Add to that the Classic MacOS compatibility API, called Carbon, and you have the OS X programming interface.

(There's plenty more to OS X, but they're applications on top of all this: Finder, the BSD and GNU userland tools, etc..)

As for the FreeBSD kernel idea, it's sorta correct, but it's an unsophisticated way to look at it. The original kernel came, as I said, from NeXT, which assembled their first kernel from 4.3BSD and Mach. This means that both FreeBSD and NeXTSTEP shared some code via 4.3BSD.

The meme that OS X is based on FreeBSD has two more recent sources. First, Apple has continued to borrow innovations from the BSD world, usually from FreeBSD. Second, Apple hired FreeBSD project co-founder Jordan Hubbard shortly after making the first public OS X release. He worked for Apple through June 2013.


When you were told OSX has it's own flavor of Unix they are technically correct.

BSD + Elements from NeXTSTEP + Apple Tweaks = DARWIN

To put it another way. Ordering only Hot Fudge/ice cream (BSD) add Nuts (NeXTStep) plus whip cream and a cherry (Apple Add-in and tweaks) = A Hot Fudge Sundae (Darwin)

But BSD is the base that the others were added to which is why much of BSD will work in Darwin (with a tweak here and there)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .