-
-
Live Mission Control Cockpit: 20Hz telemetry, 3D kinematic trajectory & real-time Simplex safety boundary envelope.
-
Sub-1.5µs Simplex Gate: Clamping unsafe AI hallucination vectors to safe invariant tangent cone via QNX Resource Manager.
-
1kHz Hard Real-Time Oscilloscope: Deterministic <3.5µs wake-up jitter flatline under 100% CPU thread exhaustion storm.
-
Sub-450µs Self-Healing: Priority 62 High-Availability Watchdog isolating fatal SIGSEGV memory faults without actuator jitter.
-
Interactive Developer Codelab: 6-module hands-on curriculum mastering QNX Neutrino 8.0 microkernel safety and IPC patterns.
-
Hardware & QEMU Proof: Native QNX 8.0 boot log and dual-architecture (x86_64 & AArch64) ELF verification matrix.
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:
- 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. - Microkernel Security Containment: The AI planner drops root privileges via
procmgr_ability()and runs strictly throttled underSCHED_SPORADIC(Priority 15), preventing CPU starvation. - 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. - 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}$ viaposix_spawn(). - 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_64andaarch64le) 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_64andAArch64) 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
- c
- docker
- javascript
- node.js
- posix
- qemu
- qnx
- robotics
- rtos
- tinyml
- vercel
