an on-line approach to reduce delay variations on real-time operating systems

13
An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems Shengyan Hong

Upload: iram

Post on 21-Jan-2016

25 views

Category:

Documents


4 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

Shengyan Hong

Page 2: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

Delay Variation

What is delay variation? Difference between the max delay and the min delay of

a real-time task

i i iDV WCRT BCRT WCRTi (BCRTi): the worst (best) case response time o

f the task i

Ci

Pi Pi Pi Pi

Ci Ci Ci

BCRTi WCRTi

Page 3: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

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

Page 4: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

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

Cii

Pi

Cif

Cimnew

Pi/Mi

(b) ADVR Task Model

(Mi-2) Cim’

Cii

Pi

CifCim

(a) IMF Task Model

Page 5: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

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

2

1

( )N

i if ifi

W D C

Page 6: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

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

Page 7: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

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 modificati

on Application modification

task task

ADVR Application

Generic Kernel

ADVR ModelADVR Model

ADVR Scheduling Module

Internal Data Structures

Scheduling Algorithm

Deadline Assignment

Page 8: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

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

0102030405060708090

100

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Utilization Level

Solu

tion

s F

ound

(%)

DRB TBB ADVR

Page 9: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

Total Average Delay Variation

0

10

20

30

40

50

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Utilization Level

Tot

al A

vera

geD

elay

Var

iati

on (%

)

Original DRB TBB ADVR

ADVR performs best Difference between ADVR and the other methods

increases with the increasing of utilization levels

Page 10: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

Average Execution Time

ADVR and DRB have comparable execution speed DRV is a greedy algorithm, whose convergence is fast

Page 11: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

Iteration Number of ADVR

Util.

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Avg.

13 12 12 14 20 16 19 23 32

Max

41 29 25 70 87 94 80 83 121 ADVR is suitable for on-line use

ADVR finds an optimal solution for most of task sets within 50 iterations

Page 12: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

Case Study: 3DOF Helicopter

Implemented in S.Ha.R.K. Compare results by ADVR with original Delay Variatio

ns, and those by TBB and DRB The smaller DV, the better the method is.

When workload changes, see which method can adapt to it.

Task Name

Decomp. Exec. Time

Deadline Period

Speed Yes 5000 27000 27000

Elevation Yes 8000 30000 32000

Pitch No 10000 45000 500000

Travel No 13000 60000 70000Task Name

Delay Variations of Orig/DRB/TBB/ADVR

Speed 33.33/41.48/Fail/ 2.96

Elevation 28.13/31.25/Fail/ 0.08

Pitch 4.40/ 3.40/Fail/06.28

Travel 48.57/32.86/Fail/15.57

Task Name

Delay Variations of Orig/DRB/TBB/ADVR

Speed 33.33/41.48/Fail/ 2.96

Elevation 28.13/31.25/Fail/ 0.08

Pitch 44.00/34.00/Fail/62.80

Travel 48.57/32.86/Fail/15.57

Task Name

Delay Variations of Orig/DRB/TBB/ADVR

Speed 33.33/41.48/Fail/ 7.7

Elevation 28.13/31.25/Fail/ 0.87

Pitch 44.00/34.00/Fail/22.09

Travel 48.57/32.86/Fail/39.86

Task Name

Decomp. Exec. Time

Deadline Period

Speed Yes 5000 27000 27000

Elevation Yes 8000 30000 32000

Pitch No 10000 45000 50000

Travel No 13000 60000 70000

Page 13: An On-line Approach to Reduce Delay Variations on Real-Time Operating Systems

Questions?