Inspiration

What it does

How we built it## 💡 Inspiration

Modern Physical AI models—such as deep reinforcement learning policies and vision-language-action foundation models—are fundamentally non-deterministic. When deployed on physical manipulators, surgical robotics, or autonomous vehicles, neural policies suffer from distributional shifts, torque spikes, and hallucinations that can breach safety envelopes in milliseconds.

Conventional Linux-based robotics stacks (e.g., ROS 2 on PREEMPT_RT) lack spatial and temporal microkernel isolation: an AI driver segmentation fault crashes the entire runtime, and 100% CPU storms spike actuator jitter from microseconds to tens of milliseconds. We built QNX-CortexCage to solve this using a microkernel-enforced Simplex architecture on QNX Neutrino RTOS SDP 8.0.


⚙️ What It Does

QNX-CortexCage isolates untrusted neural workloads and guarantees deterministic safety boundaries:

  1. Control Barrier Function (CBF) Simplex Gate: Implemented as a native QNX Resource Manager (/dev/cortex_gate) evaluating $h(x) = R_{\text{safe}}^2 - |x|^2 - \alpha(x \cdot v)$ in $<1.5\ \mu\text{s}$. Unsafe actuation commands are clamped to the safe invariant tangent cone before reaching hardware.
  2. Microkernel Security Containment: The AI planner drops root privileges via procmgr_ability() and runs strictly throttled under SCHED_SPORADIC (Priority 15), preventing CPU starvation.
  3. Hard Real-Time 1 kHz Actuator Loop: Locked in memory with mlockall() at highest microkernel priority (Priority 63, SCHED_FIFO), delivering a deterministic $<3.5\ \mu\text{s}$ jitter flatline under full CPU contention.
  4. Sub-Millisecond Self-Healing Supervisor: A Priority 62 High-Availability Watchdog isolates memory faults (SIGSEGV) and reconstitutes corrupted AI planners in $<450\ \mu\text{s}$ via posix_spawn().
  5. Embedded TinyML Neural Policy: Self-contained 3-layer C MLP executing in $18\ \mu\text{s}$ in QNX user-space with zero external cloud dependencies.

🛠️ How We Built It

  • Microkernel Architecture: Developed in C using QNX Neutrino SDP 8.0 native APIs (resmgr_attach, ChannelCreate, procmgr_ability, ClockCycles).
  • Cross-Compilation & Boot Image: Cross-compiled for dual target architectures (x86_64 and aarch64le) with custom QNX Image File System build files (mkifs).
  • Mission Control Cockpit: Built with Node.js and HTML5 Canvas, streaming 20 Hz telemetry, live oscilloscope jitter analysis, and chaos injection commands via WebSockets.
  • Testing & Emulation: Validated on headless QEMU running QNX Neutrino 8.0 and deployed live to Vercel for interactive web access.

🔬 Challenges We Faced

  • Microkernel Intercept Latency: Guaranteeing the CBF evaluation inside a native resource manager executes in under $1.5\ \mu\text{s}$ without adding system call overhead required lock-free sequence locks and atomic shared memory (/cortex_shm_ring).
  • Clean Process Recovery: Ensuring the High-Availability Watchdog could detect hardware page faults and re-spawn child processes in $<450\ \mu\text{s}$ without interrupting the 1 kHz Priority 63 actuator loop.

🏆 Accomplishments That We're Proud Of

  • Achieved $0.89\ \mu\text{s}$ P50 wake-up jitter and kept maximum jitter flatlined at $<3.5\ \mu\text{s}$ even during a sustained 100% CPU thread storm.
  • Built full dual-architecture verification proofs (x86_64 and AArch64) verified via QNX binutils.
  • Created a complete 6-module interactive QNX developer codelab embedded in the live dashboard.

🧠 What We Learned

Deepened practical mastery of QNX Neutrino 8.0 microkernel internals: configuring thread abilities via procmgr_ability(), designing zero-copy IPC using fixed-priority pulse channels (_NTO_CHF_FIXED_PRIORITY), and constructing production .ifs boot images.


🔮 What's Next for QNX-CortexCage

  • Extending the Simplex Gate to support formal Hamilton-Jacobi reachability analysis.
  • Deploying natively to physical automotive silicon (BlackBerry QNX on Qualcomm Snapdragon Ride and NXP S32G).

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for QNX-CortexCage

Built With

Share this project:

Updates

Submission history