Darwin (operating system)


Darwin is the core Unix-like operating system of macOS, iOS, watchOS, tvOS, iPadOS, audioOS, visionOS, and bridgeOS. It previously existed as an independent open-source operating system, first released by Apple in 2000. It is composed of code derived from NeXTSTEP, FreeBSD and other BSD operating systems, Mach, and other free software projects' code, as well as code developed by Apple. Darwin's unofficial mascot is Hexley the Platypus.
Darwin is mostly POSIX-compatible, but has never, by itself, been certified as compatible with any version of POSIX. Starting with Leopard, macOS has been certified as compatible with the Single UNIX Specification version 3.

History

The heritage of Darwin began with Unix derivatives supplemented by aspects of NeXT's NeXTSTEP operating system, first released in 1989. After Apple bought NeXT in 1996, it announced it would base its next operating system on OPENSTEP. This was developed into Rhapsody in 1997, Mac [OS X Server 1.0] in 1999, Mac OS X Public Beta in 2000, and Mac OS X 10.0 in 2001.
In 1999, Apple announced it would release the source code for the Mach 2.5 microkernel, BSD Unix 4.4 OS, and the Apache Web server components of Mac OS X Server. At the time, interim CEO Steve Jobs alluded to British naturalist Charles Darwin by announcing "because it's about evolution". In 2000, the core operating system components of Mac OS X were released as open-source software under the Apple Public Source License as Darwin; the higher-level components, such as the Cocoa and Carbon frameworks, remained closed-source.
Up to Darwin 8.0.1, released in April 2005, Apple released a binary installer after each major Mac OS X release that allowed one to install Darwin on PowerPC and Intel x86 systems as a standalone operating system. Minor updates were released as packages that were installed separately. Darwin is now only available as source code. As of January 2023, Apple no longer mentions Darwin by name on its and only publishes .

Design

Kernel

The kernel of Darwin is XNU, a hybrid kernel which uses Open Software Foundation Mach Kernel 7.3 from the OSF, various elements of FreeBSD, and an object-oriented device driver API called IOKit. The hybrid kernel design provides the flexibility of a microkernel and the performance of a monolithic kernel.

Hardware and software support

The last bootable full release of Darwin supported 32-bit and 64-bit Apple PowerPC systems and 32-bit Intel PCs.
Darwin currently includes support for the 64-bit x86-64 variant of the Intel x86 processors used in Intel-based Macs and the 64-bit ARM processors used in the iPhone 5S and later, the 6th generation iPod Touch, the 5th generation iPad and later, the iPad Air family, the iPad Mini 2 and later, the iPad Pro family, the fourth generation and later Apple TVs, the HomePod family, and Macs with Apple silicon such as the 2020 Apple M1 Macs, as well as the Raspberry Pi 3B. An open-source port of the XNU kernel exists that supports Darwin on Intel and AMD x86 platforms not officially supported by Apple, though it does not appear to have been updated since 2009. An open-source port of the XNU kernel also exists for ARM platforms, though it has not been updated since 2016. Older versions supported some or all of 32-bit PowerPC, 64-bit PowerPC, 32-bit x86, and 32-bit ARM.
It supports the POSIX API by way of its BSD lineage, so a large number of programs written for various other UNIX-like systems can be compiled on Darwin with no changes to the source code.
Darwin does not include many of the defining elements of macOS, such as the Carbon and Cocoa APIs or the Quartz Compositor and Aqua user interface, and thus cannot run Mac applications. It does, however, support a number of lesser-known features of macOS, such as mDNSResponder, which is the multicast DNS responder and a core component of the Bonjour networking technology, and launchd, an advanced service management framework.

License

In July 2003, Apple released Darwin under version 2.0 of the Apple Public Source License, which the Free Software Foundation qualifies as a free software license. The APSL is similar to GNU Affero [General Public License|AGPL], including in being incompatible with the GNU General Public License.
Previous versions of the APSL license did not meet the FSF definition of free software, although they did meet the requirements of the Open Source Definition.

Release history

The following is a table of major Darwin releases with their dates of release and their derivative operating system releases. Note that the corresponding releases may have been released on a different date.

Darwin 0–8 and corresponding Mac OS X releases

