130 likes | 329 Views
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
E N D
6. Application mapping 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 • A target architecture (if not fixed) • Objectives: • Keeping deadlines and/or maximizing performance, as well as • Minimizing cost, energy consumption, and possibly other objectives. • The application mapping problem is a very difficult one and currently only approximated for an automated mapping are available. • Standard scheduling techniques, • Hardware/software partitioning, and • Advanced techniques for mapping sets of applications onto multi-processor systems. 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 6. Application Mapping hard deadlines soft deadlines periodic aperiodic preemptive Non-preemptive preemptive Non-preemptive static dynamic static dynamic static dynamic static dynamic
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 EarliestDue 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. di Availability of Task ci li 6. Application Mapping t
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 arrival of tasks. 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 computations of the laxity. 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. 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 after 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. 6. Application Mapping
The determinant det(A) of this matrix can be computed as • ASAP schedule for the example of det(A) e i a f h b g d c =1 6. Application Mapping - - - =3 =4 + =6 + =7
li 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, • cibe the execution time of Ti, • dibe the deadline interval, that is, the time between Tibecoming available and the time until which Tihas to finish execution. • libe the laxity or slack,defined asli= di- ci • fibe the finishing time. • Let denote the utilization for a set of n processes, that is, the accumulated execution times of these processes divided by their period: 6. Application Mapping pi i di ci t
Necessary condition for schedulability (with m=number of processors): • 6.2.4.2 Rate monotonic scheduling • RM policy: The priority of a task is a monotonically decreasing function of its period. • At any time, a highest priority task among all those that are ready for execution is allocated. 6. Application Mapping • T1 preempts T2 and T3. • T2 and T3 do not preempt each other.
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. 6. Application Mapping