Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

MacOS was absolutely derived from BSD through NeXTSTEP.




> MacOS was absolutely derived from BSD through NeXTSTEP.

The OS-X (now branded as "macOS") kernel was not, and is not, a derivative of the FreeBSD kernel, or any other BSD, even though macOS/OS-X has a FreeBSD kernel component due to its Mach heritage. The userland tools are however BSD. OS-X's kernel is XNU and from the XNU GitHub repo[0]:

  XNU kernel is part of the Darwin operating system for use 
  in macOS and iOS operating systems. XNU is an acronym for X 
  is Not Unix. XNU is a hybrid kernel combining the Mach 
  kernel developed at Carnegie Mellon University with 
  components from FreeBSD and a C++ API for writing drivers 
  called IOKit. XNU runs on x86_64 and ARM64 for both single 
  processor and multi-processor configurations.
I recommend the book "Mac OS X Internals"[1] for a detailed analysis of same.

EDIT:

In theory, XNU could simultaneously run the existing FreeBSD subsystem alongside Linux and/or MS-Windows ones. In practice, this would be a herculean effort fraught with difficulty.

See QNX[2] for another example of a micro-kernel OS architecture.

0 - https://github.com/apple-oss-distributions/xnu

1 - https://books.apple.com/us/book/mac-os-x-internals/id4343583...

2 - https://en.wikipedia.org/wiki/QNX



>Darwin is based on proven technology from many sources. A large portion of this technology is derived from FreeBSD, a version of 4.4BSD that offers advanced networking, performance, security, and compatibility features. Other parts of the system software, such as Mach, are based on technology previously used in Apple’s MkLinux project, in OS X Server, and in technology acquired from NeXT.

Exactly.


>>Darwin is based on proven technology from many sources. A large portion of this technology is derived from FreeBSD, a version of 4.4BSD that offers advanced networking, performance, security, and compatibility features. Other parts of the system software, such as Mach, are based on technology previously used in Apple’s MkLinux project, in OS X Server, and in technology acquired from NeXT.

> Exactly.

  Darwin != XNU
  userland tools != Darwin
Also, Mach[0] was created by CMU 40 years ago and is not "based on technology previously used in Apple’s ..." no matter what Apple claims.

Since you quoted from the provided archive, so shall I.

  The fundamental services and primitives of the OS X kernel
  are based on Mach 3.0. Apple has modified and extended Mach
  to better meet OS X functional and performance goals.[1]
Apple named the above "XNU". Since Mach[0] is a micro-kernel architecture, which FreeBSD is not and never has been, there must exist:

  The BSD portion of the OS X kernel is derived primarily
  from FreeBSD[2] ...
What I originally stated was:

  The OS-X (now branded as "macOS") kernel was not, and is
  not, a derivative of the FreeBSD kernel, or any other BSD,
  even though macOS/OS-X has a FreeBSD kernel component due
  to its Mach heritage.
In response to your assertion of:

  MacOS was absolutely derived from BSD through NeXTSTEP.
Note my identification of the FreeBSD kernel component being a component, not the kernel itself.

0 - https://en.wikipedia.org/wiki/Mach_(kernel)

1 - https://developer.apple.com/library/archive/documentation/Da...

2 - https://developer.apple.com/library/archive/documentation/Da...


I think you’re getting hung up on semantics and you’re hyper focused on the kernel.

Nothing you said contradicts my point and in fact, corroborates it. So I’m not sure what your point is.

Yes, Darwin is a mix of Mach, xnu, and BSD code. No where did I say macOS is the FreeBSD kernel. No where do I mention kernel. So while you argument for why I’m wrong is lengthy, it still says it was derived from BSD. Which is exactly what I said. There are parts of FreeBSD in macOS kernel. There are parts of XNU and Mach. There are parts OpenBSD and NetBSD. Majority of the base OS (including userland) is BSD.


The first version of MacOS X Server was based on an unreleased version of NEXTSTEP which in turn used 4.4BSD and Mach 2.5. Around BBB 1997-1998 a lot of userland was synced with bits from not just FreeBSD but the other BSD distributions, if my memory serves me correctly. MacOS X moved to Mach 3. That’s a very very long time ago though, and Apple obviously did a _lot_ of their own CoreOS engineering, things like launchd and XPC don’t have FreeBSD equivalents.

But hey, Darwin is open source so if someone wants to do go on a provenance archeological dig, it could be done!


Large parts have been rewritten: they very different and don't show any BSD heritage.

That may be true but a large core of it is still BSD. In fact, it’s so BSD that one could create a BSD distro based off FreeBSD and achieve binary compatibility on x86. Which is exactly what RavynOS [0] has done. There’s a lot of BSD under the hood of macOS still today in Darwin. A mix of FreeBSD, NetBSD, and OpenBSD.

[0] https://github.com/ravynsoft/ravynos




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: