Linux Internals and Device Drivers
Course
In Carshalton
Description
-
Type
Course
-
Location
Carshalton
-
Duration
5 Days
Extensive hands-on exercises help you develop your skills and understanding: Finding your way around the Linux Documentation Project documents. Developing some Intel assembler programs to better understand the machine specific parts of Linux. Investigating process creation and management in Linux. Investigating inter-process communication mechanisms in Linux. Implementing. Suitable for: The course is aimed at programmers and technical managers who need to gain a sound basic understanding of Linux internals and Linux Device Drivers. The course is aimed at experienced C programmers who have a good working knowledge of Linux and the Gnu Compiler Collection.
Facilities
Location
Start date
Start date
Reviews
Course programme
In this workshop the structure and functioning of the Linux Kernel and the design and implementation of Linux Device Drivers will be explored in depth.
The course will be taught using Pentium based PCs, but can also be taught on other platforms such as Power PC and Alpha platforms.
Because of the extent of the subject area attendees will be given two set books (both published by O'Reilly):
- Linux Device Drivers 3/e by Rubini, Corbet and Kroah-Hartman
- Understanding the Linux Kernel by Bovet and Cesati
Intended Audience
The course is aimed at programmers and technical managers who need to gain a sound basic understanding of Linux internals and Linux Device Drivers. The course is aimed at experienced C programmers who have a good working knowledge of Linux and the Gnu Compiler Collection.
Key Skills
After taking this course you will be able to:
- Understand the issues involved in porting Linux to non Intel platforms
- Understand the Linux build process, and the Linux versioning model.
- Appreciate the changes to Linux from 1.x to 2.x expecially the changes from 2.4 to 2.6
- Make sense of key Linux Kernel data structures and functions behind memory management, signals, process scheduling, I/O device management
- Implement , troubleshoot and modify char and block device drivers
- Implement , troubleshoot and modify network device drivers
- Understand how the latest versions of Linux support multi-threading and Symmetric Multi-Processing.
Practical Work
Extensive hands-on exercises help you develop your skills and understanding:
- Finding your way around the Linux Documentation Project documents
- Developing some Intel assembler programs to better understand the machine specific parts of Linux
- Investigating process creation and management in Linux
- Investigating inter-process communication mechanisms in Linux
- Implementing and testing a loadable module
- Building a char block device driver as a loadable module
- Building and testing a block device driver as a loadable module
- Building and testing a network interface driver
- Case study 1 - USB bus driver
- Case study 2 - CAN bus driver
- Case study 3 - driver for a stepper motor controller
Course Contents
Background
- The evolution of Linux
- Linux and the POSIX API
- Understanding how the Linux Kernel is split up
- The major differences between Linux 1.x and Linux 2.x
- Key changes between Linux 2.4 and Linux 2.6
- Memory addressing - segmentation and paging (hardware and software aspects)
- Process creation, process switching, process destruction
- Interrupts and Exception Handling
- Time, timing and timer interrupts
- Memory management and the Process Address Space
- System calls, Signals and the POSIX API
- I/O Devices
- File systems - VFS, EXT2,
- Inter-process communication
- Program loading and execution
- Loadable modules and insmod
- Security issues with loadable modules
- Applications compared to Kernel modules
- User space, Kernel space
- Compiling and loading a module
- Initialisation, shutdown and error handling by a module
- Usage counting and module unloading
- How a module accesses and acquires system resources (I/O Ports, I/O memory)
- Automatic and manual configuration
- User space drivers
- major and minor device numbers
- dynamic allocation of major numbers
- file operations - the file_operations structure and the file structure
- Case study - Rubini and Corbet's scull device
- Getting applications to use new devices
- Device drivers and the devfs filesystem
- Device driver testing and debugging
- Using ioctl commands
- Blocking vs. non-blocking I/O
- Access Control to a device
- Timer interrupts and Kernel time
- Kernel time and the jiffies variable
- Task queues
- Understanding Kernel timers
- kmalloc
- Lookaside caches
- vmalloc
- Boot time memory allocation
- I/O Ports and I/O Memory
- Interrupts and Interrupt handling
- The /proc interface
- Circular buffers
- Spinlocks
- Race conditions
- Sysfs
- Registering
- Handling requests - and data transfer
- Queuing and block drivers
- The ioctl command and block drivers
Linux Internals and Device Drivers