[FEATURE] Serve original cancellable public clock deadlines #4

Closed
opened 2026-10-02 12:26:10 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Native authorized deadlines and activity waits now exist, but Timed still serves only immediate clock snapshots and cooperatively polls its two legacy routes. Descriptor-readiness clients need original cancellable deadline delivery through their already delegated public clock service. They must not receive a direct native Time capability.

Proposed behavior and scope

Add a cap-free owned public request for an absolute monotonic nanosecond deadline, with an exact correlated completion. Retain multiple original pending deliveries in deployment-counted, compiler-described mapped storage. Preserve immediate monotonic/wall queries and private RTC input. Multiplex pending waiters through the earliest actual native timer, retire cancellation through the original native invocation, and explicitly watch both actual legacy receive bindings. Observe activity before inspecting every work source, and sleep only after no actionable work remains.

Integration must size and map the actual waiter arena from explicit deployment configuration before signing. No allocator, guessed waiter ceiling or new service grant is required. Long deadline requests use owned transport; legacy snapshot behavior remains compatible. Coordinate the request codec, actual service, packaging and later mediator consumer.

Authority, security and reliability

Only Timed's existing dedicated Time SEND binding may arm native deadlines. A public caller possesses only its actual delegated public service endpoint; a request ID, timestamp or copied owner selector grants no authority. Retain actual native delivery ownership before interpreting request evidence. Caller release and terminal cleanup must retire original waiting work and acknowledge that exact delivery. Binding loss, clock failure, storage exhaustion and malformed evidence must never fabricate elapsed time, leak an original timer or revive a replacement. Source errors remain errors. Preserve native result custody through definite capacity refusal and uncertain completion; failure to account for custody terminates the service instead of resuming ordinary admission.

Acceptance criteria

Checklist
  • Implement exact request/reply codecs, known-operation and reserved-field admission, complete unsigned nanosecond semantics, and authored malformed/correlation controls.
  • Provision an authenticated counted waiter arena through actual image packaging, with overflow/alignment/zero-capacity/exhaustion controls and no additional capability grants.
  • Implement multiple original pending waiters, genuine earliest-deadline delivery, explicit source failure, cancellation and exact timer/result cleanup.
  • Cover existing owned snapshots and both legacy public/private routes with race-free observation, fair progress and atomic quiescent sleep.
  • Author independent ownership/failure/race controls and relevant native workload coverage; maintain documentation/manual, signed immutable graph and linked public tracking. Execution remains waived and must not be claimed as passed.

Alternatives and tradeoffs

Direct Time grants to each mediator would widen authority. A single retained long request would block unrelated deadlines and snapshot queries. A fixed waiter array would impose a source-coded capacity. Deployment-counted mapped storage keeps the actual bound explicit. One earliest native timer avoids one hardware-facing owner per public waiter; cancellation scans remain bounded by admitted original storage and fair progress. Do not replace actual elapsed time with poll counts or cooperative yields.

Tracking and rollout

Depends on authorized native deadlines and the timer-routing repair. Implements the clock-service portion of descriptor readiness, tracked in phase completion. Coordinate Timed review, LibIPC review and Integration review. Full descriptor readiness remains open; both complete EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed.

Counted public clock deadlines — 2 October 2026

One earliest native timer uses only Timed's existing Time SEND binding; no Time capability is delegated to clients.

Original caller cancellation, source failure, definite result-capacity refusal and uncertain timer/result custody remain distinct.

Image packaging requires explicit waiter capacity, validates pristine compiler geometry and checked native extent, expands the signed arena and shifts its terminal stack. Zero capacity deliberately refuses deferred admissions; padding never adds rows.

Its required TIMED_DEADLINES_OK marker follows all assertions. The dedicated scenario retains a 90-second external diagnostic budget; the existing time profile also requires the workload and actual APIC wake backend. Hosted adapters cannot fabricate guest success.

Original descriptor/provider subscriptions, mediator/client consumers, signal masks and complete poll/select workloads remain unfinished. Overall phase checklist acceptance is unchanged. Both complete EriX guest generations and rebuilding external Rust/LLVM inside EriX remain required and unperformed.

