Brussels / 31 January & 1 February 2026

schedule

Designing Fibers for systemd: Structured POSIX Avoidance in PID 1


Concurrency in pid 1 and systemd in general is a touchy subject. systemd is very trigger happy when it comes to forking and when combined with multithreading this causes all sorts of issues, so there's an unwritten policy to not use threads in systemd. This has lead to (in my opinion) a sprawling callback hell in every daemon and CLI in the project that performs concurrent operations.

In this presentation I'll present my view on the issues with using threads in systemd and why cooperative multitasking implemented using green threads can fix many of them while avoiding callback hell. I'll also briefly go over the unique problems you run into when designing a fiber based system in and the general design for fibers in systemd, finishing with how they're implemented under the hood with ucontext.h.

I'm hoping to get feedback on the approach from the devroom, and bring awareness on how systemd is using the GNU toolchain.

https://github.com/systemd/systemd https://github.com/systemd/systemd/pull/39771

Speakers

Daan De Meyer

Links