6. application mapping

12
6. APPLICATION MAPPING 6.1 Problem definition 6.2 Scheduling in real-time systems 6.3 Hardware/software partitioning 6.4 Mapping to heterogeneous multi-processors 1 6 . A p p l i c a t i o n M a p p i n g

Upload: muncel

Post on 24-Feb-2016

54 views

Category:

Documents


0 download

DESCRIPTION

6. Application mapping. 6.1 Problem definition 6.2 Scheduling in real-time systems 6.3 Hardware/software partitioning 6.4 Mapping to heterogeneous multi-processors. 6.1 Problem definition. Find: A mapping of applications to processors, Appropriate scheduling techniques (if not fixed), and - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 6.  Application mapping

6. Application Mapping

1

6. APPLICATION MAPPING

6.1 Problem definition6.2 Scheduling in real-time systems6.3 Hardware/software partitioning6.4 Mapping to heterogeneous multi-processors

Page 2: 6.  Application mapping

2

6. Application Mapping

6.1 PROBLEM DEFINITION Find:

A mapping of applications to processors, Appropriate scheduling techniques (if not fixed), and A target architecture (if not fixed)

Objectives: Keeping deadlines and/or maximizing performance, as well

as Minimizing cost, energy consumption, and possibly other ob-

jectives. The application mapping problem is a very difficult one

and currently only approximated for an automated map-ping are available. Standard scheduling techniques, Hardware/software partitioning, and Advanced techniques for mapping sets of applications onto

multi-processor systems.

Page 3: 6.  Application mapping

3

6. Application Mapping

6.2 SCHEDULING IN REAL-TIME SYSTEMS Scheduling is one of the key issues in implementing embedded systems. Scheduling defines start times for each task and therefore defines a

mapping from nodes of a task graph G=(V, E) to time domain Dt:

: V Dt (6.1)

6.2.1 Classification of scheduling algorithms Classes of scheduling algorithms

real-time scheduling

hard deadlines soft deadlines

periodic aperiodic

preemptive Non-preemptive preemptive Non-preemptive

static dynamic static dynamic static dynamic static dynamic

Page 4: 6.  Application mapping

4

6. Application Mapping

6.2.2 Aperiodic scheduling without precedence constraints

6.2.2.1 Definitions {Ti}, a set of tasks

ci be the execution time of Ti, di be the deadline-interval, li be the laxity or slack, defined as

6.2.2.2 Earliest Due Date (EDD) – Algorithm Jackson’s rule:

Given a set of a independent tasks, any algorithm that executes the tasks in order of non-decreasing deadlines is optimal with respect to minimizing the maximum lateness.

(6.2)i i il d c

Availability of Task

di

ci lit

Page 5: 6.  Application mapping

5

6. Application Mapping

6.2.2.3 Earliest Deadline First (EDF) – Algorithm The Earliest Deadline First (EDF) algorithm is optimal with respect to minimizing the

maximum lateness. Given a set of n independent tasks with arbitrary arrival times, any algorithm that at any

instant executes the task with the earliest absolute deadline among all the ready tasks is optimal with respect to minimizing the maximum lateness.

EDF is a dynamic scheduling algorithm. Fig. 6.6 shows a schedule derived with the EDF algorithm. Vertical arrows indicate the ar-

rival of tasks.

Page 6: 6.  Application mapping

6

6. Application Mapping

6.2.2.4 Least Laxity (LL) algorithm Priorities = decreasing function of the laxity

(lower laxity higher priority); changing priority; preemptive. Fig. 6.6 shows an example of an LL schedule, together with the compu-

tations of the laxity.

Page 7: 6.  Application mapping

7

6. Application Mapping

6.2.2.5 Scheduling without preemption• T1: periodic, c1 = 2, p1 = 4, d1 = 4• T2: occasionally available at times 4*n+1, c2= 1, d2= 1• T1 has to start at t =0

deadline missed, but schedule is possible (start T2 first) scheduler is not optimal contradiction! q.e.d.

Page 8: 6.  Application mapping

8

6. Application Mapping

6.2.3 Aperiodic scheduling with precedence constraints

6.2.3.1 Latest Deadline First (LDF) algorithm In a task graph reflecting tasks dependences (Fig. 6.11). Task T3 can be executed only af-

ter tasks T1 and T2 have completed and sent message to T1.

6.2.3.2 As-soon-as-possible (ASAP) scheduling Consider a 33 matrix.

a b cA d e f

g h i

Page 9: 6.  Application mapping

9

6. Application Mapping

The determinant det(A) of this matrix can be computed as

ASAP schedule for the example of det(A)

det( ) ( ) ( ) ( )A a e i f h b f g d i c d h e g

e i a f h b g d c

- - -

+

+

=1

=3

=4

=6

=7

Page 10: 6.  Application mapping

10

6.2.4 Periodic scheduling without precedence constraints

6.2.4.1 Notation Let {Ti } be a set of tasks. Let:

pi be the period of task Ti, ci be the execution time of Ti , di be the deadline interval, that is,

the time between Ti becoming available and the time until which Ti has to finish execution.

li be the laxity or slack, defined as li = di - ci

fi be the finishing time.

Let denote the utilization for a set of n processes, that is, the accumulated ex-ecution times of these processes divided by their period:

6. Application Mapping

li

pi

ci

di

ti

1

ni

i i

cp

Page 11: 6.  Application mapping

11

6. Application Mapping

m• Necessary condition for schedulability (with m=number of pro-

cessors):

6.2.4.2 Rate monotonic scheduling• RM policy: The priority of a task is a monotonically decreasing function of its pe-

riod.• At any time, a highest priority task among all those that are ready for execution is

allocated.

T1 preempts T2 and T3.T2 and T3 do not preempt each other.

Page 12: 6.  Application mapping

12

6. Application Mapping

6.2.4.3 Earliest deadline first scheduling EDF can also be applied to periodic scheduling. EDF optimal for every hyper-period

(= least common multiple of all periods) Optimal for periodic scheduling EDF must be able to schedule the example in which RMS failed.

At time 5, T2 not preempted, due to its earlier deadline.