Skip to content

M11 Capstone Tracks B and C: a driver, and a scheduler #12

Description

@tamnd

Roughly sixteen weeks. Two capstone tracks, deliberately different in kind from Track A and from each other.

Track B is a device driver, written twice. Once in C, once in Rust, against a supplied virtio device model that can be made to fail on command. A virtual device rather than real hardware, because real hardware excludes readers, is not reproducible, and cannot be told to drop a completion or send a spurious interrupt on demand.

The interesting deliverable is not the driver. It is the written comparison at the end: which of the reader's own C bugs the Rust version made impossible, which ones it did not, what the abstractions cost, and where unsafe was unavoidable and what invariant each block was holding up. The kernel community is actively arguing about this and the reader will finish with an answer they earned rather than one they read.

Track C is a sched_ext scheduler. A BPF program that is the scheduler, loaded at runtime, on a real machine. If it misbehaves the watchdog evicts it and the kernel falls back to the default.

That property is why this track can exist at all. Writing a scheduler has always been the canonical exercise you cannot actually do, because getting it wrong costs you the machine. Now a reader writes a scheduler for the machine they are sitting at, watches it fail, and gets the machine back. No previous generation of kernel learners could do this and no existing course has caught up.

Exit criterion. Reference solutions pass every rung in CI. The Rust and C comparison is written to blueprint section 9 standard. More blueprint bugs filed and fixed.

Track B, the driver

  • The virtio device model, deterministic, with injectable failures
  • Rung 1, register and respond
  • Rung 2, interrupts and deferred work, graded by DEBUG_ATOMIC_SLEEP, PROVE_LOCKING and DEBUG_SHIRQ
  • Rung 3, concurrency and lifetime, graded by KASAN and a hot unplug stress harness
  • Rung 4, failure injection, where every allocation site is failed in turn
  • Rung 5, the whole thing again in Rust, plus the comparison document

Track C, the scheduler

  • Rung 1, global FIFO, and the moment the reader's own scheduler is scheduling the shell they typed the load command into
  • Rung 2, per CPU queues and work stealing
  • Rung 3, latency, graded by a scorecard rather than pass or fail because there is no correct scheduler
  • Rung 4, topology, including the cache aware placement that is new in 7.2
  • Rung 5, defend it, against an adversarial workload built to break the reader's specific trade off
  • The workload harness with published baselines and EEVDF reference numbers on the same hardware
  • The Tier 0 scheduler simulator, honestly labelled as not being the real thing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/capstoneThe three tracks: filesystem, driver and sched_ext schedulerarea/driversThe driver model, modules, sysfs and debugfsarea/processTasks, fork and exec, the scheduler, context switching and signalskind/milestoneA milestone checklist, tracking the issues that close itpriority/p2Wanted, not scheduled

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions