Kernel Programming Guide
PDF
About This Document
Who Should Read This Document
Road Map
Other Apple Publications
Mach API Reference
Information on the Web
Keep Out
Kernel Architecture Overview
Darwin
Architecture
Kernel Extensions
Security Considerations
Security Implications of Paging
Buffer Overflows and Invalid Input
User Credentials
Remote Authentication
Temporary Files
/dev/mem and /dev/kmem
Key-based Authentication and Encryption
Console Debugging
Code Passing
Performance Considerations
Interrupt Latency
Locking Bottlenecks
Code Profiling
Kernel Programming Style
C++ Naming Conventions
Standard C Naming Conventions
Commonly Used Functions
Performance and Stability Tips
Style Summary
Mach Overview
Mach Kernel Abstractions
Tasks and Threads
Ports, Port Rights, Port Sets, and Port Namespaces
Memory Management
Interprocess Communication (IPC)
Time Management
Memory and Virtual Memory
Mac OS X VM Overview
Memory Maps Explained
Named Entries
Universal Page Lists (UPLs)
Using Mach Memory Maps
Other VM and VM-Related Subsystems
Address Spaces
Allocating Memory in the Kernel
Mach Scheduling and Thread Interfaces
Overview of Scheduling
Why Did My Thread Priority Change?
Using Mach Scheduling From User Applications
Kernel Thread APIs
Bootstrap Contexts
How Contexts Affect Users
How Contexts Affect Developers
I/O Kit Overview
Redesigning the I/O Model
I/O Kit Architecture
For More Information
BSD Overview
BSD Facilities
Differences between Mac OS X and BSD
For Further Reading
File Systems Overview
Working With the File System
VFS Transition
Network Architecture
Boundary Crossings
Security Considerations
Choosing a Boundary Crossing Method
Mach Messaging and Mach Interprocess Communication (IPC)
BSD syscall API
BSD ioctl API
BSD sysctl API
Memory Mapping and Block Copying
Summary
Synchronization Primitives
Semaphores
Condition Variables
Locks
Miscellaneous Kernel Services
Using Kernel Time Abstractions
Boot Option Handling
Queues
Installing Shutdown Hooks
Kernel Extension Overview
Implementation of a Kernel Extension (KEXT)
Kernel Extension Dependencies
Building and Testing Your Extension
Debugging Your KEXT
Installed KEXTs
Building and Debugging Kernels
Adding New Files or Modules
Building Your First Kernel
Building an Alternate Kernel Configuration
When Things Go Wrong: Debugging the Kernel
Revision History
Bibliography
Apple Mac OS X Publications
General UNIX and Open Source Resources
BSD and UNIX Internals
Mach
Networking
Operating Systems
POSIX
Programming
Websites and Online Resources
Security and Cryptography
Glossary
Index