Related records and contracts
Repository Links
docs PR 4
integration public-deadlines.md
lib-ipc public-deadlines.md
rootd PR 2
timed issue 4
## Problem and motivation Native authorized deadlines and activity waits now exist, but Timed still serves only immediate clock snapshots and cooperatively polls its two legacy routes. Descriptor-readiness clients need original cancellable deadline delivery through their already delegated public clock service. They must not receive a direct native Time capability. ## Proposed behavior and scope Add a cap-free owned public request for an absolute monotonic nanosecond deadline, with an exact correlated completion. Retain multiple original pending deliveries in deployment-counted, compiler-described mapped storage. Preserve immediate monotonic/wall queries and private RTC input. Multiplex pending waiters through the earliest actual native timer, retire cancellation through the original native invocation, and explicitly watch both actual legacy receive bindings. Observe activity before inspecting every work source, and sleep only after no actionable work remains. Integration must size and map the actual waiter arena from explicit deployment configuration before signing. No allocator, guessed waiter ceiling or new service grant is required. Long deadline requests use owned transport; legacy snapshot behavior remains compatible. Coordinate the request codec, actual service, packaging and later mediator consumer. ## Authority, security and reliability Only Timed's existing dedicated Time SEND binding may arm native deadlines. A public caller possesses only its actual delegated public service endpoint; a request ID, timestamp or copied owner selector grants no authority. Retain actual native delivery ownership before interpreting request evidence. Caller release and terminal cleanup must retire original waiting work and acknowledge that exact delivery. Binding loss, clock failure, storage exhaustion and malformed evidence must never fabricate elapsed time, leak an original timer or revive a replacement. Source errors remain errors. Preserve native result custody through definite capacity refusal and uncertain completion; failure to account for custody terminates the service instead of resuming ordinary admission. ## Acceptance criteria <details> <summary>Checklist</summary> - [x] Implement exact request/reply codecs, known-operation and reserved-field admission, complete unsigned nanosecond semantics, and authored malformed/correlation controls. - [x] Provision an authenticated counted waiter arena through actual image packaging, with overflow/alignment/zero-capacity/exhaustion controls and no additional capability grants. - [x] Implement multiple original pending waiters, genuine earliest-deadline delivery, explicit source failure, cancellation and exact timer/result cleanup. - [x] Cover existing owned snapshots and both legacy public/private routes with race-free observation, fair progress and atomic quiescent sleep. - [x] Author independent ownership/failure/race controls and relevant native workload coverage; maintain documentation/manual, signed immutable graph and linked public tracking. Execution remains waived and must not be claimed as passed. </details> ## Alternatives and tradeoffs Direct Time grants to each mediator would widen authority. A single retained long request would block unrelated deadlines and snapshot queries. A fixed waiter array would impose a source-coded capacity. Deployment-counted mapped storage keeps the actual bound explicit. One earliest native timer avoids one hardware-facing owner per public waiter; cancellation scans remain bounded by admitted original storage and fair progress. Do not replace actual elapsed time with poll counts or cooperative yields. ## Tracking and rollout Depends on [authorized native deadlines](https://git.erikinkinen.fi/erix/lib-ipc/src/branch/feature/posix-compat/docs/native-deadlines.md) and the [timer-routing repair](https://git.erikinkinen.fi/erix/kernel/issues/43). Implements the clock-service portion of [descriptor readiness](https://git.erikinkinen.fi/erix/posixd/issues/33), tracked in [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). Coordinate [Timed review](https://git.erikinkinen.fi/erix/timed/pulls/2), [LibIPC review](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2) and [Integration review](https://git.erikinkinen.fi/erix/integration/pulls/12). Full descriptor readiness remains open; both complete EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed. ### Counted public clock deadlines — 2 October 2026 One earliest native timer uses only Timed's existing Time SEND binding; no Time capability is delegated to clients. Original caller cancellation, source failure, definite result-capacity refusal and uncertain timer/result custody remain distinct. Image packaging requires explicit waiter capacity, validates pristine compiler geometry and checked native extent, expands the signed arena and shifts its terminal stack. Zero capacity deliberately refuses deferred admissions; padding never adds rows. Its required TIMED_DEADLINES_OK marker follows all assertions. The dedicated scenario retains a 90-second external diagnostic budget; the existing time profile also requires the workload and actual APIC wake backend. Hosted adapters cannot fabricate guest success. Original descriptor/provider subscriptions, mediator/client consumers, signal masks and complete poll/select workloads remain unfinished. Overall phase checklist acceptance is unchanged. Both complete EriX guest generations and rebuilding external Rust/LLVM inside EriX remain required and unperformed. <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | docs | [PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4) | | integration | [public-deadlines.md](https://git.erikinkinen.fi/erix/integration/src/branch/feature/posix-compat/docs/public-deadlines.md) | | lib-ipc | [public-deadlines.md](https://git.erikinkinen.fi/erix/lib-ipc/src/branch/feature/posix-compat/docs/public-deadlines.md) | | rootd | [PR 2](https://git.erikinkinen.fi/erix/rootd/pulls/2) | | timed | [issue 4](https://git.erikinkinen.fi/erix/timed/issues/4) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:14 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/timed#4
No description provided.