[KernelKit] scheduler sleep tracking + mutex priority inheritance #143
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 166 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.306
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #143"
general
weight: 0.35
amlel-el-mahrouss
Summary
STimefield toUserProcessfor tracking sleep/blocked timePTimeproportionally when process wakes from sleep, improves interactive responsivenessBinaryMutexto prevent priority inversion when high-priority task blocks on mutex held by low-priority taskUnlock()that was spinning in a loop waiting for process status change (made no sense)LockAndWait()that was locking then immediately unlockingModules affected
KernelKit/BinaryMutex.hKernelKit/UserProcessScheduler.hsrc/BinaryMutex.cppsrc/UserProcessScheduler.cppTechnical
Sleep tracking: processes in
kFrozenstatus accumulateSTime. when they become schedulable again,PTimegets boosted proportionally (capped atkHighlevel). this makes I/O-bound and interactive tasks more responsive since they get priority when they wake up after sleeping.Priority inheritance: when a process tries to
Lock()a mutex already held by a lower-priority process, the owner gets temporarily boosted to the waiters priority. this prevents unbounded priority inversion where a medium-priority task can preempt the mutex owner indefinitely while a high-priority task waits. the original priority is restored onUnlock().