Training > Linux Kernel Development > Linux Kernel Internals and Development (LFD420)

Linux Kernel Internals and Development (LFD420)

Learn how to develop for the Linux kernel. In this instructor-led course you’ll learn how Linux is architected, the basic methods for developing on the kernel, and how to efficiently work with the Linux developer community. If you are interested in learning about the Linux kernel, this is the definitive course on the subject.

Who Is It For

This course is designed to provides experienced programmers with a solid understanding of the Linux kernel. Students should be proficient in the C programming language, basic Linux (UNIX) utilities such as ls, grep and tar, and be comfortable with any of the available text editors (e.g. emacs, vi, etc.).
read less read more
What You’ll Learn

In this course you will learn how Linux is architected, how kernel algorithms work, hardware and memory management, modularization techniques and debugging, how the kernel developer community operates and how to efficiently work with it, and much more.
read less read more
What It Prepares You For

You will come away from this course with a detailed understanding of the theory and philosophy behind the Linux kernel, and the ability to develop and debug Linux kernel code.
read less read more
Course Outline
Expand All
Collapse All
Who You Are
The Linux Foundation
Linux Foundation Training
Certification Programs and Digital Badging
Linux Distributions
Preparing Your System
Using and Downloading a Virtual Machine
Things change in Linux
Documentation and Links
Course Registration
Kernel Versions
Kernel Sources and Use of git
How to Work in OSS Projects **
Overview on How to Contribute Properly
Stay Close to Mainline for Security and Quality
Study and Understand the Project DNA
Figure Out What Itch You Want to Scratch
Identify Maintainers and Their Work Flows and Methods
Get Early Input and Work in the Open
Contribute Incremental Bits, Not Large Code Dumps
Leave Your Ego at the Door: Don’t Be Thin-Skinned
Be Patient, Develop Long Term Relationships, Be Helpful
Kernel Architecture I
UNIX and Linux **
Monolithic and Micro Kernels
Object-Oriented Methods
Main Kernel Tasks
User-Space and Kernel-Space
Kernel Mode Linux **
Kernel Programming Preview
Error Numbers and Getting Kernel Output
Task Structure
Memory Allocation
Transferring Data between User and Kernel Spaces
Linked Lists
String to Number Conversions
What are Modules?
A Trivial Example
Compiling Modules
Modules vs Built-in
Module Utilities
Automatic Loading/Unloading of Modules
Module Usage Count
The module struct
Module Licensing
Exporting Symbols
Resolving Symbols **
Kernel Architecture II
Processes, Threads, and Tasks
Process Context
Kernel Preemption
Real Time Preemption Patch
Dynamic Kernel Patching
Run-time Alternatives **
Porting to a New Platform **
Kernel Initialization
Overview of System Initialization
System Boot
Das U-Boot for Embedded Systems**
Kernel Configuration and Compilation
Installation and Layout of the Kernel Source
Kernel Browsers
Kernel Configuration Files
Kernel Building and Makefiles
initrd and initramfs
System Calls
What are System Calls?
Available System Calls
How System Calls are Implemented
Adding a New System Call
Kernel Style and General Considerations
Coding Style
kernel-doc **
Using Generic Kernel Routines and Methods
Making a Kernel Patch
Using likely() and unlikely()
Writing Portable Code, CPU, 32/64-bit, Endianness
Writing for SMP
Writing for High Memory Systems
Power Management
Keeping Security in Mind
Mixing User- and Kernel-Space Headers **
Race Conditions and Synchronization Methods
Concurrency and Synchronization Methods
Atomic Operations
Bit Operations
Disabling Preemption
Completion Functions
Read-Copy-Update (RCU)
Reference Counts
SMP and Threads
SMP Kernels and Modules
Processor Affinity
SMP Algorithms – Scheduling, Locking, etc.
Per-CPU Variables **
What are Processes?
The task_struct
Creating User Processes and Threads
Creating Kernel Threads
Destroying Processes and Threads
Executing User-Space Processes From Within the Kernel
Process Limits and Capabilities **
Process Limits
Monitoring and Debugging
Debuginfo Packages
Tracing and Profiling
SysRq Key
oops Messages
Kernel Debuggers
Main Scheduling Tasks
Scheduling Priorities
Scheduling System Calls
The 2.4 schedule() Function
O(1) Scheduler
Time Slices and Priorities
Load Balancing
Priority Inversion and Priority Inheritance **
The CFS Scheduler
Calculating Priorities and Fair Times
Scheduling Classes
CFS Scheduler Details
Memory Addressing
Virtual Memory Management
Systems With and Without MMU and the TLB
Memory Addresses
High and Low Memory
Memory Zones
Special Device Nodes
Page Tables
page structure
Kernel Samepage Merging (KSM) **
Huge Pages
Huge Page Support
Transparent Huge Pages
Memory Allocation
Requesting and Releasing Pages
Buddy System
Slabs and Cache Allocations
Memory Pools
Early Allocations and bootmem()
Memory Defragmentation
Process Address Space
Allocating User Memory and Address Spaces
Locking Pages
Memory Descriptors and Regions
Access Rights
Allocating and Freeing Memory Regions
Page Faults
Disk Caches and Swapping
Page Cache Basics
What is Swapping?
Swap Areas
Swapping Pages In and Out
Controlling Swappiness
The Swap Cache
Reverse Mapping **
OOM Killer
Device Drivers**
Types of Devices
Device Nodes
Character Drivers
An Example
What are Signals?
Available Signals
System Calls for Signals
Signals and Threads
How the Kernel Installs Signal Handlers
How the Kernel Sends Signals
How the Kernel Invokes Signal Handlers
Real Time Signals
Closing and Evaluation Survey
Evaluation Survey

