Darwin (operating system)

Darwin is the core Unix operating system of macOS (previously OS X and Mac OS X), iOS, watchOS, tvOS, iPadOS, visionOS, and bridgeOS. It previously existed as an independent open-source operating system, first released by Apple Inc. in 2000. It is composed of code derived from NeXTSTEP, FreeBSD,[3] other BSD operating systems,[6] Mach, and other free software projects' code, as well as code developed by Apple.

Darwin
DeveloperApple Inc.
Written inC, C++, Objective-C, assembly language
OS familyUnix,[1][2] FreeBSD,[3] BSD[4]
Working stateCurrent
Source modelcurrently open source with proprietary components[citation needed], previously open source
Initial releaseNovember 15, 2000; 23 years ago (2000-11-15)
Latest release23.4.0 / March 5, 2024; 55 days ago (2024-03-05)
Repositorygithub.com/apple-oss-distributions/distribution-macOS
PlatformsCurrent: x86-64, 64-bit ARM, 32-bit ARM (32-bit ARM support is closed-source)
Historical: PowerPC (32-bit and 64-bit), IA-32
Kernel typeHybrid (XNU)
Influenced byNeXTSTEP, FreeBSD, BSD
Default
user interface
Command-line interface (Unix shell)
LicenseMostly Apple Public Source License (APSL), with closed-source drivers[5]
Official websiteopensource.apple.com

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 (SUSv3).[7][8][9]

History

Simplified history of Unix-like operating systems

The heritage of Darwin began with Unix derivatives supplemented by aspects of NeXT's NeXTSTEP operating system (later, since version 4.0, known as OPENSTEP), 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.[10] At the time, interim CEO Steve Jobs alluded to British naturalist Charles Darwin by announcing "because it's about evolution".[11] In 2000, the core operating system components of Mac OS X were released as open-source software under the Apple Public Source License (APSL) 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 (as an ISO image) after each major Mac OS X release that allowed one to install Darwin on PowerPC and Intel x86 systems as a standalone operating system.[12] 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 Open Source website and only publishes an incomplete collection of open-source projects relating to macOS and iOS.

Design

Diagram of macOS architecture

Kernel

The kernel of Darwin is XNU, a hybrid kernel which uses OSFMK 7.3[13] (Open Software Foundation Mach Kernel) from the OSF, various elements of FreeBSD (including the process model, network stack, and virtual file system),[14] and an object-oriented device driver API called I/O Kit.[15] The hybrid kernel design provides the flexibility of a microkernel[16][failed verificationsee discussion] and the performance of a monolithic kernel.[17]

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.[18]

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.[19][20] 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.[21] An open-source port of the XNU kernel also exists for ARM platforms, though it has not been updated since 2016.[22] 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 (largely FreeBSD userland), 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 (APSL), which the Free Software Foundation (FSF) classifies as a free software license incompatible with the GNU General Public License.[23] Previous versions were released under an earlier version of the APSL license, which did not meet the FSF definition of free software, although it did meet the requirements of the Open Source Definition.[24]

Release history

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

Darwin 0–8 and corresponding Mac OS X releases

VersionDateCorresponding releasesNotes
0.1March 16, 1999Mac OS X Server 1.0 releases
  • Initial release
  • 0.1 is contrived (for sorting and identification) as this identified itself simply as Rhapsody 5.3
0.2April 14, 1999Mac OS X Server 1.0.1
0.3August 5, 1999Based on Rhapsody 5.5
  • ISO image is available on archive.org
  • After this point the kernel changed from the NeXTSTEP/OPENSTEP/Rhapsody to the newer XNU for Mac OS X
1.0April 12, 2000Developer preview 3
1.1April 5, 2000Developer preview 4
1.2.1November 15, 2000Mac OS X Public Beta (code-named "Kodiak")
1.3.1April 13, 2001Mac OS X v10.0 (code-named "Cheetah")
  • First commercial release of Darwin
  • All releases of Cheetah (v10.0.0–4) had the same version of Darwin.
1.4.1October 2, 2001Mac OS X v10.1 (code-named "Puma")
  • Performance improvements to "boot time, real-time threads, thread management, cache flushing, and preemption handling"
  • Support for SMB network file system
  • Wget replaced with cURL.[26]
