the real-time execution performance agent
DESCRIPTION
The Real-Time Execution Performance Agent. An Hard/Soft Real-Time Digital Control and Continuous Media Experiment to Demonstrate Confidence-Based Scheduling With The RT-EPA Execution Control Interface. Sam Siewert [email protected]. Motivation for RT-EPA. - PowerPoint PPT PresentationTRANSCRIPT
The Real-Time Execution Performance Agent
An Hard/Soft Real-Time Digital Control and Continuous MediaExperiment to Demonstrate Confidence-Based Scheduling
With The RT-EPA Execution Control Interface
Motivation for RT-EPA
• Emerging Soft Real-Time Applications– Virtual Reality, Multimedia, Flexible Automation and Control
• Device Interfaces with RT Processing Between Them– Range of Device Bandwidths and Characteristics
Aperiodic Bursty Periodic
– Range of RT Performance Reliability Required
Best-Effort Confidence-Based Guaranteed
• Negotiated Service & Control of Kernel Processing Pipelines– Kernel Pipeline Efficiency Well-Demonstrated (Fall & Govindan)
– Use Real-Time Kernel Threads and Provide Trades between Utilization and Expected Number of Deadline Misses
Problems Addressed and Approach
• “Soft” Real-Time - Confidence-Based Scheduling– Not Guaranteed, Not Best Effort -- Probabilistic Predictability
– Can Deadline Confidence Be Derived from Execution Time Confidence? -- Deadline Monotonic Confidence Extension
– Can WCET Hard Real-Time Requirement be Relaxed? -- Execution Time Model (Confidence Interval, Distribution)
– 99.9% of Deadlines are Met Given 99.9% Execution Time Confidence, Release Frequency, and Interference
• Service Negotiation & Execution Control - EPA/PCIP– Can Execution Parameter Changes Be Handled Maintaining
(Degrading) Deadline Confidences? -- Parametric Monitoring and Re-estimation of Confidences
– Can Application Modify Service On-Line? -- Dynamic Admission
RT EPA/PCIP Design Issues
• Required RT-EPA Kernel Interface– Required Kernel Features (POSIX 1003.4 not sufficient)
• Priority Preemptable Kernel-level Threads, Priority Inversion Control, VM Page Wiring, and Kernel-space Modules
• Simple Implementation in single-user RTOS (e.g. VxWorks)
• More complex Implementation in multi-user OS (e.g. Solaris) possible given required features
– Portable RT “Kernel-Ware” modules (trusted like driver code)
• EPA Service Negotiation Interface and Control– Soft and “Termination” Deadlines and Confidences (Computed)– Execution Time Models (Distribution Assumption or Free)– Output Hold (Buffering) for Isochrony– Parameter Change Confidence Re-estimation (C(i), T(i), D(i))– Confidence and Deadline Management (Preserve Negotiated Confidences,
Signal Inability to Maintain Negotiation)
RT EPA Interface Design
Application
Execution Performance Agent
SinkDevice
SourceDevice
system call
DeviceInterface
Pipe-StageFilter
DeviceInterface
kernel API
HW / SW Interface
Low Frequency Interaction(Parameter Initialization andModification)
High-FrequencyInteraction and Per-BlockProcessing
Robot Control
Execution Performance Agent
POS RELAY
SHOULDER WRIST ELBOWARM BASE
POS RELAY POS RELAY POS RELAY POS RELAY
5 DOF Robot RTEPA Application
RACEControl
Execution Performance Agent
68HC11
RAMPCONTROL
YAWCONTROL
RAMPRANGE
YAW
CAMERA 68HC11 DIGITALCOMPASS
RACE RTEPA Application
RT EPA Confidence-Based Scheduling
computationtime distribution
Chigh, Dterm
signaland abort
Rmin
bufferedresponse
best-case executionhold earlyresponse
resp
onse
uti
lity
resp
onse
dam
age
time
release starttime
latestdesired
response termination
Clow, Dsoft
signal
response failure: dropout degradation
desiredoptimalresponse
earliestdesired
response
earliestpossibleresponse
utilitycurve
WCET
Cexpected
contextswitch
overhead
Ropt
bufferedresponse
desiredresponse interval
Extended Deadline Monotonic Equations• 3 Basic Equations (sufficient but not necessary)
1) Clow and Chigh from distribution equation
2) EPA Deadline-monotonic admission test inequality given interference from current thread pool
3) Maximum Interference from current thread pool
See www-sgc.colorado.edu/people/siewerts for detailed example
• Termination deadline required for equations to work
• Pessimistic interference assumption (required for hard or mixed hard/soft real-time)– All interfering threads run to their termination deadline every
release
– Worst case interference
• Reliable interference assumption (for soft real-time only)– All interfering threads are assumed to run to high confidence Cexp
RT-EPA Interface• Pipeline task required inputs for admission
– Entry point function pointer; Fptr– Release source; ISR signal or interval timer RT POSIX signal– Expected release period; Texp– Expected periodic execution time; Cexp– Execution time model; <sample array> or <noraml dist >– Desired soft and hard termination deadlines; Dsoft and Dterm– Desired soft and hard deadline confidences; Conf-soft, Conf-hard– Output description and period; Dptr, size, Dest-addr, Tout
• Returns– Soft and hard deadline confidence (actual or maximum possible given
current thread pool)
• Monitors & Controls– Actual execution time– Actual release times– Missed soft and hard deadlines– Termination of threads at Dterm
RT-EPA Implementation and Evaluation
• Demonstration RT EPA Implemented as VxWorks Task– EPA spawns and controls tasks (internal or interrupt release)
– Provides message queue interface for service negotiation
– Modeled as hard real-time periodic itself
• RACE (Rail-guided, Air-powered, Control Experiment)– 2 68HC11 microcontrollers (navigation and propulsion), 3 PWM servos,
ultrasonic range finder, digital compass, and color CCD camera
• EPA Experiments– Continuous Media : Qcam CCD frame processing for range determination
(knowledge of range to 0.5 inches every second)
– Continuous Control : Ramp position keeping (Qcam range input, serial motor servo output), RACE yaw control (digital compass input, serial motor servo output)
• Expected Outcome– Demonstration of EPA Negotiation Interface for Multiple Active Pipelines (on-
line tradeoffs by application using EPA)
RACE RT-EPA Experiment Setup
RACE Vehicle Close-up
RACE Rail-guided Carriage
RACE Ramp Ascent
RACE Optical Target at Minimum Range
RACE Optical Target at Full Range
Summary
• Confidence-Based Scheduling (Extension of Deadline Montonic Equations) used for Hard-to-Soft RT execution control
• EPA Interface Between Applications and Kernel Thread Scheduler– Parametric Control of Kernel Threads through EPA (E.g. Terminated or
Allowed to Overrun Soft Deadline)
– Tradeoffs through EPA for Application with Multiple Pipelines (Lower Video Confidence for Higher Control Confidence)
• Previous Work on In-Kernel Pipelines– EPA/PCIP Extends In-Kernel Pipelines for Control, Service
Negotiation, and Confidence-Based Scheduling
– EPA Monitors Execution Time Models and Release Frequency For Changes (Confidence Re-estimation)