OS X and iOS Kernel Programming [electronic resource] /
Halvorsen, Ole Henry.author.
Clarke, Douglas.author.
OS X and iOS Kernel Programming combines essential operating system and kernel architecture knowledge with a highly practical approach that will help you write effective kernel-level code. You'll learn fundamental concepts such as memory management and thread synchronization, as well as the I/O Kit framework. You'll also learn how to write your own kernel-level extensions, such as device drivers for USB and Thunderbolt devices, including networking, storage and audio drivers. OS X and iOS Kernel Programming provides an incisive and complete introduction to the XNU kernel, which runs iPhones, iPads, iPods, and Mac OS X servers and clients. Then, you'll expand your horizons to examine Mac OS X and iOS system architecture. Understanding Apple's operating systems will allow you to write efficient device drivers, such as those covered in the book, using I/O Kit. With OS X and iOS Kernel Programming, you'll: Discover classical kernel architecture topics such as memory management and thread synchronization Become well-versed in the intricacies of the kernel development process by applying kernel debugging and profiling tools Learn how to deploy your kernel-level projects and how to successfully package them Write code that interacts with hardware devices Examine easy to understand example code that can also be used in your own projects Create network filters Whether you're a hobbyist, student, or professional engineer, turn to OS X andiOS Kernel Programming and find the knowledge you need to start developing.
Title Page; Copyright Page; Contents at a Glance; Table of Contents; About the Authors; About the Technical Reviewers; Acknowledgments; Introduction; Who is This Book For?; Book Structure; Chapter 1: Operating System Fundamentals; The Role ot the Operating System; Process Management; Process Address Spaces; Operating System Services; Virtual Memory; Scheduling; Hardware and Drivers; Summary; Chapter 2: Mac OS X and iOS; Programming APls; Supported Plafforms; 64-bitOperating System; iOS; The XNU Kernel; Kernel Extensions (KEXTs); Mach; Tasks and Threads; Scheduling
Mach IPC: Ports and MessagesMach Exceptions; Time Management; Memory Management; Task Address Space; VM Maps and Entries; The Physical Map; VM Objects; Examining a Task's Address Space; Pagers; Memory Allocation in Mach; The BSD Layer; System Calls; Networking; File Systems; The Virtual File System; Unified Buffer Cache; The I/O Kit; The Libkern Library; The Platform Expert; Summary; Chapter 3: Xcode and the Kernel Development Environment; Language of Choice: C++; Xcode; ""Hello World"" Kernel Extension; Loading and Unloading Kernel Extensions; Using Console to View Output; Summary
Chapter 4: The I/O Kit FrameworkThe I/O Kit Model; Object Relationship; The Info.plist File; The Driver Class; IORegistryExplorer; The Kernel Library: libkern; OSObject; Container Classes; Summary; Chapter 5: Interacting with Drivers from Applications; The I/O Kit Framework; Finding a Driver; Observing Device Removal; Modifying Driver Properties; State-Based Interaction; Notifications from the Driver; Summary; Chapter 6: Memory Management; Types of Memory; CPU Physical Address; Bus Physical Addresses; User and Kernel Virtual Addresses; Memory Ordering: Big vs. Little Endian
32-bitvs. 64-bit Memory AddressingMemory Allocation; Low-Level Allocation Mechanisms; The Mach Zone Allocator; The kalloc Family; Memory Allocation in BSD; I/O Kit Memory Allocation; Allocating Memory with theC++ New Operator; Memory Descriptors; The IOBulferMemoryDescriptor; Other Memory Descriptors; Mapping Memory; Mapping Memory trom a User Space Task into Kernel Space; The IOMemoryMap Class; Mapping Memory trom the Kernel to a User Space Task; Mapping Memory to a Specitic User Space Task; Physical Address Mapping; Summary; Chapter 7: Synchronization and Threading
Synchronization PrimitivesAtomic Operations; Locking; Spin locks; Mutexes; Condition Variables; ReadlWrite Mutexes; Synchronizing Asynchronous Events: Work Loops; IOCommandGate; Timers; Releasing Work Loops; Kernel Threads; Summary; Chapter 8: Universal Serial Bus; USB Architecture; USB Transter Speeds; Host Controllers; The USB Protocol; Endpoints; USB Descriptors; USB Device Classes; I/O Kit USB Support; USB Device and Driver Handling; Loading USB Drivers; USB Prober; Driver Example: USB Mass Storage Device Driver; Driver Startup; Handling Device Removals; Enumerating Intertaces
Enumerating Endpoints
Includes index.
Includes index.
OS X and iOS Kernel Programming combines essential operating system and kernel architecture knowledge with a highly practical approach that will help you write effective kernel-level code. You'll learn fundamental concepts such as memory management and thread synchronization, as well as the I/O Kit framework. You'll also learn how to write your own kernel-level extensions, such as device drivers for USB and Thunderbolt devices, including networking, storage and audio drivers. OS X and iOS Kernel Programming provides an incisive and complete introduction to the XNU kernel, which runs iPhones, iPads, iPods, and Mac OS X servers and clients. Then, you'll expand your horizons to examine Mac OS X and iOS system architecture. Understanding Apple's operating systems will allow you to write efficient device drivers, such as those covered in the book, using I/O Kit. With OS X and iOS Kernel Programming, you'll: Discover classical kernel architecture topics such as memory management and thread synchronization Become well-versed in the intricacies of the kernel development process by applying kernel debugging and profiling tools Learn how to deploy your kernel-level projects and how to successfully package them Write code that interacts with hardware devices Examine easy to understand example code that can also be used in your own projects Create network filters Whether you're a hobbyist, student, or professional engineer, turn to OS X andiOS Kernel Programming and find the knowledge you need to start developing.
Apple computer.
Application software.
Apple and iOS.
Computer Applications.