5.1November 12, 2001Mac OS X v10.1.1
  • Change in numbering scheme to match the Mac OS X build numbering scheme
5.5June 5, 2002Mac OS X v10.1.5
6.0.1September 23, 2002Mac OS X v10.2 (code-named "Jaguar")
6.8October 3, 2003Mac OS X v10.2.8
7.0October 24, 2003Mac OS X PantherMac OS X v10.3.0
7.9April 15, 2005Mac OS X v10.3.9
8.0April 29, 2005Mac OS X v10.4.0
8.11November 14, 2007Mac OS X v10.4.11

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 (earlier build numbers represented developer releases).[30]

Darwin 9; iPhone OS introduced

VersionDateCorresponding releasesNotes
9.0October 26, 2007Mac OS X v10.5.0
9.8August 5, 2009Mac OS X v.10.5.8

Darwin 10-11; iPhone OS rebranded to iOS

VersionDateCorresponding releasesNotes
10.0August 28, 2009Mac OS X v10.6.0
10.8June 23, 2011Mac OS X v10.6.8
11.0.0July 20, 2011Mac OS X v10.7.0
  • XNU no longer supports PPC binaries (fat binary only for i386, x86_64).
  • XNU requires an x86_64 processor, except for iOS which is ARM based.
  • Improved sandboxing of applications
  • Complete support for Automatic Reference Counting
11.4.2October 4, 2012Mac OS X v10.7.5 (supplemental)

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 v10.8.5 (with Security Update 2015-001)
13.0.0June 11, 2013OS X v10.9.0
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 (such as a window or tab) 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 16–19; OS X rebranded into macOS

VersionDateCorresponding releasesNotes
16.0.0September 13, 2016macOS v10.12.0 and iOS 10.0.1 (initial release version)
  • OS X was rebranded into macOS.
  • Writing to /Volumes directory is now restricted to root user or any user with root privileges
  • System Integrity Protection now covers /Library/Application Support/com.apple.TCC directory that contains a list of applications that are allowed to "control the computer"
  • Objective-C garbage collector removed and replaced by Automatic Reference Counting that was introduced with Darwin v12.0 (OS X v10.8). Objective-C applications that use garbage collection will no longer work.
  • Native support for PPTP was removed.
16.5.0March 27, 2017macOS v10.12.4 and iOS 10.3
  • Changed filesystem from HFS+ to APFS on iOS devices. APFS is already available on macOS since 10.12.0 but can't be used on boot partition.
16.6.0July 19, 2017macOS v10.12.6 and iOS 10.3.3
17.0.0September 19, 2017
  • APFS replaces HFS+ as the default filesystem for boot partition in macOS on Macs with flash storage. On Macs with HDDs, the boot partition must be reformatted to use APFS.
  • ntpd replaced by timed as a time synchronization service
  • FTP and telnet commands are removed.
  • Kernel extensions ("kexts") will require explicit approval by the user before being able to run.
17.5.0March 29, 2018macOS 10.13.4
  • Support for external graphics processors using Thunderbolt 3, and removes support for external graphics processors using Thunderbolt 1 and 2.
17.6.0June 1, 2018macOS v10.13.5
17.7.0July 9, 2018macOS v10.13.6 and iOS 11.4.1
18.0.0September 24, 2018
18.2.0October 30, 2018macOS v10.14.1 and iOS 12.1
  • Added support for the new Radeon Vega 20 GPUs in the new MacBooks
19.0.0September 19, 2019
19.2.0December 10, 2019macOS 10.15.2 and iOS 13.3
19.3.0January 28, 2020macOS 10.15.3 and iOS 13.3.1
  • System Extensions replace Kexts and runs in userspace, outside of the kernel.[34]
  • DriverKit replaces I/O Kit. It Introduces "Dexts" (Driver Extensions) which are built using DriverKit. Driverkit is a new SDK with all new frameworks based on IOKit, but is updated and modernized. Device Drivers run in userspace, outside of the kernel.[35][36][37]
19.4.0March 24, 2020
19.5.0April 30, 2020macOS 10.15.5 and iOS 13.5
19.6.0June 1, 2020macOS 10.15.6 beta 2 and iOS 13.6.0 beta 2

