code wiki / (root) / nx_procpkg_research_fetch.nx

nx_procpkg_research_fetch.nx source

↩ module page · 54 lines · 4161 B

1// nx_procpkg_research_fetch.nx -- bank the two software-reachable OS gaps for NishiOS rung 5 (operator "keep going"): 2// PROCESS SUPERVISION (flip INIT-SERVICES PARTIAL->HAVE) + DEPENDENCY VERSION-SOLVING (flip PACKAGE-MGMT). Fetches 3// the incumbents' OWN designs so each build exceeds knowingly: PID1/init semantics + child reaping (wait/SIGCHLD/ 4// zombies) + supervisors (systemd/runit/s6/daemontools/supervisord) + watchdog/backoff + socket-activation + 5// cgroups; and semantic versioning + the resolver theory (SAT/PubGrub/backtracking) + lockfiles + the diamond- 6// dependency + "dependency hell" problem. Sovereign TLS; idempotent. expect_exit:0 ORIGINAL 7import "nx_research_engine.nx" 8const K_MAGIC_8388608: i64 = 8388608 9 10func F(u: *u8, o: *u8, store: *TrustStore, out: *u8, cap: i64) -> i64 { return rf_fetch_bank(u, o, store, out, cap) } 11 12func main() -> i64 { 13 let store: *TrustStore = rf_init() 14 if (store as i64) == 0 { rf_puts("procpkg: trust store load failed\n" as *u8); return 1 } 15 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- PROCESS-SUPERVISION + VERSION-SOLVING field -> Library\n" as *u8) 16 let cap: i64 = K_MAGIC_8388608 17 let out: *u8 = sys_mmap(cap) 18 var ok: i64 = 0 19 20 rf_section("PID1 / INIT SEMANTICS -- what an init/PID1 must do (reap orphans, ordered start)" as *u8) 21 ok = ok + F("https://en.wikipedia.org/wiki/Init" as *u8, "pp_init" as *u8, store, out, cap) 22 ok = ok + F("https://en.wikipedia.org/wiki/Process_identifier" as *u8, "pp_pid" as *u8, store, out, cap) 23 ok = ok + F("https://en.wikipedia.org/wiki/Child_process" as *u8, "pp_child" as *u8, store, out, cap) 24 ok = ok + F("https://en.wikipedia.org/wiki/Zombie_process" as *u8, "pp_zombie" as *u8, store, out, cap) 25 ok = ok + F("https://en.wikipedia.org/wiki/Orphan_process" as *u8, "pp_orphan" as *u8, store, out, cap) 26 27 rf_section("CHILD REAPING -- wait/waitpid/wait4 + SIGCHLD (the real-liveness primitive)" as *u8) 28 ok = ok + F("https://en.wikipedia.org/wiki/Wait_(system_call)" as *u8, "pp_wait" as *u8, store, out, cap) 29 ok = ok + F("https://en.wikipedia.org/wiki/Fork%E2%80%93exec" as *u8, "pp_forkexec" as *u8, store, out, cap) 30 ok = ok + F("https://en.wikipedia.org/wiki/Signal_(IPC)" as *u8, "pp_signal" as *u8, store, out, cap) 31 32 rf_section("SUPERVISORS -- systemd/runit/s6/daemontools/supervisord (restart+watchdog+backoff)" as *u8) 33 ok = ok + F("https://en.wikipedia.org/wiki/Systemd" as *u8, "pp_systemd" as *u8, store, out, cap) 34 ok = ok + F("https://en.wikipedia.org/wiki/Runit" as *u8, "pp_runit" as *u8, store, out, cap) 35 ok = ok + F("https://en.wikipedia.org/wiki/Daemontools" as *u8, "pp_daemontools" as *u8, store, out, cap) 36 ok = ok + F("https://en.wikipedia.org/wiki/Watchdog_timer" as *u8, "pp_watchdog" as *u8, store, out, cap) 37 38 rf_section("ACTIVATION + ISOLATION -- socket-activation + cgroups (the systemd exceed axes)" as *u8) 39 ok = ok + F("https://en.wikipedia.org/wiki/Systemd#Socket_activation" as *u8, "pp_socketact" as *u8, store, out, cap) 40 ok = ok + F("https://en.wikipedia.org/wiki/Cgroups" as *u8, "pp_cgroups" as *u8, store, out, cap) 41 42 rf_section("SEMANTIC VERSIONING -- the constraint grammar the solver must satisfy" as *u8) 43 ok = ok + F("https://en.wikipedia.org/wiki/Software_versioning" as *u8, "pp_versioning" as *u8, store, out, cap) 44 ok = ok + F("https://semver.org/" as *u8, "pp_semver" as *u8, store, out, cap) 45 46 rf_section("DEPENDENCY RESOLUTION THEORY -- SAT/PubGrub/backtracking + dependency hell" as *u8) 47 ok = ok + F("https://en.wikipedia.org/wiki/Dependency_hell" as *u8, "pp_dephell" as *u8, store, out, cap) 48 ok = ok + F("https://en.wikipedia.org/wiki/Boolean_satisfiability_problem" as *u8, "pp_sat" as *u8, store, out, cap) 49 ok = ok + F("https://en.wikipedia.org/wiki/Backtracking" as *u8, "pp_backtracking" as *u8, store, out, cap) 50 ok = ok + F("https://en.wikipedia.org/wiki/Package_manager" as *u8, "pp_pkgmgr" as *u8, store, out, cap) 51 52 rf_puts("PROC+PKG FIELD BANKED: "); rf_putn(ok); rf_puts(" / 20 -- PID1/reaping/supervisor + semver/resolver RESEARCHED\n" as *u8) 53 return 0 54}