LINUX KERNEL INTERNALS
UNDERSTANDING AND PROGRAMMING TRAINING

linux kernel programming training bangalore

linux kernel programming training Chennai

linux kernel programming training in Hyderabad

LINUX KERNEL INTERNALS AND PROGRAMMING TRAINING

Note: This training will be conducted based on request

    Course ID   :  DEC403

    Duration     :  40 hours

OVERVIEW

Linux® Kernel Internals (DEC403) is a hands-on course providing experienced developers an intensive, low-level examination of the Linux kernel architecture. Topics include kernel compilation, debugging tools and techniques, and internal kernel APIs, including synchronization, process management and memory management. These topics provide a solid understanding of the kernel’s architecture. Further you can develop device drivers in course DEC402


TARGET AUDIENCE

Experienced developers who want to gain a thorough understanding of the Linux kernel architecture.


OBJECTIVES

  • Working with the Developer Community
  • User Mode and Kernel Mode
  • Kernel Compilation and Tools
  • Modules
  • Kernel API Overview
  • Synchronization
  • Kernel Debugging 1: Tools and Techniques
  • Device Driver Overview
  • Memory Management
  • Processes Managment
  • The Scheduler
  • Kernel Timing
  • SystemTap
  • System and Kernel Initialization
  • Kernel Debugging 2: Crash Dumps
  • Linux Realtime Kernel
  • Interrupts

linux kernel programming


PREREQUISITES

  • Experience in C programming
  • Knowledge of systems programming in a UNIX or Linux environment
  • Register-level hardware programming knowledge is recommended but not required
  • Familiarity with basic tools, such as vi, Emacs, and shell utilities
  • Familiarity with UNIX development tools, such as gcc and make

linux kernel programming training in hyderabad

COURSE CONTENTS

General OS Architecture
  • OS Architecture
User Mode and Kernel Mode
  • The Linux Kernel - An Overview
  • The Role of the Kernel
  • Kernel Contexts
  • Four Milliseconds in the Life of the Kernel
  • System Ring Levels
  • Kernel Mode
  • User Mode
  • Mode Switching Example: System Calls
  • x86 System Call Interface
  • x86 System Call Interface (cont.)
  • Mode Switching Example: IRQ Event
  • Kernel Mode Linux
Kernel Compilation and Tools
  • Kernel Packages
  • Kernel Version
  • Kernel Documentation
  • Kernel Source Layout
  • Kernel Source Layout (cont.)
  • Recompiling the Red Hat Kernel
  • Install Kernel Development Packages
  • Kernel Source Package
  • Preparing Source Code for Compilation
  • Customizing Kernel Name (Optional)
  • Choosing Compilation Options
  • Compiling the Kernel and Modules
  • Installing the Kernel Modules
  • Installing the Compiled Kernel and Related
  • Files
  • Kernel Application Binary Interface (kABI)
  • cscope
  • LXR
  • git
  • git Documentation
Modules
  • Kernel Modules
  • Kernel Module Utilities
  • Mapping Modules to Attached Devices
  • Kernel Module Essentials
  • modinfo Macros
  • printk()
  • /proc/kmsg and klogd
  • printk() Loglevels
  • Rate Limiting printk()
  • Putting It All Together: A Simple Module
  • Compiling a Module
  • Integrating A New Module with the Kernel
  • Makefile and Kconfig
  • Module Parameters
  • Example: Module with Parameter
Kernel API Overview
  • Multitasking, Stacks, and Task-Descriptors
  • Contents of a Program's Stack
  • Kernel Mode Switch and the Stack
  • Task Structures
  • What Is a Process?
  • thread_info Structure
  • task_struct: Process Identifiers
  • task_struct: Process State
  • task_struct: Scheduling Information
  • Doubly Linked Lists
  • Doubly Linked Lists: Manipulation
  • Doubly Linked Lists: Iteration
  • Doubly Linked Lists: Processes
  • task_struct: Related Processes
  • task_struct: Statistics
  • Allocating Kernel Memory: kmalloc()
  • Memory Cache Optimizations: Branch
  • Prediction
  • Memory Cache Optimizations: Binding
  • Structures
  • Generating Kernel Errors
