
This course deals with the issues of developing drivers in the Linux
environment, with a discussion of broader operating systems issues for
developers.
The course covers the key
issues in Linux device drivers. Questions such as: how do I develop a character
device, how do I debug a driver,
how do I use task queues are
examined. Upon completion of this course, you will have the
information and technical understanding of how file systems work
and device drivers developed in Linux environment.
Target Audience
Students with a need to understand or develop Linux drivers and file
systems drivers on Linux.
Familiarity
with basic usage of Linux and “C” programming language.
No
knowledge of any previous device driver development is required.
COURSE OUTLINE:
Operating System Fundamentals
X86 Architecture and Windows
Kernel
Mode Vs User Mode
Linux Architecture Overview
Security Issues
Version Numbering
License Terms
The Role
of the Device Driver
Splitting
the Kernel
Classes of
Devices and Modules
Kernel
Modules Versus Applications
Compiling and Loading
The Kernel Symbol Table
Initialization and Shutdown
Using Resources
Automatic and Manual Configuration
Doing It in User Space
printk for debugging
Device information in /proc
strace to track system calls
ksyms and ksymoops
Debuggers, e.g., gdb, and kgdb
Character
Devices
Classes of device files
Major and minor numbers
Creating device files with mknod
Registering character device file
Listing character device driver methods
Data:
User To/From Kernel
Important functions for accessing user space
Shared Memory
Kiobufs
IOCTLs
What is ioctl
Using ioctl commands to interact with a device
Implementing IOCTL in drivers
Memory
management
The Real Story of kmalloc
Memory allocation with kmalloc and kfree
Lookaside Caches
get_free_page and Friends
vmalloc and Friends
Boot-Time Allocation
Page-oriented memory allocation
Memory allocation in the virtual address space
The mmap() method.
JUDICIOUS
USE OF DATA TYPES
Use of Standard C Types
Assigning an Explicit Size to Data
Items
Interface-Specific Types
Other Portability Issues
Linked Lists
Block vs Char Read/Write
Block Device Global
Variables
Request Handing
Creating a RAM Disk
Blocking
and Wait Queues
Multi-tasking
Schedule()
Wait Queues
Save sleeping
Poll()
Synchronization
Race conditions
Atomic access
Dead lock
Spinlocks
The Kernel Lock
Disabling interrupts
Registering
Readdir
Lookup Semantics
Organization
of Code
Adding
entry into the proc file system
Physical
Layout of Linux Kernel Source
This course will be conducted by a hard-core systems developer with
experience of developing file systems for Linux.