code wiki / _hdl_build / nx_burst_scheduler.nx
nx_burst_scheduler.nx
buildroot/runtime/_hdl_build/nx_burst_scheduler.nx
about
nx_burst_scheduler.nx -- This module schedules task bursts to local, LAN, or cloud resources based on available budget and SLA requirements.
dependencies 3 imports · 0 importers
imports: nx_gate_gn.nxnx_gate_base.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 18 | const TIER_MAGIC_50000: i64 = 50000 |
| 21 | const TIER_NAS: i64 = 0 |
| 22 | const TIER_LOCAL: i64 = 1 // this machine / workstation |
| 23 | const TIER_OTHER: i64 = 2 // other LAN machines |
| 24 | const TIER_CLOUD: i64 = 3 // cloud (elastic but costliest -- only when needed) |
| 26 | const PLAN_NAS_ALONE: i64 = 0 |
| 27 | const PLAN_BURSTED: i64 = 1 |
| 28 | const PLAN_ESCALATE: i64 = 2 |
functions
| 30 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 32 | func tier_name(t: i64) -> *u8 { if t==TIER_NAS { return "NAS" as *u8 } if t==TIER_LOCAL { return "this-machine" as *u8 } if t==TIER_OTHER { return "other-LAN" as *u8 } return "CLOUD" as *u8 } |
| 36 | func plan_burst(task_cost: i64, sla: i64, nb: *i64, nt: *i64, nn: i64, alloc: *i64) -> i64 |
| 55 | func plan_uses_cloud(nt: *i64, alloc: *i64, nn: i64) -> i64 { var i: i64=0; while i<nn { if alloc[i]>0 { if nt[i]==TIER_CLOUD { return 1 } } i=i+1 } return 0 } |
| 57 | func show_plan(label: *u8, verdict: i64, task: i64, sla: i64, nb: *i64, nt: *i64, nn: i64, alloc: *i64) -> i64 |
| 66 | func main() -> i64 |