Synchronization
  • Critical Sections
  • Mutual Exclusion Devices
  • Linux Mutex Toolbox
  • Atomic Bit Operations
  • Atomic Integers
  • Spinlocks
  • Spinlocks and Local Interrupts
  • Read-Write Spinlocks
  • Mutexes
  • Semaphores
  • Spinlock/Mutex Example
  • Alternatives to Locking
  • Sequential Locks
  • Read-Copy-Update (RCU)
  • Linux RCU Implementation
  • Per-CPU Variables
  • Completions
  • The Big Kernel Lock
Kernel Debugging 1: Tools and Techniques
  • Debugging Preparations
  • kernel-debuginfo Warnings
  • Kernel vs. User Space
  • Live vs. Postmortem Debugging
  • Crashes vs. Hangs
  • Debugging Device Drivers
  • User Space Debugging Tools
  • /proc Kernel Information
  • kernel.panic Tunable and Kernel Crashes
  • /sys Filesystem
  • debugfs Filesystem
  • Printing from the Kernel
  • Kernel Oops Messages
  • SysRq Mechanism
  • sosreport
  • The crash Tool
  • crash Requirements
  • crash Installation
  • crash Invocation
  • crash Invocation Output
  • crash Help
  • crash Command Input
  • crash Command Output
  • crash Command Overview
  • crash Default Context
Interrupts
  • Interrupts
  • Nature of Interrupts
  • Types of Interrupts
  • Interrupt Specific Hardware
  • Interrupt Descriptor Table (IDT)
  • IDT Initialization
  • IDT Initialization Functions
  • Exception Handling
  • Asynchronous Interrupt Handling
  • Interrupt Handler Considerations
  • irq_desc Structure
  • irqaction Structure
  • Interrupt Handler Registration
  • Performing Deferred Work
  • Softirqs
  • Using Softirqs
  • Tasklets
  • Using Tasklets
  • Work Queues
  • Work Queue Data Structures
  • Using Work Queues
Device Driver Overview
  • Device Drivers
  • Device Types
  • Device Nodes
  • Creating a Device Node
  • Dynamic Loading of Driver Modules
  • Major and Minor Numbers
  • Dynamic Major and Minor Numbers
  • Dynamically Created Device Nodes
  • Dynamically Created Device Nodes Made Easy
  • Device Driver Essentials
  • Character Device Registration
  • Device Driver File Operations
  • Driver Methods
  • The file Structure
  • The inode Structure
  • The open and release Methods
  • The read and write Methods
  • Module Usage Count
  • Simple Character Driver Example
Processes
  • Creating Processes
  • Sharing Resources
  • do_fork()
  • Process Memory Maps
  • Memory Areas
  • vm_flags
  • pmap
  • Kernel Threads
  • Process 0
  • Destroying Processes
  • Context Switches
  • When Does Context Switching Occur?
  • When Is need_resched Set?
  • When Is schedule() Called?
  • Kernel Preemption
The Scheduler
  • Priority
  • Priority for Normal Processes
  • Priority for Real-Time Processes
  • Time Slices
  • The O(1) Scheduler: Run Queues
  • The O(1) Scheduler: Priority Arrays
  • The O(1) Scheduler: How it works
  • Wait Queues
  • The O(1) Scheduler: Load Balancing
  • The O(1) Scheduler: load_balance()
  • Problems with the O(1) Scheduler
  • O(1) Scheduler vs. CFS
  • Overview of CFS
  • Details of CFS
  • CFS Task Scheduling
  • CFS Scheduler Policies
  • CFS Scheduler Classes
  • CFS fair_sched_class
  • CFS Tuning
  • CFS Group Scheduling
  • CONFIG_FAIR_GROUP_SCHED
  • CONFIG_FAIR_CGROUP_SCHED
