# multiprocessor scheduling i: partitioned scheduling ?· multiprocessor scheduling i: partitioned...

Post on 24-Jul-2018

216 views

Embed Size (px)

TRANSCRIPT

Multiprocessor Scheduling I:Partitioned Scheduling

Prof. Dr. Jian-Jia Chen

LS 12, TU Dortmund

11 July 201717 July 2017

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 1 / 40

Outline

Introduction to Multiprocessor Scheduling

Partitioned Scheduling for Implicit-Deadline EDF Scheduling

Partitioned Scheduling for Implicit-Deadline RM Scheduling

Partitioned Scheduling for Constrained-Deadline DMScheduling

Partitioned Scheduling for Arbitrary-Deadline EDF Scheduling

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 2 / 40

Multiprocessor Models

Identical (Homogeneous): All the processors have the samecharacteristics, i.e., the execution time of a job is independent onthe processor it is executed.

Uniform: Each processor has its own speed, i.e., the execution timeof a job on a processor is proportional to the speed of the processor.

A faster processor always executes a job faster than slowprocessors do.

For example, multiprocessors with the same instruction set butwith different supply voltages/frequencies.

Unrelated (Heterogeneous): Each job has its own execution time ona specified processor

A job might be executed faster on a processor, but other jobsmight be slower on that processor.

For example, multiprocessors with different instruction sets.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 3 / 40

Scheduling Models

Partitioned Scheduling: Each task is assigned on a dedicated processor. Schedulability is done individually on each processor. It requires no additional on-line overhead.

Global Scheduling: A job may execute on any processor. The system maintains a global ready queue. Execute the M highest-priority jobs in the ready queue, where

M is the number of processors. It requires high on-line overhead.

Semi-Partitioned Scheduling: Adopt task partitioning first and reserve time slots

(bandwidths) for tasks that allow migration. It requires some on-line overhead.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 4 / 40

Course Material

Ronald L. Graham: Bounds for certain multiprocessing anomalies.in Bell System Technical Journal (1966).

Ronald L. Graham: Bounds on Multiprocessing Timing Anomalies.SIAM Journal of Applied Mathematics 17(2): 416-429 (1969)

Dorit S. Hochbaum, David B. Shmoys: Using dual approximationalgorithms for scheduling problems theoretical and practical results.J. ACM 34(1): 144-162 (1987) (in textbook ApproximationAlgorithms by Vijay Vazirani, Chapter 10, not covered)

Sanjoy K. Baruah, Nathan Fisher: The Partitioned MultiprocessorScheduling of Sporadic Task Systems. RTSS 2005: 321-329

Jian-Jia Chen: Partitioned Multiprocessor Fixed-Priority Schedulingof Sporadic Real-Time Tasks. ECRTS 2016.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 5 / 40

Problem Definition

Partitioned Scheduling

Given a set T of tasks with implicit deadlines, i.e., i T,Ti = Di , the objective is to decide a feasible task assignment ontoM processors such that all the tasks meet their timing constraints,where Cim is the execution time of task i on processor m.

For identical multiprocessors: Ci = Ci1 = Ci2 = = CiM . For uniform multiprocessors: each processor m has a speedsm, in which Cimsm is a constant.

For unrelated multiprocessors: Cim is an independentparameter.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 6 / 40

Hardness and Approximation of Partitioned Scheduling

NP-completeDeciding whether there exists a feasible task assignment isNP-complete in the strong sense.

Proof

Reduced from the 3-Partition problem.

Approximations are possible, but what do we approximatewhen only binary decisions (Yes or No) have to be made? Deadline relaxation: requires modifications of task specification Period relaxation: requires modifications of task specification Resource augmentation by speeding up: requires a faster

platform Resource augmentation by allocating more processors: requires

a better platform

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 7 / 40

Hardness and Approximation of Partitioned Scheduling

NP-completeDeciding whether there exists a feasible task assignment isNP-complete in the strong sense.

Proof

Reduced from the 3-Partition problem.

Approximations are possible, but what do we approximatewhen only binary decisions (Yes or No) have to be made? Deadline relaxation: requires modifications of task specification Period relaxation: requires modifications of task specification Resource augmentation by speeding up: requires a faster

platform Resource augmentation by allocating more processors: requires

a better platform

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 7 / 40

Approximation Algorithms

An algorithm A is called an -approximation algorithm (for aminimization problem) if it guarantees to derive a feasible solutionfor any input instance I with at most times of the objectivefunction of an optimal solution. That is,

