
This is the eBook version of the printed book.Mac OS X was released in March 2001, but many components, such as Mach and BSD, are considerably older. Understanding the design, implementation, and workings of Mac OS X requires examination of several technologies that differ in their age, origins, philosophies, and roles.Mac OS X Internals: A Systems Approach is the first book that dissects the internals of the system, presenting a detailed picture that grows incrementally as you read. For example, you will learn the roles of the firmware, the bootloader, the Mach and BSD kernel components (including the process, virtual memory, IPC, and file system layers), the object-oriented I/O Kit driver framework, user libraries, and other core pieces of software. You will learn how these pieces connect and work internally, where they originated, and how they evolved. The book also covers several key areas of the Intel-based Macintosh computers.A solid understanding of system internals is immensely useful in design, development, and debugging for programmers of various skill levels. System programmers can use the book as a reference and to construct a better picture of how the core system works. Application programmers can gain a deeper understanding of how their applications interact with the system. System administrators and power users can use the book to harness the power of the rich environment offered by Mac OS X.
It is a technical thing.
The XNU[0] kernel, which underpins macOS and is detailed by the exceptional book "Mac OS X internals"[1], can theoretically run on many x86 and/or ARM machines. However, the issue with running macOS apps via other operating systems is not the OS, but instead are the GUI frameworks expected (i.e., Carbon[2], Quartz[3], etc.). These frameworks are intentionally written for Apple hardware/macOS distros. Which makes sense when viewing macOS as a selling point for selling Mac's.
0 - https://en.wikipedia.org/wiki/XNU
1 - https://openlibrary.org/books/OL17205558M/Mac_OS_X_internals
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...
Another great resource regarding XNU and OS-X (although a bit dated now) is the book:
Mac OS X Internals
A Systems Approach[0]
0 - https://openlibrary.org/books/OL27440934M/Mac_OS_X_InternalsEdit: I see it's even cited at the end of this article. Truly a source for the (macOS) ages.
You can start by reading the Mac OS X Internals, followed by Mac OS X and iOS Internals: To the Apple's Core.
Then hop over to Apple's archive, https://developer.apple.com/library/archive/navigation/
Also many BSD syscalls have been deprecated along the years, including POSIX features like networking stack, now replaced by Objective-C APIs.
I would advise spending some time reading "Mac OS X Internals: A Systems Approach" and "Mac OS X and iOS Internals" books, to learn that having everything on kernel space alone, doesn't rewrite the original microkernel code into a huge monolith.