C++ · Linux · PREEMPT_RT

synchro_bench

A benchmark suite for the question that decides how a real-time system acts: how long from signal to wakeup. Five primitives, two architectures, standard and PREEMPT_RT kernels.

One thread signals; another thread should be running. Everything a real-time system promises lives in this gap, and the gap is where schedulers, priorities and kernel configuration spring into life.

synchro_bench measures that gap for five ways of doing the same job: a C++ condition variable, a pthread condition variable on CLOCK_MONOTONIC, per-waiter eventfd handles, per-waiter POSIX semaphores, and a generation-based futex broadcast. All five implement true fan-out — the signaler wakes every waiter each iteration and waits for every acknowledgement before going round again — so the numbers compare the mechanisms and not the benchmark’s plumbing.

It runs on x86_64 and arm64, with and without SCHED_FIFO, on standard and PREEMPT_RT kernels, and it brings its own load: a generator that keeps CPUs busy and delivers a signal at a configured rate, which exercises the same kernel paths as interrupt delivery.

It is the companion to my ELC 2026 talk, Microseconds Matter: Benchmarking Thread Synchronization — recorded, with the slides on the Talks page .