Memory Management
  • Virtual Memory and Paging
  • x86 Memory Architecture
  • Memory Segmentation in Linux
  • x86 Segmentation
  • x86 Segmentation in Linux
  • Memory Paging
  • Page Tables
  • Mapping Virtual Addresses (x86)
  • Mapping Virtual Addresses (x86-64)
  • Memory Zones
  • Arranging the Virtual Address Space
  • ZONE_NORMAL
  • ZONE_HIGHMEM
  • ZONE_DMA
  • Kernel Memory Allocation
  • Memory Management
  • Buddy Allocator
  • Requesting and Releasing Page Frames
  • Slab Allocator
  • Slab Allocator (cont.)
  • Non-Contiguous Memory Area
  • Management
  • Memory Flags: gfp_mask
  • __get_free_pages()
  • kmalloc()
  • vmalloc()
Kernel Timing
  • The Need for Timing
  • Timing Hardware
  • Timing Source Selection
  • Wall/Real Time: xtime
  • Wall Clock System Calls
  • Kernel Ticks: jiffies
  • Software Timers
  • POSIX Timers
  • Interval Timers and alarm()
  • High-Resolution Timers
  • Timer Interrupt Handler
  • TIMER_SOFTIRQ Softirq
  • Delay Functions
  • SystemTap
  • line
  • Introduction to SystemTap
  • SystemTap's Main Components
  • Monitoring the Kernel with SystemTap
  • The stap Command
  • Flow of Data in SystemTap
  • Common Tapset Probe Points
  • SystemTap Script Examples
System and Kernel Initialization
  • Boot Sequence Overview
  • BIOS Initialization
  • Bootloader
  • Starting the Boot Process: GRUB
  • Bootloader Components
  • The Chicken/Egg Module Problem and the Initial RAM Disk
  • GRUB and grub.conf
  • Kernel Initialization Overview
  • __init and __initdata
  • Initialization Subsections and Ordering
  • Kernel Initialization
  • init/main.c: start_kernel()
  • init/main.c: rest_init()
  • init/main.c: init()
  • init/main.c: do_basic_setup()
  • init/main.c: init_post()
  • init Initialization
  • Run Levels
Kernel Debugging 2: Crash Dumps
  • Introduction to Crash Dumps
  • Netdump/Diskdump Challenges
  • Kdump
  • Kdump Solution
  • Kexec
  • Relocatable Kernel
  • In-place Kernel Decompression
  • Starting Kdump
  • Kdump Initrd Image
  • Configuring Kdump
  • Kdump Core Dumps to the Local System
  • Kdump Core Dumps to NFS Mount Points
  • Kdump Core Dumps to SSH Servers
  • Dump File Size
  • Customizing the Dump Capture Method:
  • makedumpfile
  • Dump Filtering
  • Dump Compression
  • Future Challenges
Linux Realtim Kernel
  • Realtime (RT) Linux
  • Benefits of a Realtime Kernel
  • Response Time Comparisons
  • Wake-Up Response Time Example
  • Changes in the Kernel
  • Changes in the C Library
  • RT Measurement Tools
  • RT Tuning Tools
  • RT Tuning Methods
  • Loading the RT Kernel

linux kernel internals and Programming training in Bangalore Chennai

NOTE

** These sections may be considered in part or in whole as optional. They contain 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.

linux kernel Programming training in Bangalore Chennai

linux kernel Programming training Bangalore Chennai

linux kernel Programming training in Hyderabad Bangalore Chennai

Online linux kernel Programming training in Chennai Bangalore

linux kernel Programming Online training in Bangalore Chennai

linux kernel development training in Bangalore Chennai

Best linux kernel Programming training in Chennai Bangalore

Best linux kernel Programming training Chennai Bangalore

Best linux kernel Programming training in Hyderabad Bangalore Chennai

Best Online linux kernel Programming training in Chennai Bangalore

Best linux kernel Programming Online training in Bangalore Chennai

Best linux kernel development training in Bangalore Chennai