Skip to main content

Module wait

Module wait 

Source
Expand description

Wait-for-VRAM polling queue (GPU-SHARE-003).

Polls the VRAM ledger until sufficient budget is available or timeout. Uses exponential backoff: 30s base, 300s max.

§Contract

  • wait_for_vram() returns within timeout + max_interval (worst case)
  • Each poll iteration prunes dead PIDs + expired leases
  • CPU usage < 1% during wait (sleeping between polls)

Structs§

WaitConfig
Configuration for wait-for-VRAM polling.
WaitProgress
Produce a structured progress report for the current wait state.

Functions§

fairness_via_expiry
Identify expired reservations eligible for reclamation (fairness via lease expiry).
progress_report
Build a progress report snapshot for the current wait state.
timeout_bound
Compute the maximum wait duration bound for a given config.
wait_for_vram
Poll the ledger until VRAM budget is available.