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
- Objectives
- Who You Are
- The Linux Foundation
- Copyright and No Confidential Information
- 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
- Procedures
- Kernel Versions
- Kernel Sources and Use of git
- Labs
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 Components
- 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
- Object-Oriented Inheritance - Sort Of
- Linked Lists
- String to Number Conversions
- Jiffies
- Labs
- 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 Startup
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
- SMP Algorithms - Scheduling, Locking, etc
- Per-CPU Variables **
- Labs
- 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
- 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
- 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
- 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
- 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.
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 2022
I would be happy to take a class with this instructor again.
Feb 2022
I loved the level of knowledge and passion for the topic that the instructor had!
Feb 2022
The instructor's extensive knowledge of Linux, and his passion for teaching this class.
Feb 2022
Frank sounds knowledgeable and experienced with the course material, which was a huge plus. Course material provides "links" to where files in the source are located, which is extremely helpful for learning to navigate the kernel tree.
Mar 2022
Instructor answering questions and showing things from CLI, his expertise and history was invaluable.
Mar 2022
Instructor was very knowledgeable on the course material.
Mar 2022
I liked the broad knowledge of the instructor.
Mar 2022
The instructor covers all the topics, and the coverage is decent.
Mar 2022
I enjoyed the in depth knowledge about Linux. I didn't realize there were a lot of things going on under the hood that we discussed thoroughly.
Apr 2022
The expertise of Frank Edwards is amazing, really good communication. The content of the course is also extensive, very complete.
Apr 2022
The instructor was great. It's not easy to instruct in zoom, especially when all the participants are muted, and have their cameras off. He did very well.
Jan 2022
Frank is very knowledgeable and approachable, I really enjoyed his teaching.
Jan 2022
Patience of the instructor, and the willingness to answer questions.
Jan 2022
Extremely informative, thanks!
Jan 2022
John did a great job of answering questions in a way that didn't make me feel dumb for asking them, and clearly has a deep knowledge of Linux, as he explained things clearly. Also, the jokes at the start of the day were fun. This whole class has been a great experience overall. I hope to take more courses in the future.
Jan 2022
John was an excellent instructor. He has a great sense of humor, which made this virtual experience much more lively. I wish we could do this course in person.
Jan 2022
The whiteboarding used by the instructor helped me understand the material in a better way, please keep doing that.
Jan 2022
Hands-on exercises, and the ability to ask someone questions about the kernel rather than trying to figure out. The proper wording of questions in a search engine.
Jan 2022
Kernel used to be a black box to me, but this course helped me understand a lot about it. Now I know how I can modify it to my advantage, which has helped me a lot in my career. I look forward to signing up for other courses from Linux Foundation.
Jan 2022
Overall good structure, felt like the best of both worlds, relaxed from being virtual, but still felt extremely involved in the course despite that.
Jan 2022
The instructor has a very deep knowledge of the Kernel, and was able to use his experience to point out things that are obscure and hard to grasp in the kernel.
Jan 2022
The course content, lab and not the least, the instructor. He is very knowledgeable, and an excellent teacher in that he succeeded to keep the sessions alive throughout, while balancing the time crunch. The occasional jokes were refreshing.
Jan 2022
Student material is great, and the teacher was great too.
Jan 2022
The sections on memory management, and how to set affinities with things like cpuset.
Jan 2022
Lots of new information in addition to what was previously learnt. Study material is well structured to be used as a reference book.
Jan 2022
The instructor's method of explaining the concepts, and the material covered during the training are great.
Jan 2022
Excellent course all in all!
Jan 2022
John is an amazing instructor. Thanks!
Jan 2022
The instructor's soft skills - I feel the course/instructor made an intimidating subject more approachable - The well-thought out labs, with the correct answers were available too.
Jan 2022
The instructor went through the material very well. The course material itself covers many topics, but in good depth as well.
Jan 2022
The labs were great, and the feedback from the instructor in responding to student questions was great.
Jan 2022
Very engaging. Presentation and diagrams did a lot to make the material more understandable.
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.
Mar 2021
This is my first training experience with the Linux Foundation, and it exceeded my expectations. Material was current and well-presented. Bravo!