 |
Mac OS X Internals: A Systems Approach by Amit Singh
Book Summary InformationAuthor: Amit Singh Edition: Hardcover Audio: English (Unknown); English (Original Language); English (Published) Published: 2006-06-29 ISBN: 0321278542 Number of pages: 1680 Publisher: Addison-Wesley Professional
Book Reviews of Mac OS X Internals: A Systems ApproachBook Review: An in-depth and elegant look at the construction of Mac OS X Summary: 5 Stars
This book is an ambitious attempt to cover the modern operating system of Mac OS X in substantial breadth and depth in one volume. This is what has been missing from previous books on programming and Apple's products - detailed serious knowledge of what is under the hood that has long been available for other operating systems such as Solaris. The most important contribution to the book's depth are all of the various programming examples. Although much of the book's content is rather technical, each chapter has sections that should be accessible to non-programmers. Several topics are excluded that are covered in other books such as the TCP/IP stack, since there is no "networking" chapter. This is because the Mac OS X TCP/IP stack is largely a derivative of the FreeBSD stack, which is already well documented. In general, information that is generic across Unix variants and can easily be found in other books is not included. The table of contents is as follows:
Chapter 1, "Origins of Mac OS X," describes the technical history of Mac OS X and the systems it derives from. An unabridged version of Chapter 1, which covers all of Apple's past and present operating systems, is available on this book's accompanying web site.
Section 1.1. Apple's Quest for the Operating System
Section 1.2. The NeXT Chapter
Section 1.3. The Mach Factor
Section 1.4. Strategies
Section 1.5. Toward Mac OS X
Chapter 2, "An Overview of Mac OS X," is an eclectic tour of Mac OS X and its important features. It contains brief overviews of various layers that constitute the system.
Section 2.1. Firmware
Section 2.2. Bootloader
Section 2.3. Darwin
Section 2.4. The xnu Kernel
Section 2.5. A User-Space View of the File System
Section 2.6. The Runtime Architecture
Section 2.7. The C Library
Section 2.8. Bundles and Frameworks
Section 2.9. Core Services
Section 2.10. Application Services
Section 2.11. Application Environments
Section 2.12. User Interface
Section 2.13. Programming
Section 2.14. Security
Section 2.15. Mac OS X Server
Section 2.16. Networking
Chapter 3, "Inside an Apple," describes the PowerPC architecture, using the PowerPC 970 processor line as a specific example. It also discusses the PowerPC assembly language and calling conventions.
Section 3.1. The Power Mac G5
Section 3.2. The G5: Lineage and Roadmap
Section 3.3. The PowerPC 970FX
Section 3.4. Software Conventions
Section 3.5. Examples
Chapter 4, "The Firmware and the Bootloader," explores the firmware environment on a PowerPC-based Macintosh computer. It also examines the sequence of events that happens during booting--up to the point where the Mac OS X kernel gains control. Finally, there is a discussion of an equally interesting firmware environment (EFI) for x86-based Macintosh computers.
Section 4.1. Introduction
Section 4.2. A Whole New World
Section 4.3. Power-On Reset
Section 4.4. Open Firmware
Section 4.5. Forth
Section 4.6. The Device Tree
Section 4.7. Open Firmware Interfaces
Section 4.8. Programming Examples
Section 4.9. Firmware Boot Sequence
Section 4.10. BootX
Section 4.11. Alternate Booting Scenarios
Section 4.12. Firmware Security
Section 4.13. Launching the Kernel
Section 4.14. The BootCache Optimization
Section 4.15. Boot-Time Kernel Arguments
Section 4.16. The Extensible Firmware Interface
Chapter 5, "Kernel and User-Level Startup," continues from the point where the kernel takes over from BootX. It looks at the important events that occur during kernel startup, visits various kernel subsystems, sees how they are initialized, sees how the kernel launches the first user-space program, and looks at the details of user-level startup--up to the point where the system is ready for the user.
Section 5.1. Arranging for the Kernel to Execute
Section 5.2. Low-Level Processor Initialization
Section 5.3. High-Level Processor Initialization
Section 5.4. Mach Subsystem Initialization
Section 5.5. The First Thread
Section 5.6. I/O Kit Initialization
Section 5.7. BSD Initialization
Section 5.8. Launching the First User-Space Program
Section 5.9. Slave Processors
Section 5.10. User-Level Startup
Chapter 6, "The xnu Kernel," describes the core kernel architecture of Mac OS X. The discussion includes system call families and their implementation, low-level tracing and debugging mechanisms, and special features such as the virtual machine monitor in the PowerPC version of the kernel.
Section 6.1. xnu Source
Section 6.2. Mach
Section 6.3. A Flavor of the Mach APIs
Section 6.4. Entering the Kernel
Section 6.5. Exception Processing
Section 6.6. System Call Processing
Section 6.7. System Call Categories
Section 6.8. Kernel Support for Debugging, Diagnostics, and Tracing
Section 6.9. Virtual Machine Monitor
Section 6.10. Compiling the Kernel
Chapter 7, "Processes," describes abstractions such as tasks, threads, and processes, the various forms in which they exist in Mac OS X subsystems, and processor scheduling. The discussion includes using various kernel-level and user-level interfaces for manipulating the aforementioned abstractions.
Section 7.1. Processes: From Early UNIX to Mac OS X
Section 7.2. Mach Abstractions, Data Structures, and APIs
Section 7.3. Many Threads of a New System
Section 7.4. Scheduling
Section 7.5. The execve() System Call
Section 7.6. Launching Applications
Chapter 8, "Memory," describes the Mac OS X memory subsystem's architecture, including discussions of the Mach virtual memory architecture, paging, the unified buffer cache, the working-set detection mechanism, kernel-level and user-level memory allocators, and support for 64-bit addressing.
Section 8.1. Looking Back
Section 8.2. An Overview of Mac OS X Memory Management
Section 8.3. Mach VM
Section 8.4. Resident Memory
Section 8.5. Virtual Memory Initialization during Bootstrap
Section 8.6. The Mach VM User-Space Interface
Section 8.7. Using the Mach VM Interfaces
Section 8.8. Kernel and User Address Space Layouts
Section 8.9. Universal Page Lists (UPLs)
Section 8.10. Unified Buffer Cache (UBC)
Section 8.11. The Dynamic Pager Program
Section 8.12. The Update Daemon
Section 8.13. System Shared Memory
Section 8.14. Task Working Set Detection and Maintenance
Section 8.15. Memory Allocation in User Space
Section 8.16. Memory Allocation in the Kernel
Section 8.17. Memory-Mapped Files
Section 8.18. 64-bit Computing
Chapter 9, "Interprocess Communication," describes various IPC and synchronization mechanisms available in Mac OS X. In particular, it discusses the implementation and usage of Mach IPC.
Section 9.1. Introduction
Section 9.2. Mach IPC: An Overview
Section 9.3. Mach IPC: The Mac OS X Implementation
Section 9.4. Name and Bootstrap Servers
Section 9.5. Using Mach IPC
Section 9.6. MIG
Section 9.7. Mach Exceptions
Section 9.8. Signals
Section 9.9. Pipes
Section 9.10. Named Pipes (Fifos)
Section 9.11. File Descriptor Passing
Section 9.12. XSI IPC
Section 9.13. POSIX IPC
Section 9.14. Distributed Objects
Section 9.15. Apple Events
Section 9.16. Notifications
Section 9.17. Core Foundation IPC
Section 9.18. Synchronization
Chapter 10, "Extending the Kernel," describes the I/O Kit, the object-oriented driver subsystem in Mac OS X.
Section 10.1. A Driver down the Memory Lane
Section 10.2. The I/O Kit
Section 10.3. DART
Section 10.4. Dynamically Extending the Kernel
Section 10.5. Communicating with the Kernel
Section 10.6. Creating Kernel Extensions
Section 10.7. A Programming Tour of the I/O Kit's Functionality
Section 10.8. Debugging
Chapter 11, "File Systems," describes the overall file system layer in Mac OS X, including brief discussions of each file system type. The discussion also covers partitioning schemes, disk management, and the Spotlight search technology.
Section 11.1. Disks and Partitions
Section 11.2. Disk Arbitration
Section 11.3. The Implementation of Disk Devices
Section 11.4. Disk Images
Section 11.5. Files and File Descriptors
Section 11.6. The VFS Layer
Section 11.7. File System Types
Section 11.8. Spotlight
Section 11.9. Access Control Lists
Section 11.10. The Kauth Authorization Subsystem
Chapter 12, "The HFS Plus File System," describes the internals of the HFS Plus file system. The discussion is aided by the use of a custom file system debugger written for this chapter.
Section 12.1. Analysis Tools
Section 12.2. Fundamental Concepts
Section 12.3. The Structure of an HFS+ Volume
Section 12.4. Reserved Areas
Section 12.5. The Volume Header
Section 12.6. The HFS Wrapper
Section 12.7. Special Files
Section 12.8. Examining HFS+ Features
Section 12.9. Optimizations
Section 12.10. Miscellaneous Features
Section 12.11. Comparing Mac OS X File Systems
Section 12.12. Comparing HFS+ and NTFS
Appendix A, "Mac OS X on x86-Based Macintosh Computers," highlights the key differences between the x86-based and PowerPC-based versions of Mac OS X. Besides this appendix, the book covers the details of several key x86-specific topics, such as EFI, GUID-based partitioning, and Universal Binaries. Most of Mac OS X is architecture-independent, and consequently, the majority of the book is architecture-independent.
Section A.1. Hardware Differences
Section A.2. Firmware and Booting
Section A.3. Partitioning
Section A.4. Universal Binaries
Section A.5. Rosetta
Section A.6. Byte Ordering
Section A.7. Miscellaneous Changes
This book will be useful to anyone curious about the composition and working of Mac OS X. Application programmers will develop a better understanding of how their applications interact with the system. System programmers can use the book to construct a better picture of how the core system works. It truly is an elegant piece of work on modern operating system design, even if you are not specifically interested in Mac OS X. However, whoever reads this book should know how to program in C so that they can appreciate all of the code included with the book. I highly recommend it.
Summary of Mac OS X Internals: A Systems ApproachMac 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. Finally, members of the Windows, Linux, BSD, and other Unix communities will find the book valuable in comparing and contrasting Mac OS X with their respective systems. Mac OS X Internals focuses on the technical aspects of OS X and is so full of extremely useful information and programming examples that it will definitely become a mandatory tool for every Mac OS X programmer.
Computers & Internet Books
|
 |