KRN-230 · Linux Kernel Core · Practitioner
Kernel Locking Primitives — full syllabus
Every locking primitive the kernel offers, when each is correct, and the deadlocks that follow from choosing wrong.
Who this course is for
Kernel and driver developers writing concurrent code who need to pick the correct primitive every time — and to come out the other side of lockdep with their design intact.
Prerequisites
- Solid C
- KRN-110-level module development
- Userspace concurrency concepts
Course outline
Day 1 — Spin or sleep
- Spinlocks, mutexes and semaphores: when each applies
- What you may not do while holding a spinlock
- Interrupt context rules and the irqsave/irqrestore variants
- Lock ordering and the anatomy of an AB-BA deadlock
- The sleeping-while-atomic failure class
Day 2 — Read-mostly and lockless-lite
- Reader-writer locks and seqlocks and their trade-offs
- Per-CPU variables and local locks
- RCU as a locking alternative at concept level
- Atomics and reference counting: atomic_t, refcount_t, kref
- Completions as a coordination tool
Day 3 — Proving it correct
- lockdep: enabling it, reading its reports and trusting them
- Lock classes, chains and what a splat is telling you
- False positives and the annotations that fix them
- KCSAN for data-race detection
- Capstone workshop
Hands-on labs
- Lab: write a module with a deliberate AB-BA deadlock, catch it with lockdep and fix the ordering
- Lab: convert a lock-heavy critical section to per-CPU variables and measure the contention change
- Lab: trigger a sleeping-in-atomic warning deliberately and trace exactly why it fired
- Lab: run KCSAN over a racy test module and fix the race it reports
- Lab: choose between spinlock, mutex and seqlock for a stated access pattern and defend the choice with measurements
Capstone project
Take a small concurrent kernel component from works-in-testing to defensible: locking design documented per data structure, clean under lockdep and KCSAN stress runs, with a written rationale for every primitive chosen and every lock ordering established — ready to survive maintainer review.
What you leave with
- A decision procedure across spinlock, mutex, rwlock, seqlock and per-CPU
- Interrupt-context and sleeping rules internalised
- lockdep and KCSAN as daily tools
- Deadlock analysis by lock chain rather than by staring
Upcoming dates
| Dates | Where | Seats | Early bird | Regular | |
|---|---|---|---|---|---|
| 8 Nov – 10 Nov 20263 full days | RiyadhIn person · KAFD Conference Centre | 6 of 14 | SAR 7,090until 9 Oct | ||
| 8 Nov – 10 Nov 20263 full days | Kuwait CityIn person · Al Hamra Tower | 11 of 14 | KWD 580until 9 Oct | ||
| 15 Nov – 17 Nov 20263 full days | MuscatIn person · Knowledge Oasis Muscat | 6 of 14 | OMR 730until 16 Oct | ||
| 22 Nov – 29 Nov 20266 half-days | Gulf bandLive online · 09:00–13:00 GMT+3 | 12 of 20 | US$1,350until 23 Oct | ||
| 23 Nov – 25 Nov 20263 full days | OttawaIn person · Kanata North Tech Park | 11 of 14 | CAD 2,570until 24 Oct | ||
| 23 Nov – 25 Nov 20263 full days | TorontoIn person · MaRS Discovery District | 6 of 14 | CAD 2,570until 24 Oct | ||
| 23 Nov – 30 Nov 20266 half-days | Europe bandLive online · 09:00–13:00 CET | 17 of 20 | US$1,350until 24 Oct | ||
| 30 Nov – 2 Dec 20263 full days | LondonIn person · Shoreditch Works | 11 of 14 | GBP 1,480until 31 Oct | ||
| 30 Nov – 7 Dec 20266 half-days | Americas bandLive online · 13:00–17:00 ET | 6 of 20 | US$1,350until 31 Oct | ||
| 7 Dec – 9 Dec 20263 full days | BerlinIn person · Factory Görlitzer Park | 6 of 14 | EUR 1,740until 7 Nov |
Book a seat, or bring this course to your team
Seats can be reserved online; private delivery runs on-site or live online, adapted to your stack.
Questions about fit or prerequisites? Email hello@kernelsystems.academy. To save this syllabus, print this page to PDF from your browser.