After a brief review of architecture and driver concepts, the course discusses the design and implementation of device drivers in Linux in both datacenters and embedded systems environments. You will learn about kernel resource management for device drivers, their allocation and deallocation, interfaces to context management and building custom kernels. Topics include character device interfaces, time and timing, memory and address management, interrupt handling and debugging techniques. Other topics include addressing concurrency from a device driver developer perspective; e.g. the impact of CPU hyper-threading and task preemption.
The instructor will share code samples and real-world experiences of device and kernel porting to augment your learning. Your assignments will ask you to analyze, develop and debug different classes of device drivers. You will need access to a Linux environment with root privilege. Any distribution is fine as long as the Linux kernel version is 2.6 and above. Options include VMWare, VirtualBox, LiveCD, disk partition or separate drive.
- Review of Linux architecture
- Terms and concepts for device drivers
- Compiling a custom kernel
- Building and running modules
- Character device driver concepts
- Debug interfaces for kernel drivers and PROCFS
- Concurrency and synchronization: primitives and design considerations
- Topics in character device drivers: IOCTL, LSEEK, MMAP, scatter-gather IO
- Notion of time and timing in the kernel: dealing with fine-granular latencies
- Hardware management and interfaces
- Deferred execution and interrupt handling
- Portability considerations
- Block driver interfaces and design
Skills Needed: A basic knowledge of C language programming. "Linux Kernel Architecture and Programming" or equivalent experience is recommended.