tradeoff analysis for dependable real-time embedded systems during the early design phases junhe gan

38
Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

Upload: sabrina-neal

Post on 25-Dec-2015

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases

Junhe Gan

Page 2: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

2Embedded Systems

Introduction: embedded systems

General Purpose Computer Systems

Page 3: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

3

Introduction: design metrics Unit cost: the monetary cost of manufacturing each copy of the system,

excluding NRE cost NRE cost (Non-Recurring Engineering cost): The one-time monetary cost of

designing the system Performance: the execution time or throughput of the system Predictability: the key property of any real-time system that the timing

requirements must be met. Power: the amount of power consumed by the system Robustness: the ability of a system to resist change without altering its

implementation Flexibility: the ability to change the functionality of the system without

incurring heavy NRE cost Dependability (reliability, safety, security, maintainability, and availability)

Challenge: simultaneously optimize competing design metrics

Page 4: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

4

Introduction: early design stages

Early design decisions have a high impact More effort should be spent during the early design phases

Challenge: uncertainties

Page 5: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

5

Introduction: system-level design

DSE

Page 6: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

6

Introduction: system models

ApplicationArchitecture WCETs

Scheduling Tasks are scheduled by fixed-priority preemptive scheduling, while

messages are transmitted using a fixed-priority nonpreemptive policy. We use response time analysis to calculate the worst-case response time ri

for each task, which is compared to its deadline Di . We use the degree of schedulability rS to measure which design alternative

is “more schedulable”.

Page 7: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

7

Introduction: system-level design tasks

Function-to-task allocation

Deciding how to decompose functional blocks into tasks

Mapping Deciding in which PE to place a task

Scheduling Deciding the execution order of the mapped tasks on the PE

Architectureselection

Determining the number, the type of conponents of the system platform

Voltage scaling Assigning the operating mode to execute the task

Page 8: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

8

Outline Introduction

Design for Robustness and Flexibility of Real-Time Distributed Applications during the Early Design Phases

Reliability-Aware Dynamic Energy Management for Fault-Tolerant Distributed Embedded Systems

Criticality-Aware Functionality Allocation for Distributed Real-Time Embedded Systems

Summary and contributions

Page 9: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

9

WCET modelling: uncertainties

ti

The uncertainty in the worst-case execution time (WCET) ci is due to lack of information

“Percentile method”50th percentile: 30 ms90th percentile: 60 ms

Details of the PE not fully known

Full implementation not yet available PE

Knowing the 50th and 90th percentiles, we can determine the cumulative distribution function of the WCET ci

Hard real-time applications

Jakob Axelsson. A method for evaluating uncertainties in the early development phases of embedded real-time systems. In Embedded and Real-Time Computing Systems and Applications, 2005.

Page 10: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

10

Functionality modeling: uncertaintiesChanges in requirementsNew version of a productEvolution of a product line

We capture the functionality as a set of tasks, baseline S0

S1 is a functionality update, replaces t1 with t5

S2 adds t6 to increase performance

S3 adds a new application, with tasks t7 and t8

S4 is a combination of S1 and S2

We capture the changes in functionality as scenarios

I. Bate and P. Emberson. Incorporating scenarios and heuristics to improve flexibility in real-time embedded systems. In Real-Time and Embedded Technology and Applications Symposium, 2006.

Page 11: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

11

Problem formulationGiven

Architecture model Baseline functionality S0

Set of future scenarios Si

Determine Mapping M0 of the tasks in S0 such that

the robustness and flexibility of M0 are maximized

Robustness the tasks in S0 have a high chance to be schedulable Flexibility M0 has a high chance to successfully accommodate Si

Notes This problem is especially relevant for system integrators Changing the mapping is costly, especially in areas such as safety-critical

Page 12: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

12

Motivational example: robustnessRobustness: the probability of all tasks being schedulable

Without capturing uncertainty in WCETs: M’ is preferred. Capturing uncertainty in WCETs: M has much higher chances (93%)

to be schedulable, compared to M’ (67%).

Page 13: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

13

Motivational example: flexibilityBaseline functionality

(×) Pareto-optimal solutionsExhaustive search (+) Straightforward Mapping,

SFMignores uncertainty in WCETsignores future scenarios

