Linux Kernel Internals Training
Course Overview
This course on Linux Kernel training is a mandatory course for anyone planning to learn Linux Kernel internals and programming. Participants will learn how Linux-C programming in kernel space is different than user space and they will be able to do their own kernel configuration and do kernel building from kernel source code. Subsequently, the course goes over various kernel sub-systems such as Kernel Virtual Memory, Process Management, Linux Scheduler, Kernel Synchronization Primitives, Kernel Time-keeping Architecture, Kernel Memory Management, Process Address Space, System Calls infrastructure in the Kernel, Signals, Virtual Filesystems, Page/Buffer Cache and Swapping in the Kernel.
Course Delivery
- The course will be delivered by our Founder & CTO who is an Expert with 20+ years of experience in Linux Kernel and SAN software development.
- 75% Theory, 25% Lab
- Location: Sanfoundry Institute, Bangalore, India
Target Audience
- Professionals and Students who are working in Linux Systems Programming Areas
- Linux developers and users who are interested in understanding the Linux Kernel Design & Implementation
- Graduates who have undergone Operating System course and would like to see the Principles in Action
- Kernel Hackers
Course Pre-requisite
Fee, Schedule & Registration
Click Here for Linux Kernel Internals Training course training schedule, fee and registration information.
Linux Kernel Internals Training Course Outline
Linux Kernel Introduction Linux System Linux Organization Linux Version Basic OS Concept Linux N+1 System Linux Filesystem File Types Processes & File Objects File Object Access The Process/Kernel Model Re-entrant Kernel Interleaved Kernel Control Paths Preemptive Kernel Preemptive Context Switch Synchronization Deadlock Memory Management |
Getting Started with Kernel Obtaining the Kernel Source Installing the Kernel Source Using Patches The Kernel Source Tree Building the Kernel Configuring the Kernel Efficient Kernel Building Spawning Multiple Build Jobs Installing the New Kernel Understanding Kernel Programming C Library or Standard Headers? GNU C Extensions Inline Functions Inline Assembly Branch Annotation Memory Protection? Floating Point? Stack Sizes |
Memory Addressing Logical, Linear & Physical Addresses Translating a Logical Address Segmentation in Linux Paging in Linux Large Pages Physical Page Extension(PAE) Hardware Cache Cache Coherency Translation Lookaside Buffers (TLBs) Linux 4 Table Paging Model Physical Memory Layout Kernel Physical Memory Variables Process Page Tables Kernel Page Tables TLB Management |
Processes in Linux Kernel Process Lightweight Process Threads & Thread Groups Process Descriptions The task_struct Linux Process States Thread Group Leader thread_info Structure Kernel Stack Structure The Process List Waiting Processes Wait Queues Awakening Processes Process Creation clone() / fork() / vfork() Kernel Threads Process 0 & Process 1 Destroying Processes exit_group() / _exit() Process Removal |
Kernel Synchronization Kernel Preemption When Synchronization is Necessary Interleaved Kernel Control Paths When Synchronization is Not Necessary Synchronization Constraints Synchronization Primitives Per-CPU Variables Atomic Operations Optimization & Memory Barriers Spin Locks Read/Write Spin Locks Seqlocks Read-Copy Update (RCU) Locks Semaphores Read/Write Semaphores Local Interrupt Disabling Disabling Deferrable Functions |
Timing Measurements in Linux Clocks and Timer Circuits Linux Timekeeping Architecture The jiffies Variable Updating System Statistics Software Timers Dynamic Timer List Structure Timer List Data-Structure Per-CPU Timer List Delay Functions udelay() and ndelay() System Calls for POSIX Timers and Clocks |
Process Scheduling Process Preemption Quantum Duration Scheduling Policies Scheduling of Conventional Processes Dynamic Priority Realtime Processes Realtime Process Scheduling Runqueue Data Structure Runqueue Balancing in Multiprocessing Systems Scheduling Domains Load Balancing CPU Binding |
Memory Management Page Frame / Page Memory Zones Reserved Page Frames High Memory Page Frames Temporary Kernel Mappings Dynamic Contigous Page Allocation Slab Allocator Object Caches Slab Cache Allocation Object Allocation General Purpose Allocation – kmalloc() Non-contigous Memory Area Management |
Process Address Space Kernel Address Space Process Address Space System Calls for Memory Region brk(), execve(), _exit(), fork() mmap(), mmap2(), munmap(), shmat(), shmdt() Page Faults Valid & Invalid Addresses The Memory Descriptor The mem_struct Structure Memory Regions Linear Address Intervals – do_mmap() Page Fault Exception Handling Demand Paging Copy on Write (COW) Creating Process Address Space Managing Heap Space |
System Calls System Call Handler Service Routines Invoking a System Call Leaving a System Call Arguments to System Call Arguments in Registers Verifying the Arguments Accessing Process Address Space Exception Tables Fixing Address Exceptions Kernel Wrapper Routines |
Signals in Linux Signal Related System Calls Signal Generation and Delivery Pending Signals Action Performed Upon Delivery Signals @ Multithreaded Application Data Structures for Signal Handling Delivering the Signal Catching the Signal Restarting System Calls |
Linux Page Cache Page Cache Contents Page Cache Requirements The address_space Object Block Buffers and Page Cache The Buffer Head Buffer Pages Writing Dirty Pages to Disk bdflush & pdflush sync(), fsync() and fdatasync() calls |
Page Frame Reclamation Page Frame Reclaiming Algorithm Unreclaimable pages Swappable Pages Syncable Pages Discardable Pages Design of the Algorithm Reclaimation Tigger Points Low on Memory Periodic Reclaiming The Out-of-memory Killer Swapping Features |
Linux Virtual Filesystem VFS Role in File Operations VFS Supported Filesystem Classes Common File Model Process & VFS Object Interaction VFS Data Structures Super Block Object Inode Object File Object Dentry Object Processes and Files The fd array Constraints on a Process File System Types Filesystem Type Registration Filesystem Handling Mounting a Filesystem Pathname Lookup Reads & Writes Other File Operations |