kellito 8c7f6172a2 v5.3: initnsmgr event-driven deferred retry on O_NONBLOCK (Design B)
Implement Design B from local/docs/INITNSMGR-CONCURRENCY-DESIGN.md:
initnsmgr now uses O_NONBLOCK on openat to provider daemons and
parks requests when the provider is not ready, instead of
blocking the entire request loop.

Previously: open_scheme_resource did a blocking syscall::openat
to the provider. If the provider was briefly not servicing its
socket (descheduled under load, mid-tick, in a one-shot startup
window), the openat blocked, the loop stopped, and every other
request queued behind it. The wedge surfaced at whatever boot
stage was in flight (e.g. 'ahcid' in the logs) - that stage was
the symptom location, not the cause.

Now:
- openat to a provider is called with O_NONBLOCK.
- On Ok(fd), return the fd immediately.
- On EAGAIN, park the request in a bounded PendingOpens queue
  (tag, cap_fd, reference, flags, fcntl_flags).
- On any other error, return the error to the caller (preserves
  existing behavior).
- After each next_request cycle, retry ALL parked opens with
  O_NONBLOCK. Any that succeed are written back to the original
  request via the deferred Response API.
- The park queue is bounded (64 entries). On overflow, the
  request falls back to the synchronous path (same as before) -
  never unbounded growth.

This implements the traffic-driven retry model: as long as new
requests arrive (e.g. processes starting), parked opens are
re-attempted frequently. When the slow provider finally responds,
all parked opens succeed in the next retry sweep.

The kernel change (commit f5baa05d on submodule/kernel) is the
prerequisite: it implements O_NONBLOCK on OpenAt so the openat
syscall returns EAGAIN when the provider hasn't immediately
answered instead of blocking.

Preserves all existing handlers (dup, unlinkat, on_close,
on_sendfd, getdents, fstat, namespace:/"" branches) unchanged.
Only the openat -> open_scheme_resource path is changed.

Per local/AGENTS.md:
- No new branches (work on submodule/base)
- No stubs, no todo!/unimplemented!
- Cat 2 fork - changes committed to submodule/base branch

Closes v5.3 Design B (base side). Kernel side is the companion
commit on submodule/kernel.
2026-07-26 06:10:16 +09:00
2025-11-29 19:04:06 +01:00
2025-11-29 19:04:06 +01:00

Base

Repository containing various system daemons, that are considered fundamental for the OS.

You can see what each component does in the following list:

  • audiod : Daemon used to process the sound drivers audio
  • bootstrap : First code that the kernel executes, responsible for spawning the init daemon
  • daemon : Redox daemon library
  • drivers
  • init : Daemon used to start most system components and programs
  • initfs : Filesystem with the necessary system components to run RedoxFS
  • ipcd : Daemon used for inter-process communication
  • logd : Daemon used to log system components and daemons
  • netstack : Daemon used for networking
  • ptyd : Daemon used for pseudo-terminal
  • ramfs : RAM filesystem
  • randd : Daemon used for random number generation
  • zerod : Daemon used to discard all writes and fill read buffers with zero

How To Contribute

To learn how to contribute you need to read the following document:

If you want to contribute to drivers read its README

Development

To learn how to do development with these system components inside the Redox build system you need to read the Build System and Coding and Building pages.

How To Build

It is recommended to build this system component via the Redox build system, you can learn how to do it on the Building Redox page.

To build and test outside the build system, install redoxer then use check.sh script to build or test:

  • ./check.sh - Check build for x86_64
  • ./check.sh --arch=ARCH - Check build for specific ARCH (aarch64, i586, riscv64gc)
  • ./check.sh --all - Check build for all ARCH
  • ./check.sh --test - Check the base system boots up on x86_64

You can also use make install to inspect the content on ./sysroot, or make test-gui to test booting with orbital interactively.

S
Description
RedBear Operating System, based on RedoxOS. Licenced under MIT license.
https://redbearos.org
Readme MIT 18 GiB
Languages
C 37.5%
C++ 37.2%
JavaScript 6.7%
QML 3.4%
HTML 3.2%
Other 11.4%