Darwin 20 onwards

VersionDateCorresponding releasesNotes
20.0.0June 22, 2020macOS 11.0 beta 1 and iOS 14.0 beta 1
20.1.0September 3, 2020macOS 11.0 and iOS 14.0
20.2.0November 12, 2020macOS 11.1 and iOS 14.3
20.3.0February 1, 2021macOS 11.2, iOS 14.4, iPadOS 14.4, watchOS 7.3 and tvOS 14.4.
20.4.0April 20, 2021macOS 11.3, iOS 14.5, iPadOS 14.5, watchOS 7.4 and tvOS 14.5.
20.5.0May 24, 2021macOS 11.4 and iOS 14.6
20.6.0June 2, 2021macOS 11.5 beta 2 and iOS 14.7 beta 2
21.0.0June 7, 2021macOS 12.0 beta 1 and iOS 15.0 beta 1
21.0.1October 25, 2021macOS 12.0
21.1.0October 25, 2021macOS 12.0.1 and iOS 15.0
21.2.0December 7, 2021macOS 12.1 and iOS 15.2
21.3.0January 26, 2022macOS 12.2 and iOS 15.3
21.4.0March 14, 2022macOS 12.3 and iOS 15.4
21.5.0June 24, 2022macOS 12.4 and iOS 15.5
21.6.0July 20, 2022macOS 12.5 and iOS 15.6
22.0June 6, 2022macOS 13.0 beta 1, iOS 16.0, watchOS 9.0 and tvOS 16.0
22.1.0October 24, 2022macOS 13.0, iOS 16.1, iPadOS 16.1, watchOS 9.1 and tvOS 16.1
22.2.0December 13, 2022macOS 13.1, iOS 16.2, iPadOS 16.2, watchOS 9.2 and tvOS 16.2
22.3.0January 23, 2023macOS 13.2, iOS 16.3, iPadOS 16.3, watchOS 9.3 and tvOS 16.3
22.4.0March 27, 2023macOS 13.3, iOS 16.4, iPadOS 16.4, watchOS 9.4 and tvOS 16.4
22.5.0May 18, 2023macOS 13.4, iOS 16.5, iPadOS 16.5, watchOS 9.5 and tvOS 16.5
22.6.0July 24, 2023macOS 13.5, iOS 16.6, iPadOS 16.6, watchOS 9.6 and tvOS 16.6
23.0.0September 18, 2023macOS 14.0, iOS 17.0, iPadOS 17.0, watchOS 10.0 and tvOS 17.0
23.1.0October 25, 2023macOS 14.1, iOS 17.1, iPadOS 17.1, watchOS 10.1 and tvOS 17.1
23.2.0November 15, 2023macOS 14.2, iOS 17.2, iPadOS 17.2, watchOS 10.2 and tvOS 17.2
23.3.0January 22, 2024macOS 14.3, iOS 17.3, iPadOS 17.3, watchOS 10.3 and tvOS 17.3
23.4.0March 5, 2024macOS 14.4, iOS 17.4, iPadOS 17.4, watchOS 10.4 and tvOS 17.4

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 uname -r in Terminal will show the Darwin version number ("20.3.0"), and the command uname -v will show the XNU build version string, which includes the Darwin version number.The command sw_vers will show the corresponding ProductName ("macOS"), the ProductVersion number ("11.2.3") and the BuildVersion string ("20D91").

Derived projects

Due to the free software nature of Darwin, there have been projects that aim to modify or enhance the operating system.

OpenDarwin

GNOME running on GNU-Darwin

OpenDarwin was a community-led operating system based on the Darwin system. It was founded in April 2002 by Apple Inc. 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.[38]

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.[39] 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."[40] The last stable release was version 7.2.1, released on July 16, 2004.[41]

PureDarwin

PureDarwin is a project to create a bootable operating system image from Apple's released source code for Darwin.[42] 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 become closed source. In 2015 the project created a preview release based on Darwin 9 with an X11 GUI,[43] followed by a command-line only 17.4 Beta based on Darwin 17.[44]

Other derived projects

Window Maker in XDarwin

See also

References

External links