The jump in version numbers from Darwin 1.4.1 to 5.1 with the release of Mac OS X v10.1.1 was designed to tie Darwin to the Mac OS X version and build numbering system, which in turn is inherited from NeXTSTEP. In the build numbering system of macOS, every version has a unique beginning build number, which identifies what whole version of macOS it is part of. Mac OS X v10.0 had build numbers starting with 4, 10.1 had build numbers starting with 5, and so forth.

Darwin 12–15; Mac OS X rebranded into OS X

VersionDateCorresponding releasesNotes
12.0.0February 16, 2012OS X Mountain LionOS X v10.8.0
12.6.0January 27, 2015OS X Mountain LionOS X v10.8.5
13.0.0June 11, 2013OS X v10.9.0
  • Virtual memory compression
  • Timer coalescing
  • OpenGL 4.1 and OpenCL 1.2
  • Server Message Block version 2 is now the default protocol for sharing files instead of AFP. This is to increase performance and cross-platform compatibility.
  • IPoTB.
  • The Open Transport API has been removed
  • 13.4.0September 17, 2014OS X v10.9.5
    14.0.0September 18, 2014OS X v10.10.0
    14.5.0August 13, 2015OS X v10.10.5
    15.0.0September 16, 2015OS X v10.11.0 and iOS 9.0
  • System Integrity Protection. Protects certain system parts from being modified or tampered with by a process even if run by root or by a user with root privileges.
  • sudo is configured with the "tty_tickets" flag by default, restricting the session timeout to the terminal session in which the user authenticated the program.
  • LibreSSL replaces OpenSSL
  • 15.6.0July 18, 2016OS X v10.11.6 and iOS 9.3.3

    Darwin 20 onwards

    Note: the tables above contain the release dates of the corresponding OS releases. Build dates for Darwin versions are not publicly available; the commands below only give the build date for the XNU kernel.
    The command in Terminal will show the Darwin version number, and the command will show the XNU build version string, which includes the Darwin version number.
    The command will show the corresponding ProductName, the ProductVersion number and the BuildVersion string.

    Derived projects

    Due to the free software nature of Darwin, there have been projects that aim to modify the operating system or take Darwin’s parts for their own purpose.
    Among these, DarwinBSD, OpenDarwin, and PureDarwin can be termed "alternative Darwin distributions" in a sense analogous to Linux distributions.

    OpenDarwin

    OpenDarwin was a community-led operating system based on the Darwin system. It was founded in April 2002 by Apple and Internet Systems Consortium. Its goal was to increase collaboration between Apple developers and the free software community. Apple benefited from the project because improvements to OpenDarwin would be incorporated into Darwin releases; and the free/open-source community benefited from being given complete control over its own operating system, which could then be used in free software distributions such as GNU-Darwin.
    On July 25, 2006, the OpenDarwin team announced that the project was shutting down, as they felt OpenDarwin had "become a mere hosting facility for Mac OS X related projects", and that the efforts to create a standalone Darwin operating system had failed. They also state: "Availability of sources, interaction with Apple representatives, difficulty building and tracking sources, and a lack of interest from the community have all contributed to this." The last stable release was version 7.2.1, released on July 16, 2004.

    PureDarwin

    PureDarwin is a project to create a bootable operating system image from Apple's released source code for Darwin. Since the halt of OpenDarwin and the release of bootable images since Darwin 8.x, it has been increasingly difficult to create a full operating system as many components became closed source. In 2015 the project created a preview release based on Darwin 9 with an X11 GUI, followed by a command-line only 17.4 Beta based on Darwin 17 in 2019.

    Other derived projects

    "Darwin distributions" :
    • GNU-Darwin was a project that ports packages of free software to Darwin. They package OS images in a way similar to a Linux distribution.
    • DarwinBSD Project was a Darwin distribution using FreeBSD's pkgsrc package management.
    Other types of derivatives:
    • The Darbat project was an experimental port of Darwin to the L4 microkernel family. It aims to be binary compatible with existing Darwin binaries.
    • The Darling project is a compatibility layer for running macOS binaries on Linux systems. It uses some Darwin source code.

    Related open-source projects

    Projects intended to work with Darwin

    The following are not Darwin derivatives, at least not beyond the extent that any program written for an operating system is partly derived from its application programming interface and other constraints.

    Neither substantially based on Darwin nor mainly intended to work on it

    The following projects re-implements parts of macOS API that are above the level of Darwin.