kernelthread.com

Book: Mac OS X Internals

Amit Singh

My Book On Mac OS X

As I began using Mac OS X, I wished to understand how the system is put together and how it works internally. My interest in Mac OS X is based not on years of Mac loyalty or zealotry (I possess neither), but on my years of working in the area of operating systems. The book is a means of sharing the results of my analysis and study of Mac OS X.

I decided to write the book shortly after I published "What is Mac OS X?", which generated an overwhelmingly positive response from "the Internet". I have been working on the book in my spare time since March 2004, which amounts to exactly one year as of this writing. If things go as planned, the book should be out in the second half of 2005. I am very satisfied with the progress made so far, and very excited about the potential outcome of this endeavor.

The book is an "internals" book, describing the architecture and design of Mac OS X. Throughout the book, I have attempted to use interesting programming examples extensively to demonstrate concepts and their working. Consequently, much of the book's content is rather technical in nature. Nevertheless, it is meant to appeal to a wide variety of audiences: ranging from hardcore technophiles to those not at home with the nitty-gritty, and from those who use and like Mac OS X to those who don't. This goal seems rather arduous and far fetched. It is. One of my guiding principles is to favor the cool and the unconventional over the dogmatic and the stereotypical.

The book is not a manual, a guide, or a text-book: it is simply a book that tells you many interesting details of how the operating system works. Hopefully every reader would find something worthwhile in it.

The purpose of this exercise on the PowerBook's motion sensor was to create one or more examples for the book. The programs whose binaries are available on this page will have their sources either in the book, or on the book's accompanying web site.

I must point out that my goal is not to create an "Undocumented Mac OS X" style of book. In particular, the book will not describe ways to subvert or reverse engineer the operating system. It is possible to claim this since much of the core Mac OS X is open source. While the book describes various topics beyond what is covered by published APIs (such as how various components of Mach work in Mac OS X), the presentation is almost always based on Apple's published source code. Only in a few cases (such as the AMS examples) any semblance of reverse engineering is used in the book.

Kernelthread.com has a few other examples of adaptations from the book, such as "A History of Apple's Operating Systems", an improved version of which is the first chapter in the book, and "hfsdebug", which is a companion program to the filesystems chapter.

I intend to launch the book's accompanying web site well in advance of the book's release, so as to kindle the interest of potential readers by giving them further details of the book's contents. Please stay tuned.