feat(rta): PIP/PCP blocking term in hierarchical RTA (v0.7.1)#163
Merged
feat(rta): PIP/PCP blocking term in hierarchical RTA (v0.7.1)#163
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
7062315 to
3a7c2fd
Compare
Extends the v0.7.0 hierarchical IRQ-aware RTA with a configurable blocking term B_i for tasks holding shared resources under PIP or PCP. Reads AS5506 Thread_Properties::Locking_Protocol and a new Spar_Timing::Critical_Section_Blocking time value. Joseph-Pandya / Buttazzo: R_i(n+1) = C_i + J_i + B_i + Σ⌈...⌉·C_j + ISR. Non-regression: models without Locking_Protocol produce byte-identical output to main (verified by no_locking_matches_v070 test). Closes the v0.7.1 follow-up explicitly carved out by #147 / #149. New requirement: REQ-TIMING-PIP-001. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3a7c2fd to
c02e7c7
Compare
4 tasks
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.
Summary
Extends the v0.7.0 hierarchical IRQ-aware RTA (#147) with a configurable
blocking term
B_ifor tasks holding shared resources underPriority_Inheritance_Protocol(PIP) orPriority_Ceiling_Protocol(PCP), per Joseph & Pandya 1986 / Buttazzo, Hard Real-Time Computing
Systems. Discharges the v0.7.1 follow-up explicitly carved out by #147
/ #149.
The recurrence becomes:
What's in this PR
Property surface
Thread_Properties::Locking_Protocol(AS5506D §5.4.4 enum:Priority_Inheritance_Protocol,Priority_Ceiling_Protocol,Stop_For_Lock,None).Spar_Timing::Critical_Section_Blocking(Time, picoseconds) — theuser's bound on
B_i.Typed accessors (
property_accessors.rs)LockingProtocolenum +get_locking_protocol(&PropertyMap).get_critical_section_blocking(&PropertyMap) -> Option<u64>.Verified RTA (
scheduling_verified.rs)compute_response_time_jittered_blocking(...)andrta_step_jittered_blocking(...). Convergence preserved (blockingis a constant; recurrence remains monotone non-decreasing in
r).compute_response_time_jitteredunchanged (no breaking API).RTA pass (
rta.rs)Locking_Protocol+Critical_Section_Blockingper thread;only PIP/PCP contribute a blocking term (
Stop_For_Lock/Nonedegrade to
B_i = 0).BlockingInflatedInfo diagnostic when blockingTests (8 new RTA tests + 4 scheduling-verified tests)
no_locking_matches_v070(non-regression byte-for-byte gate)pip_blocking_inflates_response,pcp_blocking_inflates_responsezero_blocking_no_diagnosticblocking_plus_isr_compose,blocking_plus_jitter_composepip_deadline_miss_with_blockingstop_for_lock_treated_as_no_blockingRivet artifacts (append-only)
REQ-TIMING-PIP-001requirement.TEST-RTA-BLOCKINGverification entry.Non-regression
Models without
Locking_Protocolproduce byte-identical output to main:compute_response_time_jittered_blocking(..., blocking=0, ...)reducesto
compute_response_time_jittered(...)term-by-term, and noBlockingInflateddiagnostic fires. Theno_locking_matches_v070testasserts the golden snapshot of the prior
basic_convergence_two_threadsmodel.
Deferred (out of scope for v0.7.1)
B_ifrom declared sharedresources rather than reading the user's bound directly) — v0.8.0+.
compute_response_time_jittered_blockingconvergence —Mathlib
RTABlocking.leanis a v0.8.0 follow-up tracked separately.COMPLIANCE.md update — separate commits.
Test plan
cargo build --workspacecleancargo test -p spar-analysisgreen (814 lib + 3 fixture)cargo test -p spar-hir-defgreen (438 tests)cargo clippy --workspace --all-targets -- -D warningscleancargo fmt --all -- --checkcleanrivet validatePASS🤖 Generated with Claude Code