KRN-221 · Linux Kernel Core · Advanced

Allocators: Buddy, Slab, vmalloc — full syllabus

How the kernel allocates memory at every scale, and how allocator behaviour surfaces as fragmentation and latency.

Duration3 full days in person · 6 half-days online
Cohortmax 14 in person · 20 online
Pricefrom SAR 9,000 in person · local pricing per city
Delivery35% principles · 20% guided investigation · 45% engineering studio

Who this course is for

Kernel and driver developers who allocate memory inside the kernel and need to choose the right allocator, debug fragmentation, and read allocator state without guessing.

Prerequisites

Course outline

Day 1 — The buddy allocator

  • Zones, watermarks and migration types
  • Order-N allocation and why high orders fail
  • Reading /proc/buddyinfo, /proc/zoneinfo and /proc/pagetypeinfo
  • Fragmentation mechanics and what compaction can and cannot fix
  • Observing allocation latency under fragmentation

Day 2 — SLUB

  • Caches, slabs and per-CPU freelists
  • kmalloc size classes and what a kmalloc really costs
  • kmem_cache_create: when a private cache is worth it
  • /proc/slabinfo and slabtop as diagnostic tools
  • slub_debug: poisoning, red zones and tracking

Day 3 — Choosing correctly and debugging

  • kmalloc vs vmalloc vs alloc_pages: the decision rules
  • GFP flags, allocation contexts and atomic allocation
  • vmalloc space and vmap areas
  • Debugging allocator problems: leaks, corruption signatures, fragmentation reports
  • Capstone workshop

Hands-on labs

  1. Lab: drive the buddy allocator into fragmentation and read the result in /proc/buddyinfo and /proc/pagetypeinfo
  2. Lab: inspect SLUB state with slabinfo and slabtop and correlate caches with module behaviour
  3. Lab: use slub_debug poisoning to catch a use-after-free in a test module
  4. Lab: allocate the wrong way on purpose — high-order kmalloc under pressure, vmalloc in atomic context — and observe the failure modes
  5. Lab: trigger compaction and measure allocation latency before and after

Capstone project

Diagnose and fix an allocator pathology in a prepared kernel scenario: determine whether the failure is fragmentation, cache growth or a leak, prove it with buddyinfo and slabinfo evidence, apply the correct fix — GFP choice, cache design or allocation order — and show the numbers recovering under the same load.

What you leave with

Upcoming dates

DatesWhereSeatsEarly birdRegular
22 Nov – 24 Nov 20263 full days RiyadhIn person · KAFD Conference Centre 6 of 14 SAR 8,100until 23 OctSAR 9,000
29 Nov – 1 Dec 20263 full days Kuwait CityIn person · Al Hamra Tower 11 of 14 KWD 670until 30 OctKWD 740
29 Nov – 1 Dec 20263 full days MuscatIn person · Knowledge Oasis Muscat 6 of 14 OMR 830until 30 OctOMR 920
6 Dec – 13 Dec 20266 half-days Gulf bandLive online · 09:00–13:00 GMT+3 14 of 20 US$1,580until 6 NovUS$1,750
7 Dec – 9 Dec 20263 full days OttawaIn person · Kanata North Tech Park 11 of 14 CAD 2,930until 7 NovCAD 3,260
14 Dec – 16 Dec 20263 full days TorontoIn person · MaRS Discovery District 6 of 14 CAD 2,930until 14 NovCAD 3,260
14 Dec – 16 Dec 20263 full days LondonIn person · Shoreditch Works 11 of 14 GBP 1,680until 14 NovGBP 1,870
14 Dec – 21 Dec 20266 half-days Europe bandLive online · 09:00–13:00 CET 3 of 20 US$1,580until 14 NovUS$1,750
14 Dec – 21 Dec 20266 half-days Americas bandLive online · 13:00–17:00 ET 8 of 20 US$1,580until 14 NovUS$1,750
21 Dec – 23 Dec 20263 full days BerlinIn person · Factory Görlitzer Park 6 of 14 EUR 1,990until 21 NovEUR 2,210

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.

Course page & booking

Questions about fit or prerequisites? Email hello@kernelsystems.academy. To save this syllabus, print this page to PDF from your browser.