LINUX KERNEL FUNDAMENTALS – GTU18

Course Description

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.

^^

Duration

5 days

^^

Target Audience

The course is designed for Programmers or System Administrators who are familiar with Linux and who wish to gain an understanding of how the Linux kernel works internally.

^^

Course Prerequisites

This is an advanced level course. To obtain full value from this course, the students must meet the following prerequisites:

If you have any questions or doubts as to whether you meet the pre-requisites for this course, or indeed are wondering which course best suits you, please contact us to discuss your suitability for course attendance.

^^

Suggested Follow on Courses

There are a number of options of suitable follow-on courses, depending on your business needs. Please Contact Us for further details.

^^

Course Content

1. Linux Kernel Introduction

  1. Operating Systems and Kernels
  2. Definition of Terms
  3. Kernel Space versus User Space
  4. Approaches to Kernel Design
  5. Monolithic versus Micro Kernels
  6. Standards and Common Interfaces
  7. The Impact of Architecture
  8. Along Came Linux
  9. History of Linux
  10. Linux Kernel Versions
  11. Some Linux Distributions
  12. Linux Kernel Websites
  13. Linux Kernel Organization
  14. Kernel Space to User Space
  15. Copying Buffers
  16. The printk Statement
  17. The /proc Directory
  18. The /sys Directory

 

2. Linux Kernel Source

  1. View of Kernel Source
  2. Installing Kernel Source
  3. CentOS Source Install
  4. Source Installation
  5. Updating Kernel Source
  6. kernel.org Source Install
  7. Downloading Kernel Source
  8. Installing Kernel Source
  9. Updating Kernel Soure
  10. Patching the Kernel
  11. Applying Kernel Patches
  12. The kernel-patch Command
  13. Finding References
  14. Kernel Symbol Tables
  15. The System.map File
  16. The kallsyms File
  17. Searching with Linux Commands
  18. The cscope Command
  19. Starting cscope
  20. Searching the Source Files
  21. Navigating the Search Results
  22. Kernel Programming Style
  23. A Different Kind of Program
  24. Command Kernel Datatypes
  25. Linked Lists
  26. Manipulating Linked Lists
  27. Traversing Linked Lists
  28. Red Black Tree
  29. C Language Usage
  30. Other Kernel Coding Conventions
  31. Opaque Types
  32. Explicitly Sized Types
  33. Byte Order
  34. Header Files
  35. Inline Assembly

 

3. Building the Kernel

  1. The Build Environment
  2. Steps for Building Kernel
  3. Creating a Configuration File
  4. Editing the Configuration File
  5. The gconfig Utility
  6. Configuration Options
  7. Make the Kernel
  8. Installation of Modules
  9. Install the Kernel
  10. Modify Boot Loader Files
  11. Using the crash Utility
  12. Options to crash Utility
  13. Analyzing a Running Kernel
  14. The Crash Commands

 

4. Linux Kernel Modules

  1. Module Overview
  2. Compiling the Module
  3. Managing Modules
  4. The insmod Command
  5. The rmmod Command
  6. The lsmod Command
  7. The modprobe Command
  8. The modinfo Command

 

5. Kernel Synchronization

  1. Impact of Preemption
  2. Protecting Critical Regions
  3. Race Conditions
  4. Defining Critical Regions
  5. Synchronization Primitives
  6. Per CPU Variables
  7. Atomic Operations
  8. Optimization and Memory Barriers
  9. Spin Locks
  10. Seqlocks
  11. Semaphores
  12. Read Copy Update (RCU)
  13. The Big Kernel Lock (BKL)

 

6. Linux Device Model

  1. I/O Architecture
  2. I/O Ports
  3. I/O Interfaces and Controllers
  4. Dedicated I/O Interfaces
  5. General-Purpose I/O Architecture
  6. The sysfs File System
  7. Kobjects, Ksets, and Subsystems
  8. Kobjects
  9. Ksets
  10. Subsystems
  11. Ktype Objects
  12. The device Object
  13. The bus_type object
  14. The device_driver Object
  15. The class Object
  16. The class_device Object
  17. Devide Files
  18. The Role of udev
  19. Kernel Events Layer
  20. The lshw Command

 

7. Interrupt and Exceptions

  1. Interrupt Signals
  2. Interrupts
  3. Interrupt Context
  4. Interrupt Execution Flow
  5. Interrupt Vectors
  6. Interrupt Handlers
  7. Controlling Interrupts
  8. Bottom Halves
  9. Softirqs
  10. Tasklets
  11. Work Queues
  12. Exceptions
  13. Exception Vectors
  14. Exception Handlers
  15. Oops and Panics
  16. System Calls
  17. System Call Interface
  18. Kernel Implementation of System Calls
  19. Existing a System Call
  20. The strace Command

 

8. Time Management

  1. Hardware Timers
  2. The clocksource Structures
  3. Kernel Time Management
  4. The Tick Rate
  5. Understanding Jiffies
  6. jiffy Command
  7. Choosing the Optimal Tick Rate
  8. Kernel Time versus User Time
  9. Timer Interrupt Handler
  10. Dynamic Timers

 

9. Memory Management

  1. The Memory Page
  2. Memory Zones
  3. Page Frames
  4. Buddy System Algorithm
  5. gfp_mask Flags
  6. Allocating and Releasing Page Frames
  7. Slab Allocator
  8. Slab Allocator Design
  9. Slab Allocator Data Structures
  10. Cache Attributes
  11. Alb Allocator Interface
  12. Handling Memory Requests
  13. Page Frame Reclamation
  14. General Reclamation Heuristics
  15. Invoking Reclamation
  16. Page Frame Swapping
  17. Page Faults

 

10. Virtual File System

  1. Common File Model
  2. VFS Data Structures
  3. The Superblock Structure
  4. The super_block Operations
  5. The File System Type
  6. Mounting File Systems
  7. The Inode Structure
  8. The dentry Structure
  9. The File Structure
  10. File Locks
  11. Block I/O Layer
  12. Generic Block Layer
  13. I/O Scheduler

 

11. Process Data Structures

  1. The Process Descriptor
  2. The task_struct Structure
  3. The Kernel Process Stack
  4. Process Identifiers
  5. Process Relationships
  6. Linux Threads
  7. Process Credentials
  8. Process Resource Limits
  9. Process Address Space
  10. The Memory Descriptor
  11. Memory Areas
  12. Page Tables
  13. Process File Structures
  14. The fs_struct Object

 

12. Process Management

  1. Process Creation
  2. Copy-on-Write (COW)
  3. fork(), clone(), and vfork()
  4. exec() Family of System Calls
  5. Process States
  6. The rq Structure
  7. The Priority Arrays
  8. The Wait Queues
  9. Process Scheduler
  10. Scheduler Policy
  11. Scheduling Algorithm
  12. Context Switching
  13. Real Time Processes
  14. Completely Fair Scheduler
  15. Signal Handling
  16. Signal Definitions
  17. Signal Data Structures
  18. Delivering a Signal
  19. Process Destruction
  20. Parent Notification
  21. The sys_wait4() System Call

 

13. Booting the Kernel

  1. The BIOS and Open Firmware
  2. The Boot Loader
  3. Grand Unified Bootloader (GRUB)
  4. Linux Loader (LILO)
  5. Other Boot Loaders
  6. Booting Linux
  7. Kernel Image File
  8. The Initial RAM Disk
  9. Kernel Configuration Parameters
  10. Hardware Initialization
  11. The start_kernel() Function

^^

See more Linux/Unix courses