Sasha Shepeliev
Offer Sasha work on your next project.
Rating
Skills and abilities
Portfolio
-
minit
C & C++Minit is a minimalist, ultra-lightweight, and fault-tolerant system initializer (PID 1) and process supervisor for Linux, written in pure C. It is a compact and fast alternative to systemd (or a modern replacement for s6/runit), specifically designed for embedded systems, containers, IoT, and custom distributions.
Key features summarized:
Service and dependency management:
Parses simple text .conf files.
… Builds a dependency graph and starts services in parallel, ensuring instant system boot.
Supports boot levels analogous to systemd (targets, e.g., basic.target, multi-user.target).
Advanced process supervisor:
Failure protection: has built-in Flap detection and Crash-loop throttle mechanisms (exponential restart delay with jitter) to prevent cyclically failing services from overwhelming the CPU.
Circuit Breaker model: if a service continuously fails, minit temporarily isolates it (like a fuse).
Health checks: autonomously checks the viability of processes via Unix sockets or custom commands. If a process hangs, it restarts it.
Low-level integration without external dependencies:
logind-shim: built-in minimal equivalent of systemd-logind. Works through D-Bus, allowing the launch of display managers (GDM, SDDM) and managing user sessions.
Power management: correctly handles laptop lid closure and sleep (suspend/hibernate), considering delay inhibitors from services (e.g., gives NetworkManager time to properly terminate sessions).
Early D-Bus: raises the system D-Bus during boot, avoiding race conditions.
Security and resource constraints:
Can apply seccomp filters (text allow lists or binary BPF format) on the fly and drop Linux Capabilities for process isolation.
Distributes services across cgroups (v2), allowing strict limits on CPU and memory directly from the config.
Efficient architecture:
No wasteful polling cycles (busy-polling). Response to process exits and graceful shutdown is implemented through non-blocking epoll and sigtimedwait.
Managed via the console utility minit-ctl, which can display the dependency tree, tail logs, and return status in JSON format.