code wiki / (root) / nx_swarm_queue_gate.nx

nx_swarm_queue_gate.nx

buildroot/runtime/nx_swarm_queue_gate.nx

8111 B111 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic swarm
docsdependenciesstructsconstsfunctions

about

nx_swarm_queue_gate.nx -- gate for the intelligent queue scheduler. T1 sq_should_admit table (PURE, the anti-oversubscribe + coordination core): rank0/hold0/cap1/ok->admit · rank0/hold1/cap1/ok->wait(at-cap) · rank1/hold0/cap1/ok->wait (someone ahead) · rank1/hold0/cap2/ok->admit · rank0/hold0/cap1/!ok->wait(telemetry). T2 sq_rank fairness (PURE): higher-prio ahead->rank1 · lower-prio->rank0 · same-prio-earlier->rank1 · same-prio-later->rank0 · self excluded. T3 sq_scan replay: crafted log with a LIVE holder (pid 1=init) + a DEAD-pid waiter (reaped) + a HOLD tombstoned by DONE -> holders counts only the live untombstoned one; dead waiter absent. T4 live: empty queue -> sq_wait_admit(self, huge cap) GRANTs immediately; release tombstones it. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_swarm_queue.nx nx_gate_verdict.nx nx_swarm_queue_gate.nx

imports: nx_swarm_queue.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main std_putln std_puts std_slen sys_write sq_should_admit sq_rank sq_scan sq_type sq_ifield ml_pid_alive sys_mmap std_itoa sys_mmap ↻ sys_openat_rd sys_close std_slen ↻ std_puts ↻ std_pdec sys_mmap ↻ std_itoa ↻ sys_write ↻ sov_put ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_commit ss_segid_ok sys_mmap ↻ ss_cat ss_catn sys_mmap ↻ sys_write ↻ ss_write_seg ss_segid_ok ↻ sys_mmap ↻

structs

none

consts

none

functions

14func gq_write(path: *u8, s: *u8) -> i64
22func main(argc: i64, argv: *i64) -> i64