Skip to content

feat(rta): Context_Switch_Time folded into recurrence (v0.9.2)#198

Open
avrabe wants to merge 1 commit intomainfrom
feat/v0.9.2-2b-context-switch
Open

feat(rta): Context_Switch_Time folded into recurrence (v0.9.2)#198
avrabe wants to merge 1 commit intomainfrom
feat/v0.9.2-2b-context-switch

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 1, 2026

Tier A #5 partial — folds Context_Switch_Time into the RTA recurrence as 2·CS WCET inflation per Buttazzo §7. v0.8.x warned about CS being unset but didn't use it when set. New OverheadInflation Info diagnostic. Default unset = byte-identical. Lean recurrence theorem unchanged (caller-side inflation).

Test plan: 2 new tests (with-CS / without-CS); workspace tests pass; clippy/fmt/rivet clean.

🤖 Generated with Claude Code

Tier A #5 from the post-v0.9.0 reviewer audit (partial — only
Context_Switch_Time; Interrupt_Overhead per ISR firing is the
companion follow-up). v0.8.x emitted a STPA-REQ-022 advisory if
Context_Switch_Time was unset, but never folded the value into
the Tindell-Clark / Joseph-Pandya recurrence when it WAS set —
silently optimistic.

Now: each thread's WCET is inflated by `2 × Context_Switch_Time`
(one preemption-in + one preemption-out per Buttazzo §7) before
entering the recurrence. The recurrence math itself
(`compute_response_time_jittered_blocking`) is unchanged, so the
existing Lean monotonicity / convergence proofs still hold. New
`OverheadInflation` Info diagnostic per thread when CS > 0.

Default unset = 0 → byte-identical to v0.8.x / v0.9.1.

REQ-RTA-008 + TEST-RTA-CONTEXT-SWITCH. 2 new RTA tests
(context_switch_inflates_wcet,
no_context_switch_byte_identical_to_v091).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant