Linux Kernel Development Cookbook

More Information
  • Building the kernel from source code, including creating custom menu entries for new kernel configurables
  • Write and build kernel code having understood the Loadable Kernel Module (LKM) framework
  • Understand the essential internals of the Linux kernel and memory management subsystem
  • A comprehensive look at how and when to use the powerful kernel memory allocation APIs
  • Remember the key points regarding CPU scheduling and various kernel mechanisms
  • Get acquainted with the different kernel synchronization and locking techniques

Linux is one of the most established operating systems used worldwide and Kernel forms to be the heart of Linux operating system.

This problem-solution guide focusing on the latest version of Linux kernel 5.X will start off with a detailed explanation of how to build the kernel from source, create custom menus, etc. Next, you will learn how to write your first kernel module within the Loadable Kernel Module (LKM) framework. You will also explore the essentials of the Linux kernel architecture and memory management subsystem, and in detail, the kernel dynamic memory allocation and deallocation APIs. Going forward, you will get familiar with CPU scheduling on the Linux OS and gain practical usage of useful kernel mechanisms. Later, you will understand the essentials of writing a Linux (character, misc) device driver, user-kernel communication pathways, performing I/O to peripheral chips and the handling of hardware interrupts. The next set of chapters deal with the complexity of synchronization techniques on the Linux kernel, locking, cache effects, a primer on lock-free techniques within the kernel, memory barriers, deadlock and how to avoid it (lockdep) along with kernel locking debug techniques.

By the end of the book, you will be able to troubleshoot a majority of the problems encountered while developing Linux kernel code.

  • Get detailed instructions for building the Linux Kernel from source
  • Learn to write kernel code using the Linux Kernel Module (LKM) framework
  • Discover use cases on memory allocations and data synchronization
Page Count 653
Course Length tbc
ISBN 9781789953435
Date Of Publication 24 Jul 2020