Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Linux Kernel Programming - Second Edition

You're reading from  Linux Kernel Programming - Second Edition

Product type Book
Published in Feb 2024
Publisher Packt
ISBN-13 9781803232225
Pages 826 pages
Edition 2nd Edition
Languages
Author (1):
Kaiwan N. Billimoria Kaiwan N. Billimoria
Profile icon Kaiwan N. Billimoria

Table of Contents (16) Chapters

Preface 1. Linux Kernel Programming – A Quick Introduction 2. Building the 6.x Linux Kernel from Source – Part 1 3. Building the 6.x Linux Kernel from Source – Part 2 4. Writing Your First Kernel Module – Part 1 5. Writing Your First Kernel Module – Part 2 6. Kernel Internals Essentials – Processes and Threads 7. Memory Management Internals – Essentials 8. Kernel Memory Allocation for Module Authors – Part 1 9. Kernel Memory Allocation for Module Authors – Part 2 10. The CPU Scheduler – Part 1 11. The CPU Scheduler – Part 2 12. Kernel Synchronization – Part 1 13. Kernel Synchronization – Part 2 14. Other Books You May Enjoy
15. Index

What’s been added in the second edition?

A pretty huge amount of new material has been added into this, the Second Edition of the Linux Kernel Programming book. As well, being based on the very recent (as of this writing) 6.1 LTS release, its information and even code will remain industry-relevant for many, many years to come.

Here’s a quick chapter-wise summarization of what’s new in this second edition:

  • Materials updated for the 6.1 LTS kernel, maintained until December 2026, and until August 2033 via the CLP (6.1 SLTS)!
  • Updated, new, and working code for the 6.1 LTS kernel
  • Several new info-rich sections added to most chapters, many new diagrams, and new code examples to help explain concepts better
  • Chapter 1, Linux Kernel Programming – A Quick Introduction
    • Introduction to the book
  • Chapter 2, Building the 6.x Linux Kernel from Source – Part 1
    • The new LTS kernel lifetime mandate
    • More details on the kernel’s Kconfig+Kbuild system
    • Updated approaches on configuring the kernel
  • Chapter 3, Building the 6.x Linux Kernel from Source – Part 2
    • More details on the initramfs (initrd) image
    • Cross-compiling the kernel on an x86_64 host to an AArch64 target
  • Chapter 4, Writing Your First Kernel Module – Part 1
    • new-ish printk indexing feature covered
    • Powerful kernel dynamic debug feature introduced
    • Rate-limiting macros updated (deprecated ones not used)
  • Chapter 5, Writing Your First Kernel Module – Part 2
    • A better, ‘better’ Makefile (v0.2)
  • Chapter 6, Kernel Internals Essentials – Processes and Threads
    • New linked list demo module
  • Chapter 7, Memory Management Internals – Essentials
    • New coverage on how address translation works (including diagrams)
  • Chapter 8, Kernel Memory Allocation for Module Authors – Part 1
    • Coverage on using the “exact” page allocator API pair
    • FAQs regarding (slab) memory usage and their answers
    • The graphing demo (via gnuplot) is now automated and even saved to an image file, via a helper script
    • Finding internal fragmentation (wastage) within the kernel
  • Chapter 9, Kernel Memory Allocation for Module Authors – Part 2
    • Extracting useful information regarding slab caches
    • A word on slab shrinkers
    • Better coverage on the OOM killer (and systemd-oomd) and how it’s triggered; includes a flowchart depicting demand-paging and possible OOM killer invocation
    • Better coverage on kernel page reclaim, as well as the new MGLRU and DAMON technologies
  • Chapter 10, The CPU Scheduler – Part 1
    • New coverage on CFS scheduling period and timeslice. Coverage on the thread_info structure as well
    • New: the preempt dynamic feature
    • Enhanced coverage on exactly how and when schedule() is invoked
  • Chapter 11, The CPU Scheduler – Part 2
    • Much more depth in the powerful cgroups (v2) coverage plus an interesting script to let you explore its content
    • Leveraging the cgroups v2 CPU controller via both systemd and manually to perform CPU bandwidth allocation
    • A note on Google’s ghOSt OS
  • Chapter 12, Kernel Synchronization – Part 1
    • A new intro to the LKMM (Linux Kernel Memory Model)
    • More on locking plus deadlock avoidance guidelines
  • Chapter 13, Kernel Synchronization – Part 2
    • Expanded coverage on CPU caching and cache effects
    • New coverage on the powerful lock-free RCU synchronization technology
  • Online Chapter, Kernel Workspace Setup
    • Fixed errors in package names and versions
    • Ubuntu-based helper script that auto-installs all required packages

Most (if not all) earlier code errors, typos, and URLs are now fixed, based on prompt feedback, raising Issues/PRs on the book’s GitHub repo, from you, our wonderful readers!

lock icon The rest of the chapter is locked
Next Chapter arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}