Course Description:This course explains in detail the concurrency, synchronization, interrupts, timers, memory, DMA, and cache of Linux kernel programming, and explains various device driver architectures, IO models, Linux porting, and device tree writing in combination with examples.
The layout of this course is such that classes are about 4 hours a day and labs are about 2 hours. Students are required to conduct experiments on computers and circuit boards.
Learner baseLinux developer (proficient in using linux, working on linux).
Course outlineChapter 1 Kernel Programming.
Warm up and familiarize yourself with the PCDUINO board.
1.Introduction and use of boards.
2.Bootloader, kernel, and file system.
3.How to update what's on the board.
Section 1 An in-depth analysis of the main APIs of kernel programming.
1 Synchronization and concurrency (atomic, spinlock, mutex, completion for an in-depth understanding).
2 Waiting queue.
3 Kernel latency.
4 Memory application and release.
5 Used as memory for DMA.
6 Memory Barriers and Register Access.
Section 2 Timers.
1 kernel timer tick
2 tickless
3 High-precision timer hrtimer
Section 3 Interruptions.
1 Break the top and bottom halves.
2 Soft interrupts.
3 tasklet
4 Work queues.
5 threaded_irq
6. Multi-core interrupt affinity and soft interrupt load balancing.
Section 4 Linux Kernel Modules.
1 Kernel module init and exit