Future scenarios

Flexibility: the probability of all future scenarios being schedulable

Page 14: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

14

Multiobjective optimization

Cost function: multiple objectives

Two alternatives: Merge all design metrics into a single cost function by using a weighted

sum then use meta-heuristics such as Tabu Search Perform a multi-objective optimization approach such as Genetic

Algorithm, which determine a Pareto-front of solutions

Pareto-front (trade-off curve) Solutions are not dominated by each other

Page 15: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

15

Mapping for Robustness and Flexibility (MRF) Determining an optimal mapping is NP-hard

(Non-deterministic-Polynomial-time hard)

Genetic algorithm-based approach: MRF(Mapping for Robustness and Flexibility optimization) Non-dominated Sorting Genetic Algorithm-II

For each candidate solution Mk

We calculate the robustness We calculate the flexibility based on the robustness of each Mi

We have to know the mapping Mi of each future scenarios Si on top of Mk

We use a Greedy mapping approach to determine the Mk

Greedy mapping Mi of each future scenarios Si on top of Mk

Only the tasks which are not in S0 have to be mapped Greedy: tasks are sorted on utilization; mapped on the lowest utilized PE

Page 16: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

16

Experimental setupBaseline scenario

We have varied the size of the system from 22 tasks (S0) and 3 PEs to 84 tasks (S0) and 10 PEs 4 real-life case studies from Embedded System Synthesis Benchmark Suite 8 eight synthetic benchmarks generated using Task Graphs For Free

Future scenarios For each benchmark, we have four future scenarios

Implementation Matlab 2010 and run on an Intel Core i7 CPU 920 (2.67 GHz) NSGA-II parameters are tuned such that no improvements were seen

after a very long runtime

Page 17: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

17

Experimental results: real-life case studies

Conclusion: It is very important to model the uncertainties and to take them into account during design space exploration.

Page 18: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

18

Outline Introduction

Design for Robustness and Flexibility of Real-Time Distributed Applications during the Early Design Phases

Reliability-Aware Dynamic Energy Management for Fault-Tolerant Distributed Embedded Systems

Criticality-Aware Functionality Allocation for Distributed Real-Time Embedded Systems

Summary and contributions

Page 19: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

19

Architecture modelA set of heterogeneous processing elements interconnected by a

communication channel

Each processor element have a set of discrete operating modes

For each operating mode we knowj j jN N N

i i i(frequency:f , voltage:v , power dissipation: p )

1N 2N

bus

Page 20: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

20

Application modelA set of periodic tasksTransient faults are tolerated using task replication

Number of replicas ki (critical task: ki > 0, non-critical task: ki = 0)

Reliability goal Rg

The system should have a reliability greater than Rg, otherwise it is not fault-tolerant (more replicas would be needed).

Page 21: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

21

Energy/reliability trade-off model The fault rate increases exponentially when normalized voltage V

and the normalized frequency F decreases

The equation is adapted from: D. Zhu and H. Aydin, “Reliability-Aware Energy Management for Periodic Real-Time Tasks”, IEEE Transactions on Computers, 58(10), pp. 1382 - 1397, 2009.

00.2

0.40.6

0.81

0

0.5

10

0.2

0.4

0.6

0.8

1

x 10-4

Normalized Frequency: FNormalized Voltage: V

(F

,V)

Page 22: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

22

Problem formulationGiven:

Application and architecture models Reliability goal and corresponding number of replicas for each task

Determine offline: the mapping of each task to processing element the operating mode for executing each task

Such that: all tasks meet their timing requirements the application reliability meets the given reliability goal the energy consumption of the system is minimized

Page 23: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

23

Motivational exampleApplication and architecture

Initial solution: no voltage and frequency scaling Runs all the tasks in the maximum speed operating mode and

maps the tasks on the low power PEs.

The given reliability goal: which means that we accept at most a 10 times decrease in reliability.

0g sR =1- (1-R )=0.910 9996

Page 24: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

24

Motivational example: offlineEnergy minimization without concern for reliability

Energy/reliability trade-off optimization

Page 25: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

25

Optimization strategy: offline synthesisOptimization Problem

NP-hard (Non-deterministic-Polynomial-time hard) Minimize the cost function:

