Kernel Programming
This is the home page for the "Kernel Programming" course.
Here, you will find (in a badly-organised form) all the
material, slides, and information needed to attend the course
For the previous edition of the course, check the old website.
Lessons:
- First lesson: 2019/02/26, 13:00 -> 15:30
- Introduction to the course
- Example of toy kernel that just boots
- Second lesson: 2019/03/05, 9:30 -> 12:00
- Introduction to the Linux kernel
- A minimal Linux-based OS
- Linux kernel modules
- Third lesson: 2019/03/13, 11:00 -> 13:30
- Testing kernel modules in a simple VM
- Something more about user-space/kernel-space interactions
- Fourth lesson: 2019/03/19, 9:30 -> 12:00
- More examples with misc devices
- Blocking a task; TASK_INTERRUPTIBLE vs TASK_UNINTERRUPTIBLE
- Fifth lesson: 2019/03/26, 9:30 -> 12:00
- Something about kernel mutexes
- Bug in the mutex example, and how to debug it
- First example of cooperative synchronization
- Coping with signals
- Sixth lesson: 2019/04/02, 9:30 -> 12:00
- Cooperative synchronization done right, the waitqueues
- Fixing the bug in the previous example (coping with signals)
- Using the Linux kernel completions
- Linux kernel lists
Slides:
Example Code:
Other Material:
- Basic OS image for testing the modules (built with https://gitlab.retis.sssup.it/l.abeni/BuildCore.git)
- Instructions for creating and modifying the simple OS image
- To test a Linux kernel (or module) in a VM while saving the kernel
messages in a text file on the host (for debugging, or similar), add
'
-append "console=tty console=ttyS0" -serial file:log.txt'
(use the file name you prefer instead of log.txt)
to the qemu command line