Inspiration
An embedded control loop can keep running while missing the deadlines that make it useful. A liveness heartbeat alone gives an engineer little evidence about late releases, scheduling interference, or a failed process. We wanted a tool that could show all three on the same timeline.
What it does
TickWarden supervises periodic tasks from a separate process. It tracks releases, deadline misses, overruns, and response times. Developers can read a per-task latency histogram on the QNX console or watch it from a host browser. The sample controller sets its simulated actuator output to zero after receiving a deadline-miss event. When a supervised process exits or crashes, the watchdog observes the connection closing and marks the task dead.
How we built it
The watchdog is a QNX 8.0 resource manager at /dev/tickwarden. A client opens that device and calls MsgSend to report each cycle. Timer pulses drive the control loops and watchdog scan. The client registers an event with MsgRegisterEvent, and the watchdog signals deadline misses via MsgDeliverEvent. The resource manager's close callback reports a dead task through QNX connection cleanup. A small TCP bridge supplies the host dashboard.
What the demo shows
The four stages use one QNX 8.0 x86-64 QEMU image. Two sample controllers start under ordinary load. CPU hogs then run below the controllers and later above one controller, making the effect of priority visible in the deadline metrics. Finally, a supervised sample process deliberately crashes and appears as DEAD. Absolute jitter varies with the Windows and WSL host load.
Hands-On QNX 8.0 Codelab & Micro-Benchmarks
We published a complete, reproducible 8-step QNX SDP 8.0 codelab at https://qnx-tickwarden-codelab.pages.dev/ covering:
- Full toolchain &
mkqnximageQEMU x86_64 build/boot steps (qcc -Vgcc_ntox86_64, plusARCH=aarch64lefor Raspberry Pi 5) - Native QNX 8.0 primitive walkthroughs (
resmgr_attach,_IO_MSGzero-copyMsgSend/MsgReply,TIMER_PRECISE,MsgRegisterEvent/MsgDeliverEvent, and zero-timeoutio_close_ocbcrash detection) - Interactive explorer for all four captured
twdemomicro-benchmark stages (16-bucket log2 release-latency histograms fromdocs/twdemo-output.txt) - Interactive
SCHED_FIFOWorst-Case Response Time (WCRT) calculator generating exactctrl_loop+cpu_hogreproduction commands
Built With
- c
- html
- javascript
- python
- qemu
- qnx