Use a Tabu search-based algorithm to explore the design space Iteratively explores neighborhood solutions by performing

mapping moves operating mode moves

( ) max(0, ) max(0, )S R g s r sCost S E W R R W r

Energy Reliability Schedulability

Page 26: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

26

Experimental Results: offline synthesis

s0s

1-Rθ = : how many times the prob. of failure increases

1-R

: optimization without concern for reliability: energy/reliability trade-off optim

MVFSizaMVFS tion

Conclusion: we are able to reduce the negative impact of energy minimization on reliability with very little decrease in energy savings

Page 27: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

27

Outline Introduction

Design for Robustness and Flexibility of Real-Time Distributed Applications during the Early Design Phases

Reliability-Aware Dynamic Energy Management for Fault-Tolerant Distributed Embedded Systems

Criticality-Aware Functionality Allocation for Distributed Real-Time Embedded Systems

Summary and contributions

Page 28: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

28

Function-to-task allocation Design-level: applications are modeled as functional blocks. Implementation-level: applications are modeled as a set of interacting tasks. Safety-Integrity Levels (SILs): are assigned to functional blocks/tasks to

capture the required level of risk reduction, from SIL 4 (most critical) to SIL 0 (non critical).

Development and certification costs increase dramatically with SILs. Trade off between cost and schedulability. SIL decomposition based on the coresponding certification standards.

ISO 26262

Page 29: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

29

Problem formulationGiven:

Application and architecture models The library of function-to-task decomposition The library of architecture implementations for the PEs

Determine an implementation: the function-to-task decomposition the mapping of tasks to PEs the types of PEs in the architecture

Such that: total costs are minimized the schedulability of the applications maximized the requirements of safety and integrity are satisfied

Page 30: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

30

Motivational example: decomposition library

Page 31: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

31

Motivational example: hardware component library

The unit cost increases with the increased reliability:use lowest cost PEs which provide required reliability

Page 32: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

32

Motivational example: SFS and optimized results

Straightforward Solution (SFS): Do not decompose the functional blocks into

tasks with lower SILs Cluster all tasks based on SILs for the mapping

Criticality-Aware Mapping Optimization (CMO): Optimize the mapping

Criticality-Aware Functional Decomposition and Mapping Optimization (CDMO):

Optimize the functional decomposition Optimize the mapping

Page 33: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

33

Optimization strategy

Optimization problem is NP-hard (Non-deterministic-Polynomial-time hard)

Genetic algorithm-based approach, called CDMO(Criticality-aware functional Decomposition and task Mapping Optimization) Non-dominated Sorting Genetic Algorithm-II

For each candidate implementation Si

We calculate the degree of schedulability We calculate the total cost that includes the unit cost of the PEs and the

development and certification costs of software tasks.

Page 34: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

34

Experimental results: real-life case study

Conclusion: By taking into account SIL decomposition, we are able to find schedulable solutions at a reduced cost.

Page 35: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

35

Outline Introduction

Design for Robustness and Flexibility of Real-Time Distributed Applications during the Early Design Phases

Reliability-Aware Dynamic Energy Management for Fault-Tolerant Distributed Embedded Systems

Criticality-Aware Functionality Allocation for Distributed Real-Time Embedded Systems

Summary and contributions

Page 36: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

36

Summary I addressed the architecture selection and the mapping of hard

real-time applications on distributed heterogeneous architectures. I modeled the uncertainties in WCETs, functionality requirements, and

hardware component costs, during the early design phases.

I addressed the mapping, voltage and frequency scaling for fault-tolerant hard real-time applications mapped on distributed embedded systems. I proposed both offline and online approaches that can take reliability into

account when performing voltage and frequency scaling.

I addressed the function-to-task allocation and task mapping of mixed-criticality applications on distributed architectures. I took into account safety and integrity requirements while performing

functional decomposition and architecture selection.

Page 37: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

37

Contributions I have addressed competing design metrics, and to support the

designer making early design decisions.

I have proposed methods to perform automatic design space exploration for design of embedded systems.

The implemented design space exploration tools are able to determine good quality solutions in a reasonable time.

Page 38: Tradeoff Analysis for Dependable Real-Time Embedded Systems during the Early Design Phases Junhe Gan

Thank You