modus
Menu
On this page

The module work_accounting_probe

Work accounting probe: per-connection work threads strictly funded by each client's offered child budget.

Each client connection provides a child budget handle carrying the right Spend. The service allocates the connection's work thread stack, uncommitted scratch memory, and work thread itself on that client budget — never on the service's own budget. Exhaustion or revocation of one client affects only that client's work thread and never starves sibling clients.

See: Work accounting: a service charges its work to the client in the repository

work_accounting_probe module with no entry

Hash
51bd6d40cf89902c64c998b772323c78620a60fc2f7dfbcdbe1bf58d791bcc9d
Size
45056 bytes
Exports
2
Imports
0
Imported by
0
License
MIT

Work accounting probe: per-connection work threads strictly funded by each client's offered child budget

FactValue
KindModules with no entry
Sourcesrc/modules/tests/work_accounting_probe
Boot imageyes: in the boot image, 45056 bytes in this build
Build settingsnone: the defaults of the source
Importsnone
Imported bynone

Neighbours

It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.

Exports

ExportWhat it does
work_budget_contract_version() -> Integerexports the work accounting contract version
run_two_client_isolation_probe() -> Integercreates two child budgets attenuated to Spend only, spawns one work thread per client on its own child budget, exhausts client 1's scratch pages while proving client 2 keeps running and the service's own remaining pages never drop for client work, then revokes and closes both cleanly

work_budget_contract_version

work_budget_contract_version() -> 

work_budget_contract_version exports the work accounting contract version.

Parameters
none
Result
Source
src/modules/tests/work_accounting_probe/probe.odin:81

run_two_client_isolation_probe

run_two_client_isolation_probe() -> 

run_two_client_isolation_probe creates two child budgets attenuated to Spend only, spawns one work thread per client on its own child budget, exhausts client 1's scratch pages while proving client 2 keeps running and the service's own remaining pages never drop for client work, then revokes and closes both cleanly. Returns 0 on success, or -1 with an error record.

Parameters
none
Result
When it fails
a negative result, and the error record
Source
src/modules/tests/work_accounting_probe/probe.odin:595

Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).

Integer wire form

A wire form of the module contract: one word of a call. A signed integer of 64 bits, in a register.

Error_Record record of a module

A record of the module work_accounting_probe: 56 bytes, aligned on 8 bytes, 0 bytes of padding.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes