Kernel-Side Services

This section describes how device drivers can use the services that the Kernel provides.

The section begins with a discussion of the APIs for fundamental types such as buffers and arrays. Kernel side programs cannot use all of the same APIs as user-side programs, so you need to be aware of these restrictions, and the alternative APIs provided by the Kernel.

The guide then discusses a number of idioms for communicating between different threads and processes, including Publish and Subscribe, Kernel-side messages, shared chunks, and environment slots.

Some more advanced programming issues are then discussed, including how to design a device driver to behave correctly in a demand paged OS environment, in which client programs may not be continuously in memory, and how to integrate a device driver with system wide power resource management.

The section ends with a discussion of how Kernel APIs encourage safe programming with the use of precondition checks.