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 & mkqnximage QEMU x86_64 build/boot steps (qcc -Vgcc_ntox86_64, plus ARCH=aarch64le for Raspberry Pi 5)
  • Native QNX 8.0 primitive walkthroughs (resmgr_attach, _IO_MSG zero-copy MsgSend/MsgReply, TIMER_PRECISE, MsgRegisterEvent/MsgDeliverEvent, and zero-timeout io_close_ocb crash detection)
  • Interactive explorer for all four captured twdemo micro-benchmark stages (16-bucket log2 release-latency histograms from docs/twdemo-output.txt)
  • Interactive SCHED_FIFO Worst-Case Response Time (WCRT) calculator generating exact ctrl_loop + cpu_hog reproduction commands

Built With

Share this project:

Updates

Submission history