Difference between gnu and darwin and mach

7

3

These terms belong to the Mac OS X architecture topic and I'm confused about the following:

mach is said to be a microkernel

Darwin and XNU are mentioned to be a kernel

So ...can you help me to understand the separation of those terms and how they collaborate to power the Mac OS X environment please?

iPhoneDevProf

Posted 2013-01-15T03:15:40.610

Reputation: 173

From Wikipedia: "Microkernel is the term describing an approach to Operating System design by which the functionality of the system is moved out of the traditional "kernel", into a set of "servers" that communicate through a "minimal" kernel, leaving as little as possible in "system space" and as much as possible in "user space"." What part of that are you having trouble with?

– Ƭᴇcʜιᴇ007 – 2013-01-15T03:46:26.873

I wouldn't like to repeat myself but my problem is that I don't quite understand the separation of those terms and how they collaborate to power the Mac OS X environment – iPhoneDevProf – 2013-01-15T04:26:16.830

Answers

10

I'll start at the core, and work my way out:

  • Mach is a microkernel, intended to provide only basic interprocess communication capabilities.
  • XNU is a hybrid kernel, consisting of the Mach microkernel with components of a more traditional ("monolithic") BSD unix kernel. It also includes the capability to load kernel extensions at runtime (to add features, device drivers, etc).
  • Darwin is a Unix OS consisting of the XNU kernel along with a variety of open-source utilities, libraries, etc. Some of the utilities in Darwin come from other flavors of BSD Unix, some from the GNU project, some were developed by Apple, etc.
  • OS X is Darwin, plus a lot of proprietary components, most notably its graphical interface APIs.

Gordon Davisson

Posted 2013-01-15T03:15:40.610

Reputation: 28 538

@allquixotic: Thanks for the edit, but I partially reverted it -- I don't want to overemphasize the GNU component of Darwin/OS X, since GNU is migrating to the GPLv3 license and Apple is fleeing from it (note that GNU-Darwin is actually a non-Apple project). Also, I consider Darwin a "true unix", both by heritage and by conformance.

– Gordon Davisson – 2013-01-16T00:04:41.960

2Well, he asked about GNU, not for a partisan viewpoint of what Apple may or may not be doing in future releases of OS X. Also, it stands to reason that the older the release of OS X, the more of GNU it has; if you go back to when they didn't even have LLVM, they were entirely dependent upon gcc. Apple may want to cover up and/or eliminate the use of GNU in relation to their OS for political reasons, but on SU we should be honest and include the whole story. Removing my upvote from this answer. – allquixotic – 2013-01-16T14:23:56.990