Training > Linux Kernel Development > Linux Kernel Internals and Development (LFD420)
INSTRUCTOR-LED COURSE

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
Introduction
- Objectives
- Who You Are
- The Linux Foundation
- Linux Foundation Training
- Certification Programs and Digital Badging
- Linux Distributions
- Platforms
- Preparing Your System
- Using and Downloading a Virtual Machine
- Things change in Linux
- Documentation and Links
Preliminaries
- Procedures
- 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 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
- Jiffies
- Labs
Modules
- What are Modules?
- A Trivial Example
- Compiling Modules
- Modules vs Built-in
- Module Utilities
- Automatic Module Loading
- Module Usage Count
- The module struct
- Module Licensing
- Exporting Symbols
- Resolving Symbols **
- Labs
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 **
- Labs
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
- Labs
System Calls
- What are System Calls?
- Available System Calls
- How System Calls are Implemented
- Adding a New System Call
- Labs
Kernel Style and General Considerations
- Coding Style
- kernel-doc **
- Using Generic Kernel Routines and Methods
- Making a Kernel Patch
- sparse
- 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 **
- Labs
Race Conditions and Synchronization Methods
- Concurrency and Synchronization Methods
- Atomic Operations
- Bit Operations
- Spinlocks
- Seqlocks
- Disabling Preemption
- Mutexes
- Semaphores
- Completion Functions
- Read-Copy-Update (RCU)
- Reference Counts
- Labs
SMP and Threads
- SMP Kernels and Modules
- Processor Affinity
- CPUSETS
- SMP Algorithms - Scheduling, Locking, etc
- Per-CPU Variables **
- Labs
Processes
- 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
- Labs
Process Limits and Capabilities **
- Process Limits
- Capabilities
- Labs
Monitoring and Debugging
- Debuginfo Packages
- Tracing and Profiling
- sysctl
- SysRq Key
- oops Messages
- Kernel Debuggers
- debugfs
- Labs
Scheduling
- Main Scheduling Tasks
- SMP
- 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
- Scheduler Details
- Labs
Memory Addressing
- Virtual Memory Management
- Systems With and Without MMU and the TLB
- Memory Addresses
- High and Low Memory
- Memory Zones
- Special Device Nodes
- NUMA
- Paging
- Page Tables
- page structure
- Kernel Samepage Merging (KSM) **
- Labs
Huge Pages
- Huge Page Support
- libhugetlbfs
- Transparent Huge Pages
- Labs
Memory Allocation
- Requesting and Releasing Pages
- Buddy System
- Slabs and Cache Allocations
- Memory Pools
- kmalloc()
- vmalloc()
- Early Allocations and bootmem()
- Memory Defragmentation
- Labs
Process Address Space
- Allocating User Memory and Address Spaces
- Locking Pages
- Memory Descriptors and Regions
- Access Rights
- Allocating and Freeing Memory Regions
- Page Faults
- Labs
Disk Caches and Swapping
- Caches
- Page Cache Basics
- What is Swapping?
- Swap Areas
- Swapping Pages In and Out
- Controlling Swappiness
- The Swap Cache
- Reverse Mapping **
- OOM Killer
- Labs
Device Drivers**
- Types of Devices
- Device Nodes
- Character Drivers
- An Example
- Labs
Signals
- What are Signals?
- Available Signals
- System Calls for Signals
- Sigaction
- Signals and Threads
- How the Kernel Installs Signal Handlers
- How the Kernel Sends Signals
- How the Kernel Invokes Signal Handlers
- Real Time Signals
- Labs
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.
Prerequisites
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.

