feat(rta): Context_Switch_Time folded into recurrence (v0.9.2)#198
Open
feat(rta): Context_Switch_Time folded into recurrence (v0.9.2)#198
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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