130 likes | 271 Views
An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems. Shengyan Hong. Delay Variation. What is delay variation? Difference between the max delay and the min delay of a real-time task. WCRT i (BCRT i ): the worst (best) case response time of the task i.
E N D
An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems Shengyan Hong
Delay Variation • What is delay variation? • Difference between the max delay and the min delay of a real-time task • WCRTi (BCRTi): the worst (best) case response time of the task i
Delay Variation • Why interested in reducing delay variation? • It degrades control system performance • Sources of delay variations • Task preemptions • Variations in task workload • Perturbations in physical environment • A 3DOF helicopter containing 4 periodic tasks • Position tasks: elevation, pitch and travel • Speed task
Task Model • Original Task Model (Ci, Di, Pi) • Ci: task execution time, Di: task deadline, Pi: task period • IMF Task Model • Initial, Mandatory and Final subtasks • ADVR Task Model • Assume Cif=Cii • Final subtask (Cif, Difnew, Pifnew=Pi/Mi) • Mandatory subtask (Cimnew, Dimnew, Pi) • Maximize Mi as much as possible
Problem Formulation • Minimize delay variations of final subtasks • Dif: the deadline of the final subtask of task i, Cif: the execution time of the final subtask of task i • (Dif-Cif): the upper bound of delay variation • N: task number of the task set • Wi: a weighting factor that reflects the criticality of task i • Such that • task set is schedulable under EDF, and • subtask execution dependencies are observed
ADVR Heuristic • Search an initial solution with optimal model transformation • Split original task period • Repeatedly search for a better solution based on the previous solution • Find smaller deadlines of final subtasks • Update the deadlines of mandatory subtasks • If ADVR has not converged, return to the previous step • Achieve fast convergence • Time complexity is pseudo polynomial
What is S.Ha.R.K.? • S.Ha.R.K. is an Open Source Real-time Kernel • It Supports: • Provide primitives to create, activate and run real-time tasks using scheduling algorithms. • Share data among tasks using resource reservation algorithms • Device drivers for most common hardware • ADVR implemented in S.Ha.R.K. • Task model modification • Scheduler internal data structure and algorithm modification • Application modification
Solutions Found • Experimental Evaluation: • Compare ADVR with TBB, DRB • Part 1: tested on 9000 randomly generated task sets • Part 2: a case study of adaptive delay variation reduction • 9000 randomly generated task sets each consisting of 5 tasks • Utilization: fraction of time that the processor is working • ADVR performs best • ADVR founds the solutions of all the task sets
Total Average Delay Variation • ADVR performs best • Difference between ADVR and the other methods increases with the increasing of utilization levels
Average Execution Time • ADVR and DRB have comparable execution speed • DRV is a greedy algorithm, whose convergence is fast
Iteration Number of ADVR • ADVR is suitable for on-line use • ADVR finds an optimal solution for most of task sets within 50 iterations
Case Study: 3DOF Helicopter • Implemented in S.Ha.R.K. • Compare results by ADVR with original Delay Variations, and those by TBB and DRB • The smaller DV, the better the method is. • When workload changes, see which method can adapt to it.