An
Introduction to Kernel Programming Brief
review of basic Linux concepts
Protected
mode
memory management—user space vs. kernel space
File system and
directory structure
Development
environment
Introducing
device drivers
What is a “device driver”?
Linux device classes and user
space API
Kernel space driver API
“Hooking” a driver into the kernel
Kernel
modules
Debugging
kernel modules
printk
proc files
Tracing—strace, Linux trace toolkit
Debuggers—gdb, kdb, kgdb
Asynchronous
I/O
Blocking vs. non-blocking operation
Invoking the driver from multiple
processes—reentrancy
Kernel
memory management
Accessing
real hardware
Using I/O Ports--“side effects”
A parallel port driver
Platform dependencies
Interrupt
handling
How Linux handles interrupts
Implementing and installing an
interrupt handler
Bottom halves -- work queues, and
tasklets
Managing
Time
Block
drivers
Registering a block driver
Handling requests
Mounting and unmounting
Network
drivers
Sockets
Network
driver methods
NAPI
What do we
mean when we say “device driver”?
Fundamentally,
a device driver implements the interface between a piece of peripheral
hardware and the application. In a traditional unprotected, “flat”
memory model system, a driver may be little more than a set of
functions conforming to a well-defined API and statically linked into
an executable image.
But in the
context of a protected mode operating system such as Linux, device
drivers take on added significance owing to the distinction between
User space and Kernel space. This 3-day hands-on seminar
provides an introduction to the wonderful world of programming in
Kernel space. As such, it provides insights not only into
device driver programming, but also into the philosophy and design
strategies of the kernel itself.
Numerous
programming exercises introduce the rich kernel API that offers a
multitude of services to driver writers. You’ll learn how
Linux handles asynchronous I/O in a way that is totally transparent to
applications. You’ll examine the unique problems of debugging
in Kernel space. Perhaps most important, you’ll see how much
of a device driver involves interactions with the kernel that have
nothing to do with accessing physical hardware.
Check out this video for a short
description of the class