■ A driver is an I/O Kit object that manages a specific piece of hardware. When the I/O Kit loads a driver,
it may need to load one or more families, too. Drivers are written as kernel extensions (or KEXTs) and
are usually installed in the directory /System/Library/Extensions.
Many of a driver’s characteristics are found in its property list, a text file in XML (Extensible Markup
Language) format that describes the contents, settings, and requirements of the driver. A driver usually
stores its property list (or Info.plist file) in its Contents directory, where you can view it using the
Property List Editor.
■ A nub is an I/O Kit object that represents a detected, controllable entity, such as a device or logical
service. A nub may represent a bus, a disk, a graphics adapter, or any number of similar entities. When
it supports a specific piece of hardware, a nub can also be a driver.
A nub supports dynamic configuration by providing a connection match point between two drivers
(and, by extension, between two families). A nub can also provide services to code running in user space
through a device interface (defined below).
■ A service is an I/O Kit entity, based on a subclass of IOService, that provides certain capabilities to other
I/O Kit objects. All driver and nub classes inherit from the IOService class. In the I/O Kit’s layered
architecture, each layer is a client of the layer below it and a provider of services to the layer above it. A
family, nub, or driver can be a service provider to other I/O Kit objects.
■ A device interface is a user-space library or plug-in that provides an interface that an application can
use to communicate with or control a device. A device interface communicates with its in-kernel
counterpart, called a user client (defined next), to transmit commands from an application or user-space
process to the in-kernel object that represents a device. A family that provides a device interface also
provides a user client to handle the kernel-side communication with the device. For information on
which I/O Kit families provide the device interface–user client mechanism, see “I/O Kit Family Device-Access
Support” (page 61).
■ A user client is an in-kernel object that inherits from IOService and provides a connection between an
in-kernel device driver or device nub and an application or process in user space. Some documentation
uses the term “user client” to refer to the combination of the user-space device interface and the in-kernel
user client object, but for this discussion, “user client” refers to the in-kernel object alone.
■ The I/O Registry is a dynamic database that describes a collection of ”live” objects, each of which
represents an I/O Kit entity (such as a driver, family, or nub). You can think of the I/O Registry as a tree
with a nub representing the computer’s main logic board at the root, and various device drivers and
nubs as the leaves. In response to the addition or removal of hardware or other changes in the system,
the I/O Registry automatically updates to reflect the current hardware configuration. (For an in-depth
look at this structure, see “The I/O Registry” in I/O Kit Fundamentals.)
The developer version of Mac OS X includes I/O Registry Explorer (located in
/Developer/Applications), an application that allows you to examine the I/O Registry of your
currently running system. There is also a command-line tool called ioreg that you can run in a Terminal
window to display current I/O Registry information (the Terminal application is located in
/Applications/Utilities). For more information about how to use ioreg, type man ioreg in a
Terminal window.
■ A driver personality is a dictionary of key-value pairs that specify device property values, such as family
type, vendor name, or product name. A driver is suitable for any device whose properties match one of
the driver’s personalities. In its Info.plist file, a driver stores its personalities as values of the
IOKitPersonalities key.
14
I/O Kit Summary
2007-02-08 | © 2001, 2007 Apple Inc. All Rights Reserved.
CHAPTER 2
Device Access and the I/O Kit