Course code Title Language Price # Unit Startdate Hour Enddate Location Signup
UN032 Linux Kernel Fundamentals Dutch €1750.00 5 Day(s) 19-06-2018 09u00 22-06-2018 Kontich Subscribe
UN032 Linux Kernel Fundamentals on your request on your request Contact Us

Linux Kernel Fundamentals

Linux Kernel Fundamentals

Overview

Course code: 
UN032
Duration: 
5
Time Unit: 
Day(s)
Overview: 

The goal of this course is to provide the student with a fundamental knowledge of the internals of the Linux kernel. The focus is on understanding the workings of the kernel, and not the theory. After completing this course, the student will have a practical knowledge of the kernel for purposes of kernel debugging and writing device drivers, the structure of the kernel, and how modules integrate into the kernel.

Topics

Topics: 

1. Linux Kernel Introduction
Operating Systems and Kernels
Definition of Terms
Kernel Space versus User Space
Approaches to Kernel Design
Monolithic versus Micro Kernels
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
Kernel Space to User Space
Copying Buffers
The printk Statement
The /proc Directory
The /sys Directory

2. Linux Kernel Source
View of Kernel Source
Installing Kernel Source
CentOS Source Install
Source Installation
Updating Kernel Source
kernel.org Source Install
Downloading Kernel Source
Installing Kernel Source
Updating Kernel Soure
Patching the Kernel
Applying Kernel Patches
The kernel-patch Command
Finding References
Kernel Symbol Tables
The System.map File
The kallsyms File
Searching with Linux Commands
The cscope Command
Starting cscope
Searching the Source Files
Navigating the Search Results
Kernel Programming Style
A Different Kind of Program
Command Kernel Datatypes
Linked Lists
Manipulating Linked Lists
Traversing Linked Lists
Red Black Tree
C Language Usage
Other Kernel Coding Conventions
Opaque Types
Explicitly Sized Types
Byte Order
Header Files
Inline Assembly

3. Building the Kernel
The Build Environment
Steps for Building Kernel
Creating a Configuration File
Editing the Configuration File
The gconfig Utility
Configuration Options
Make the Kernel
Installation of Modules
Install the Kernel
Modify Boot Loader Files
Using the crash Utility
Options to crash Utility
Analyzing a Running Kernel
The Crash Commands

4. Linux Kernel Modules
Module Overview
Compiling the Module
Managing Modules
The insmod Command
The rmmod Command
The lsmod Command
The modprobe Command
The modinfo Command

5. 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
Seqlocks
Semaphores
Read Copy Update (RCU)
The Big Kernel Lock (BKL)

6. 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
Kobjects, Ksets, and Subsystems
Kobjects
Ksets
Subsystems
Ktype Objects
The device Object
The bus_type object
The device_driver Object
The class Object
The class_device Object
Devide Files
The Role of udev
Kernel Events Layer
The lshw Command

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

8. Time Management
Hardware Timers
The clocksource Structures
Kernel Time Management
The Tick Rate
Understanding Jiffies
jiffy Command
Choosing the Optimal Tick Rate
Kernel Time versus User Time
Timer Interrupt Handler
Dynamic Timers

9. Memory Management
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
Alb Allocator Interface
Handling Memory Requests
Page Frame Reclamation
General Reclamation Heuristics
Invoking Reclamation
Page Frame Swapping
Page Faults

10. Virtual File System
Common File Model
VFS Data Structures
The Superblock 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

11. 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
Process Address Space
The Memory Descriptor
Memory Areas
Page Tables
Process File Structures
The fs_struct Object

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

13. Booting the Kernel
The BIOS and Open Firmware
The Boot Loader
Grand Unified Bootloader (GRUB)
Linux Loader (LILO)
Other Boot Loaders
Booting Linux
Kernel Image File
The Initial RAM Disk
Kernel Configuration Parameters
Hardware Initialization
The start_kernel() Function

Prerequisites

Prerequisites: 

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

Audience

Audience: 

Programmers or system administrators interested in further developing their understanding of the Linux kernel.