Linux Kernel Fundamentals Training

Answers to Popular Questions:

Yes, this class can be tailored to meet your specific training needs.
Yes, we provide Linux Unix consulting services.
Yes, group discounts are provided.

Course Description

This 5-day course will provide a fundamental knowle dge of the internals of the Linux kernel. The focus is on understanding the workings of the kernel, and not the theory. The c ourse is valuable to any system administrator who seeks to have a greater understanding of the Linux ke rnel. The course is based on Linux kernel 2.6.32 as modified for RHEL/CentOS version 6.3. For demons trations, the course uses the cscope utility to show source files, and the crash utility to demonstrate their use in a live kernel. This course is also the basis for additional traini ng on writing kernel driver s and kernel debugging.
Course Length: 5 Days
Course Tuition: $2400 (US)


As this is an advanced level course, students must have taken courses in the following subjects: Linux Fundamentals, Linux System Administration, and C Programming.

Course Outline


1. Course Overview
Course Prerequisites
System Environment
Conventions Used in the Studen Materials
Command Prompts
Keyboard Usage

2. Linux Kernel Introduction
Operating Systems and Kernels
Definition of Terms
Modes of Operations
Approaches to Kernel Design
Standards and Common Interfaces
The Impact of Architecture
Along Came Linux
History of Linux
Linux Kernel Versions
Some Linux Distributions
Linux Kernel Websites
Linux Kernel Organization
Data Flow between Kernel and
Copying Buffers
The printk Statement
The /proc Directory
The /sys Directory

3. Linux Kernel Source
Installing Kernel Source
CentOS Source Install
Source Installation
Updating Kernel Source Source Install
Downloading Kernel Source
Installing Kernel Source
Updating Kernel Soure
Patching the Kernel
View of Kernel Source
Finding References
Kernel Symbol Tables
The File
The kallsyms File
Searching with Linux Commands
The cscope Command
Starting cscope
Searching the Source Files
Navigating the Search Results
Kernel Programming Style
C Language Usage
Other Kernel Coding Conventions
Opaque Types
Explicitly Sized Types
Byte Order
Header Files
Inline Assembly
Common Kernel Datatypes
 Linked Lists
Manipulating Linked Lists
Traversing Linked Lists
Red Black Tree

4. Building the Linux Kernel
The Build Environment
Steps for Building Kernel
Creating a Configuration File
Editing the Configuration File
The gconfig Utility
Configuration Options
Building the Kernel
RPM Build of Kernel
The kernel ABI (kABI)
Modify Kernel Specifications Script
Build the RPM File
Non-RPM Kernel Build
Setting the Kernel Version Information
Building the Kernel
Installation of Modules
Installation of Kernel
Using the crash Utility
Options to crash Utility
Analyzing the Running Kernel
The crash Commands

5. Booting the Kernel
Unit Overview
System Startup
Master BootRecord (MBR)
The Boot Loader
Grand Unified Bootloader (GRUB)
Linux Loader (LILO)
Other Boot loaders
Loading the Linux Kernel
Kernel Image File
The Initial RAM Disk
Initial RAM File System (initramfs)
Kernel Configuration Parameters
Starting the Linux Kernel
The bzImage File
Architecture Dependent Initialization
The start_kernel() Function

6. Process Data Structures
The Process Descriptor
The task_struct Structure
The Kernel Process Stack
Process Identifiers
Process Relationships
Linux Threads
Process Credentials
Process Resource Limits
Understanding Memory
Virtual (linear) Memory
The Memory Descriptor
Memory Areas
Page Tables
Process File Structure
The fs_struct Object
The files_struct Object

7. Process Management
Process Creation
Copy-on-Write (COW)
fork(), clone(), and vfork()
exec() Family of System Calls
Process States
The rq Structure
Wait Queues
Process Priority
Real-Time Processes
Scheduling Policy
Completely Fair Scheduler
Scheduler Domains
Control Groups (cgroups)
Scheduler Classes
Fair Class Scheduling
Idle Class Scheduling
Real-time Scheduling
Context Switching
Signal Handling
Signal Definitions
Signal Data Structures
Delivering a Signal
Process Destruction
Parent Notification
The sys_wait4() System Call

8. Memory Management
Unit Overview
The Memory Page
Memory Zones
Page Frames
Buddy System Algorithm
gfp_mask Flags
Allocating and Releasing Page Frames
Slab Allocator
Slab Allocator Design
Slab Allocator Data Structures
Cache Attributes
Slab Allocator Interface
Handling Memory Requests
Page Frame Reclamation
General Reclamation Heuristics
Invoking Reclamation
Page Frame Swapping
Page Faults

9. Virtual File System
Common File Model
VFS Data Structures
The super_block Structure
The super_block Operations
The File System Type
Mounting File Systems
The Inode Structure
The dentry Structure
The File Structure
File Locks
Block I/O Layer
Generic Block Layer
I/O Scheduler

10. Interrupt and Exceptions
Interrupt Signals
Interrupt Context
Interrupt Execution Flow
Interrupt Vectors
Interrupt Handlers
Controlling Interrupts
Bottom Halves
Work Queues
Exception Vectors
Exception Handlers
Oops and Panics
System Calls
System Call Interface
Kernel Implementation of System Calls
Existing a System Call
The strace Command

11. Kernel Synchronization
Impact of Preemption
Protecting Critical Regions
Race Conditions
Defining Critical Regions
Synchronization Primitives
Per CPU Variables
Atomic Operations
Optimization and Memory Barriers
Spin Locks
Read Copy Update (RCU)
Controlling Preemption
The Big Kernel Lock (BKL)
Preemption Primitives

12. Time Management
Basic Timer Variables
The Tick Rate
Understaing Jiffies
Kernel Time versus User Time
Nanosecond Timing
Hardware Timers
Common Hardware Timers
The clocksource Structures
Understanding High Resolution Timing
High ResolutionStructures
Per CPU and Broadcast Clocks
Clock Interrupt Handling
The Clock Event Device
Dynamic Timers
The Tick behind Tickless Timing

13. Linux Device Model
I/O Architecture
I/O Ports
I/O Interfaces and Controllers
Dedicated I/O Interfaces
General-Purpose I/O Architecture
The sysfs File System
kobject, kset, and kibj_type Structures
The sysfs_dirent Structure
Kobject Inheritance
Putting it Together
Device Files
The Role of udev
Kernel Events Layer
The lshw Command

14. Linux Kernel Modules
Module Overview
Compiling the Module
Managing Modules
The insmod Command
The rmmod Command
The Ismod Command
The modprobe Command
The modinfo Command
Signing External Modules
kABI Compliance
Additional- Examples


Course Directory [training on all levels]

Upcoming Classes