Linux Kernel and Device Drivers
Start Date: 19/11/2025
Course Overview
Examples are in C.
Course exercises include the implementation of a functional character device driver, and a skeletal network device driver, using kernel 3.10 (RHEL 7.X).
Who should attend?
Software architects, designers, developers and analysts with Linux experience who need to learn and program in the kernel environment, including device drivers.Prerequisite:
Linux experience is a must, including user mode programming (using gcc, Make) and editing.
Programming experience in ANSI C, with the standard library, including sockets programming is also a requirement.
Course Outline:
1. Introduction
• The Linux Kernel
2. Kernel Architecture
• Linux kernel general properties
• System calls
• Task Scheduler – Details and evolution
• I/O Schedulers –
– CFQ
– No op
• Kernel Preemption
• Threads NPTL
3. The Kernel Perspective
• Files and FileSystems
• Devices
• Processes
• Floating Point
4. Module Programming (+Exercises)
• Implementing Kernel modules
• Module writing guidelines
• Kernel structures
• Printk
5. Character Device Drivers (+Exercises)
• Device numbers
• Essential kernel structures –
– file
– file_operations
– cdev
• Registering a character device
6. Character Device Drivers (Continued)
• Device System Calls
• open, close Working with User Space memory
• Implementing read, write and ioctl
• Virtual Memory Management – overview
• mmap
• devtmpfs
• udev
• Timing issues and kernel timers
• Synchronicity –
– spinlocks
– wait queues
• read and write with support of both blocking and non blocking i/o
• poll
• Handling Interrupts
• Bottom Halves
• SoftIRQs, Work Queues, TaskLets and threaded irq’s
8. Network Device Drivers (+ Exercises)
• The Linux Protocol Stack
• Packet flow – from the interface to the application and back
• Socket buffer operations
• PF_PACKET
• Hooking with NetFilter
• Overriding network system calls
9. Debugging mechanisms
• Kernel debugging techniques in Linux –
– standard /proc and /sys entries
• Implementing entries in /proc
• Handling Oops and Panics
• debugfs
• KProbes
• Magic SYSRQ
• KDB