** These sections may be considered in part or in whole as optional. They contain either background reference material, specialized topics, or advanced subjects. The instructor may choose to cover or not cover them depending on classroom experience and time constraints.
To make the most of this course, you must:

Be proficient in the C programming language, basic Linux (UNIX) utilities such as ls, grep and tar, and be comfortable with any of the available text editors (e.g. emacs, vi, etc.) Experience with any major Linux distribution is helpful but not strictly required.

Feb 2021
The training materials, and lab exercises.
Feb 2021
Learning the basic parts of the kernel, good explanations in text, and good explanations from the instructor. Labs, especially the ones I completed with no help, that was very satisfying.
Feb 2021
It seems like a great jumping point to get into the kernel internals. Often the most difficult part of learning something new is where to start, what the vocabulary is etc., and this course provides that.
Feb 2021
I got a much better understanding of memory management and scheduling. I also liked all the practice I got writing kernel modules.
Feb 2021
The content, and the presentation of it was great.
Feb 2021
The content was a good surface-level overview of many parts of the kernel. There was a good mixture of in-kernel and user-space (supporting) content.
Feb 2021
The hands on labs were the best way for me to learn.
Feb 2021
I've learned a lot about the kernel stuff which I did not have any knowledge of. I was just a somewhat savvy Linux user, so this was extremely helpful. I appreciate the learning material, and the exercises to get some hands on work.
Feb 2021
The lecturer has excellent narration skills.
Feb 2021
Comprehensive in a short time.
Jan 2021
I learned lots of new things, and got insight into things where I had only scratched the surface so far.
Dec 2020
The training materials are kept up to date.
Dec 2020
The labs and the lab solutions.
Dec 2020
The instructor is an expert in the area, and I really learned a lot from it.
Dec 2020
A good overview over most relevant kernel aspects. The course and material given is a good starting point for deeper self-study.
Dec 2020
I have already written some drivers, but some of the kernel internals were ambiguous for me. This course helped me to really get a better understanding of some of the kernel internals.
Dec 2020
I learned a lot of new stuff, and feel much more confident with the technology.
Dec 2020
General overhaul, great answers to questions, competent instructor, and chilled course.
Dec 2020
The course covers a wide range of Linux kernel internals, with practical lab exercises.
Dec 2020
Trainer was very helpful and kind.
Dec 2020
The very well prepared Solutions for each lab. This enables one to compare your own results with the provided solution.
Dec 2020
Labs verified we could build write build exercise kernel code, with the opportunity to have instructor explain what's happening when things don't go as planned - the shell script to set up your VM was a nice touch - intro to some APIs is useful - written materials serve as a helpful reference - when the instructor got off the written materials/script, such as in response to questions, he remained informative and interesting.
Dec 2020
The instructor was very knowledgeable, and provided a lot of outside information from the course that was very valuable.
Dec 2020
Comprehensive overview of lots of top-level kernel stuff. Will be referencing the source material for kernel referencing in the future. Lecturer was knowledgeable.
Dec 2020
The instructor is really knowledgeable, and was able to answer our questions succinctly and thoroughly. He was really approachable.
Dec 2020
I liked the level of expertise of the instructor.
Dec 2020
Learning the data structures and available kernel API functions to pay attention to was helpful. The instructor was VERY knowledgeable about the "why" factor that doesn't appear in the text for historical and event-driven reasons for why things are the way that they are in the Linux kernel. The instructor made greatly memorable stories and analogies for specific topics, such as polar bear story for taint bits, and slicing cake for slab allocator.
Dec 2020
I liked the labs.
Nov 2020
The instructor made the presentation of difficult and often technical / complicated material engaging and interesting.
Nov 2020
Frank was very informed about the history of the linux/unix world, he knew just about everything about the history of the course.
Nov 2020
Frank was very knowledgeable, and covered a lot of material in good depth.
Nov 2020
The instructor was really passionate, and added a lot of reasoning behind decisions, which really helps to grasp why things are done the way they are.
Nov 2020
I liked the instructors insights (how he'd search for some important information), updated topics (the manual), relevant to the latest kernel, which I'm gonna use as a reference.
Oct 2020
I liked the hands-on lab exercises, and the well-organized course content.
Oct 2020
I liked the material, and the instructor's enthusiasm.
Oct 2020
Hands on compiling, and booting your own kernel was a lot of fun. This also gave a lot of insight into many details such as configuration, getting to relevant log and debug information.
Oct 2020
The instructor was really good, and obviously has a deep and extensive knowledge. The historical knowledge was really helpful and interesting, and his tenor and good attitude was very much appreciated.
Oct 2020
I thought the focus of big picture concepts versus details was well balanced. Having a book reference was very useful so I could look into certain topics in more depth than what was presented. The labs were mostly interesting, and I liked that there were solutions provided so I had the option of comparing my work, or just looking at and understanding them instead. The instructor having a terminal open, and doing examples and other things 'live', was also helpful.
Oct 2020
The instructor was very knowledgeable. I enjoyed the lab exercises, and wished there had been enough time to go through all of them.
Oct 2020
Frank was super knowledgeable, and very good at explaining things in a very concise manner.
Oct 2020
I liked getting into the internals of the operating system design, and having concrete examples that demonstrated many concepts.
Oct 2020
I liked the lab portions, and I feel the instructor was very thorough in answering questions and providing real examples.
Oct 2020
It provides a good overview of the Kernel for someone who wants to get kick-started.
Oct 2020
The course helped with a great foundation for the Linux kernel development process. The white board pictures helped in solidifying the understanding of the content, and in fact should be a part of the book itself.
Oct 2020
The material seems succinct and includes a lot, which will be wonderful for reference in the future. John Bonesio is a pretty cool guy! (Love his jokes)
Oct 2020
I enjoyed the labs, and being provided high quality solutions to compare to.
Jun 2020
I liked how incredibly knowledgeable John is. The course manual is really awesome, and I really like examining the lab solutions.
Jun 2020
The white board discussions were very helpful in grasping key concepts. The instructor patiently answered all the follow up questions with detailed answers.
Jun 2020
Whiteboard drawings were helpful. The instructor managed to keep the class moving along whilst taking time to answer questions, and we managed to stay on schedule.
Jun 2020
The instructor was always willing to answer any questions. The drawings on the whiteboard helped me to understand some of the topics better.
Jun 2020
The labs are well thought out and really enforce the learning. Our instructor was fantastic.
Jun 2020
I would definitely recommend this course to others. I came away with much better knowledge than when I started.
Aug 2020
John's diagrams and explanations were excellent, he managed to keep the class moving along whilst taking time to answer questions. The material is very good.
May 2020
This course is really up to date.
May 2020
Liked the live demos, and the amount of material covered whilst still going into detail.
May 2020
Liked the material, and the instructor shared good knowledge about the Linux Kernel development.