A(I ) OPT (I ),

where OPT (I ) is the objective function of an optimal solution.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 8 / 40

Terminologies Used in Scheduling Theory

Grahams Scheduling Algorithm Classification

Classification: a|b|c a: machine environment

(e.g., uniprocessor, multiprocessor, distributed, . . .) b: task and resource characteristics

(e.g., preemptive, independent, synchronous, . . .) c : performance metric and objectives

(e.g., Lmax, sum of finish times, . . .)

Makespan problem: M||Cmax The course material mainly comes from the traditional

makespan scheduling in the context of minimizing themaximum utilization. (The paper by Baruah and Fisher inRTSS 2005 is an exception.)

Imagine that the goal is to minimize the maximum utilizationafter task partitioning.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 9 / 40

Bin Packing Problem

Given a bin size b, and a set of items with individual sizes, theobjective is to assign each item to a bin without violating thebin size constraint such that the number of allocated bins isminimized.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 10 / 40

Outline

Introduction to Multiprocessor Scheduling

Partitioned Scheduling for Implicit-Deadline EDF Scheduling

Partitioned Scheduling for Implicit-Deadline RM Scheduling

Partitioned Scheduling for Constrained-Deadline DMScheduling

Partitioned Scheduling for Arbitrary-Deadline EDF Scheduling

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 11 / 40

Largest-Utilization-First (LUF) - for EDF Scheduling

Input: T,M;1: re-index (sort) tasks such that CiTi

CjTj

for i < j ;

2: Tm ,Um 0,m = 1, 2, . . . ,M;3: for i = 1 to N, where N = |T| do4: find m with the minimum utilization, i.e., Um = minmM Um;5: if Um +

CiTi> 1 then

6: return The task assignment fails;7: else8: assign task i onto processor m

, whereUm Um + CiTi ,Tm Tm {i};

9: return feasible task assignment T1,T2, . . . ,TM ;

Properties

The time complexity is O((N + M) log(N + M))

If a solution is derived, the task assignment is feasible by using EDF.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 12 / 40

Largest-Utilization-First (LUF) - for EDF Scheduling

Input: T,M;1: re-index (sort) tasks such that CiTi

CjTj

for i < j ;

2: Tm ,Um 0,m = 1, 2, . . . ,M;3: for i = 1 to N, where N = |T| do4: find m with the minimum utilization, i.e., Um = minmM Um;5: if Um +

CiTi> 1 then

6: return The task assignment fails;7: else8: assign task i onto processor m

, whereUm Um + CiTi ,Tm Tm {i};

9: return feasible task assignment T1,T2, . . . ,TM ;

Properties

The time complexity is O((N + M) log(N + M))

If a solution is derived, the task assignment is feasible by using EDF.

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 12 / 40

Algorithm LUF

1

0.5

2

0.45

3

0.37

4

0.3

5

0.2

6

0.2

7

0.15

8

0.1

(0, 0, 0) (.5, 0, 0) (.5, .45, 0) (.5, .45, .37) (.5, .45, .67) (.5, .65, .67) (.7, .65, .67) (.7, .8, .67)

P1 P2 P3

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 13 / 40

Algorithm LUF

1

0.5

2

0.45

3

0.37

4

0.3

5

0.2

6

0.2

7

0.15

8

0.1

(0, 0, 0)

(.5, 0, 0) (.5, .45, 0) (.5, .45, .37) (.5, .45, .67) (.5, .65, .67) (.7, .65, .67) (.7, .8, .67)

P1 P2 P3

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 13 / 40

Algorithm LUF

1

0.5

2

0.45

3

0.37

4

0.3

5

0.2

6

0.2

7

0.15

8

0.1

(0, 0, 0)

(.5, 0, 0)

(.5, .45, 0) (.5, .45, .37) (.5, .45, .67) (.5, .65, .67) (.7, .65, .67) (.7, .8, .67)

P1

1

P2 P3

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 13 / 40

Algorithm LUF

1

0.5

2

0.45

3

0.37

4

0.3

5

0.2

6

0.2

7

0.15

8

0.1

(0, 0, 0) (.5, 0, 0)

(.5, .45, 0)

(.5, .45, .37) (.5, .45, .67) (.5, .65, .67) (.7, .65, .67) (.7, .8, .67)

P1

1

P2

2

P3

Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 13 / 40

Algorithm LUF

1

0.5

2

0.45

3

0.37

4

0.3

5

0.2

6

0.2

7

0.15

8

0.1

(0

Recommended