Reviews
Sep 2021
The instructor was knowledgeable and helpful. In virtual environments it's hard to gauge the students' progress / interests, but John did a great job of responding to our feedback, taking pauses to see if we had questions, and making sure everyone was finished with exercises before we moved on.
Sep 2021
John is amazing!
Sep 2021
The instructor was really an expert on the topics. I really appreciated that.
Sep 2021
John was very enthusiastic, knowledgeable, and helpful. He always started a session with a joke, which was a nice way to start the day.
Sep 2021
There was a lot of subject matter that I learned about. Some of these things were topics that I've heard of but didn't know what they were, or how they worked - the subject matter was well-thought through, and well-delivered.
Sep 2021
The breadth and depth of the content was appropriate, and very interesting.
Sep 2021
Instructor was super knowledgeable! He had a good answer for every question.
Aug 2021
Clarity, and depth of technical knowledge shared in the class.
Aug 2021
The labs were great, and Behan made it very easy to understand.
Aug 2021
I like the course material.
Aug 2021
I feel this course gave me a useful "look under the hood" of Linux kernel, and explained many of the problems/solutions an operating system has. A lot of useful websites and material for additional learning were given. While I still wouldn't consider myself an expert, I now feel I have a strong enough understanding that I could develop kernel code.
Aug 2021
I enjoyed the instructor. I felt he did well at explaining topics, and added additional material to the course that was useful, that was not in the student's material.
Aug 2021
Frank the instructor is really experienced.
Aug 2021
Frank's enthusiasm and (in particular!) his live demonstration/elaboration of subjects discussed.
Aug 2021
The material is very relevant, and indeed delivered exactly what I was expecting. The book is also very good.
Aug 2021
The lecturer was very interactive, and well-versed in the subject matter. He explained all the concepts with scary perfection.
Aug 2021
The instructor really knows what he talking about. Ideas were presented very clearly, and in a very organized way. Also, the instructor made sure to always make a connection between things in the material, and real things in the outside world that they have experienced.
Jun 2021
In using recent kernel, the book appears to be well-done and comprehensive. The presentations were a nice compliment to the written material, well structured in general. Thanks a lot, and well done!
Jun 2021
Increased my knowledge, to be able to teach Kernel Drivers more effectively, and become more comfortable with teaching Kernel Internals.
Jun 2021
The instructor helped with the solving of lab exercises, with detailed explanations.
May 2021
The instructor, Frank Edwards, was EXTREMELY knowledgeable and personable.
May 2021
Frank is a really great instructor!
Apr 2021
It gave me very good knowledge of the topic. If it was not for this course, I would have spent many more hours researching this subject.
Apr 2021
The book is a great reference.
Apr 2021
The material and the labs were really good. Frank did an excellent job teaching us the Linux foundation class.
Apr 2021
I liked the instructor's examples on a real VM.
Apr 2021
The training material was very well prepared. The provided VM notes, labs and solutions meant setup was easy, and more time was spent on the course material, rather than troubleshooting environmental issues. Ice breaker jokes are a good way to start each day.
Apr 2021
I got a lot out of this course. The instructor, John, clearly knows his stuff, and explained everything very well.
Apr 2021
Instructor was very knowledgeable, and had clear and concise answers to any questions asked throughout the course. Course notes were comprehensive and well organised.
Apr 2021
As someone coming from a Windows Kernel Development background, the thing I liked most was the good overview of Linux Kernel Architecture/Components, and the chance to get familiar with writing code for it, and the environment.
Apr 2021
The instructor navigating the pitfalls, and reducing the number of stuck students.
Apr 2021
The material was great. Having the solutions available was actually really helpful for learning, as I would have been a bit lost without seeing an example for some of them.
Apr 2021
I really enjoyed being forced in some of the latter labs to find information for myself. This helped solidify some of the earlier content that I'd passed through without remembering, as well as giving me some more practice at seeking out these answers myself from google/source code.
Apr 2021
The instructor was very friendly and knowledgeable. I enjoyed his jokes, and he gave plenty of time for labs, which was good, they were useful and meaningful.
Apr 2021
I liked the technical detail from the get-go. There were a few things cleared up that I appreciated.
Apr 2021
The instructor was very knowledgeable, and did a really good job clarifying all questions asked.
Apr 2021
Depth of knowledge of the instructor, and extra explanations of questions.
Mar 2021
Frank was extremely knowledgeable, and very enthusiastic about the subject. It is very easy to stay engaged while he is presenting.
Mar 2021
This is my first training experience with the Linux Foundation, and it exceeded my expectations. Material was current and well-presented. Bravo!
Mar 2021
Lots of technical information, and a great book for reference.
Mar 2021
Both the instructor and the content was great.
Mar 2021
Frank is an excellent instructor. His depth of Linux kernel understanding, and the clarity with which he explains the topics and answers questions, is exceptional. Also loved all the movie references!
Mar 2021
Frank is super knowledgeable, and thoroughly answered questions. His geeky sense of humor was perfect for long discussions about some pretty technical stuff. Personal highlights were monitoring and debugging, scheduling memory management, device drivers, and signals.
Mar 2021
Frank was very clear, covered material well, and at a good pace.
Mar 2021
Great coverage of the most important aspects of Linux internals.
Mar 2021
The instructor Frank is a very friendly guy, and seems to love teaching. He is talkative, and for this reason I could absorb a lot.
Mar 2021
I really liked the instructor, he had huge knowledge of the subject.
Mar 2021
The instructor is highly competent, and knows everything in detail. The material is very useful, with lab examples and solutions that will make live easier from now.
Mar 2021
I liked the material, and the instructor's insight.
Mar 2021
The instructor was very open for questions, and chatted about tangential stuff, which meant that I not only learned a lot about the subject, but also got many references for other subjects.
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
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.