Upload
martin-barnett
View
217
Download
4
Embed Size (px)
Citation preview
Soft Real-Time Semi-Partitioned Scheduling with Restricted
Migrations on Uniform Heterogeneous Multiprocessors
Kecheng YangJames H. Anderson
Dept. of Computer ScienceUNC-Chapel Hill
Motivation
•Soft real-time (SRT) semi-partitioned scheduling algorithms with restricted migrations have been previously proposed for homogeneous multiprocessors.
•Heterogeneous multiprocessors are emerging. E.g., the big.LITTLE technology from ARM.
image source: http://www.arm.com/Big.Little_New.gif
Contributions
•EDF-sh ( semi-partitioned scheduling for heterogeneous multiprocessors) is the first SRT scheduling algorithm with restricted migrations for heterogeneous multiprocessors.
•Develop a schedulability condition.• Improve the task assignment strategy.•Derive tardiness bounds.• Evaluate the schedulability and tardiness bounds.
Multiprocessor Platforms Categories• Identical: All processors of speed 1.0.
•Uniform Heterogeneous: Processor p has speed sp.
•Unrelated Heterogeneous: Task i executes with speed sp,i on processor p.
We assume there are m processors indexed by speed, i.e., s1 ≥ s2 ≥ … ≥ sm.
This paper
Real-Time Tasks
•Task model: sporadic tasks with implicit deadlines.• Task i is specified by (Ci, Ti), where • Ci is defined by its worst-cast execution time (WCET) on a
unit-speed processor (i.e., if it entirely executes on processors p, its WCET would be Ci/sp), • and Ti is it period. • Its utilization is defined as ui = Ci/Ti, which can be greater
than 1 if there is a processor with a speed greater than 1.•Also, we assume there are n tasks indexed by
utilization, i.e., u1 ≥ u2 ≥ … ≥ un.
Ci
Ci
0 Ci
timeC i2
if Sp=2
if Sp=1
Conditions
Feasibility Schedulability
∑𝑖=1
𝑛
𝑢𝑖≤∑𝑖=1
𝑚
𝑠𝑚 ∑𝑖=1
𝑛
𝑢𝑖≤∑𝑖=1
𝑚
𝑠𝑚
∑𝑖=1
𝑘
𝑢𝑘≤∑𝑖=1
𝑘
𝑠𝑘 ∑𝑢𝑖>𝑠 𝑘
𝑢𝑖≤ ∑𝑠𝑝>𝑠 𝑘
𝑠𝑝
for k = 1, 2, …, m for k = 1, 2, …, m
Processor p is “fast enough” for task i if sp≥ui.
a necessary condition for only executing tasks on fast enough processors without overutilizing them.
s1 = 3, s2 = 1;u1 = 2, u2 = 2.
Semi-Partitioned Scheduling• In semi-partitioned scheduling,
most tasks are partitioned, or fixed, onto processors, but those tasks that cannot be feasibly partitioned are allowed to migrate.
•Our algorithm EDF-sh is such a semi-partitioned scheduling algorithm.
EDF-sh
•EDF-sh has two phases, an assignment phase and an execution phase.
•Assignment phase:• Consider tasks from heaviest to lightest.• If the considered task can be fixed then fix it (fixed task).• Otherwise allocate shares on processors from fastest to
slowest to match its utilization (migrating task).
τ4=(4,3)
100%
Exampleτ1=(3,1)
τ2=(11,6)τ3=(5,3)
τ5=(1,2
)
τ7=(1,3)τ4=(4,3) τ7=(1,3
)
12
16
16
533
s1 = 4Processor Capacity
Processor Speed
0%
s2 = 2 s3 = 2 s4 = 1
τ4=(4,3) 16
1
116
τ6=(2,6
)
16
13
Both tasks and processors are indexed decreasingly w.r.t utilization or speed.
Fix a task when possible
Migrating task are assigned to processors from fastest to slowest
τ4=(4,3)τ7=(1,3)τi=(Ci,Ti): τ1=(3,1), τ2=(11,6), τ3=(5,3), τ4=(4,3), τ5=(1,2), τ6=(2,6), τ7=(1,3).
τ1=(3,1)τ2=(11,6) τ3=(5,3)
τ5=(1,2
)
τ4=(4,3)τ7=(1,3)τ4=(4,3) τ7=
(1,3)
12
16
16
533
s1 = 4Processor Capacity
Processor Speed
100%
0%
s2 = 2 s3 = 2 s4 = 1
τ4=(4,3) 16
1
116
τ6=(2,6
)
16
13
ExampleKey properties for the assignment:1. On any single processor, there are at most two migrating tasks.2. A task will not assign a share to a not-fast-enough processor.
Processor p is “fast enough” for task i if sp≥ui.
Restricted Migrations
•Fixed tasks do not migrate.
•Migrating tasks do migrate, but the migrations can only happen on job boundaries.•We assign jobs to processors.
I.e., a migrating task can migrate among processors;however, a single job can only execute on the processor it was assigned to.• Given the shares of a migrating task on each processor, we
have a mechanism to systematically assign the jobs of this task to those processors, maintaining the long-term workload on each processor to match its corresponding share.
If a migrating task has been assigned one half to processor 1 and one half to processor 2, then we just need to assign all the odd-indexed jobs to processor 1
and all the even-indexed jobs to processor 2.
τ1=(3,1)τ2=(11,6) τ3=(5,3)
τ5=(1,2
)
τ4=(4,3)τ7=(1,3)τ4=(4,3) τ7=
(1,3)
12
16
16
533
s1 = 4Processor Capacity
Processor Speed
100%
0%
s2 = 2 s3 = 2 s4 = 1
τ4=(4,3) 16
1
116
τ6=(2,6
)
16
13
Example the one-half-one-half case we discussed in the prior slide
For τ4, every 8 jobs, 6 → Processor 1, 1 → Processor 2,1 → Processor 3.
EDF-sh
•Execution phase:•Migrating tasks are statically prioritized over fixed tasks.
• Fixed tasks are prioritized against each other on by EDF.
• On a migrating task's last processor (the highest-indexed processor that has non-zero share of this migrating task), its priority is lower than the other migrating task, but still higher than fixed ones.
τ1=(3,1)τ2=(11,6) τ3=(5,3)
τ5=(1,2
)
τ4=(4,3)τ7=(1,3)τ4=(4,3) τ7=
(1,3)
12
16
16
533
s1 = 4Processor Capacity
Processor Speed
100%
0%
s2 = 2 s3 = 2 s4 = 1
τ4=(4,3) 16
1
116
τ6=(2,6
)
16
13
Example High PriorityThe last processor of τ4.
Priority: τ7 >τ4 >fixed ones.
Low Priority
Tardiness Bounds
•The tardiness bounds are computed inductively. The order is as follows.•Migrating task(s) that do not share their last processor
with other migrating tasks. (base case)•Migrating task(s), if on their last processor, the bound for
the other migrating task has already been computed. (inductively)• Fixed task(s).
τ1=(3,1)τ2=(11,6) τ3=(5,3)
τ5=(1,2
)
τ4=(4,3)τ7=(1,3)τ4=(4,3) τ7=
(1,3)
12
16
16
533
s1 = 4Processor Capacity
Processor Speed
100%
0%
s2 = 2 s3 = 2 s4 = 1
τ4=(4,3) 16
1
116
τ6=(2,6
)
16
13
ExampleFirst, compute a bound for τ7, since it does not share its last
processor.
Finally, we compute the bounds for fixed tasks by the already computed bounds for τ4 and
τ7.
τ4 shares its last processor with τ7, so we need τ7’s bound to compute τ4
’s.
Proof
•Key idea: introduce a hypothetical situation.• Tardiness in the hypothetical situation upper bounds
that in the real situation.• Derive a upper bound on the tardiness for the
hypothetical situation.
Real Situation ≤ Hypothetical Situation ≤ Bounds
τ1=(3,1)τ2=(11,6) τ3=(5,3)
τ5=(1,2
)
τ7=(1,3) τ7=(1,3
)
12
16
16
533
s1 = 4Processor Capacity
Processor Speed
100%
0%
s2 = 2 s3 = 2 s4 = 1
τ4=(4,3) 16
1
116
τ6=(2,6
)
16
13
Example
τ4=(4,3)43
τ4=(4,3)τ4=(4,3)
τ4=(4,3)
faster processorhighest priority
slower processormay not be the highest priority
faster processorhighest priority
slower processormay not be the highest priority
Schedulability
total speed =36
Tardiness Bounds
total speed =36
Multiples of periods
Future Works
•Eliminate the utilization constraints to develop an optimal scheduling algorithm for uniform heterogeneous multiprocessors.
• Implement the schedulers on real heterogeneous hardware.
•Consider CPU frequency scaling, where an identical multiprocessor may function as a heterogeneous multiprocessor.
Thank you!Questions?
Schedulability
all the platforms in evaluation were set of total speed
=36
Four different platform settings.π1={6,6,6,6,3,3,3,3}π2={8,8,4,4,4,4,3,3}π3={8,7,6,5,4,3,2,1}
π4={15,3,3,3,3,3,3,3}
the percentage of randomly generated
feasible task sets that satisfied our
proposed schedulability
conditions
Tardiness Bounds
all the platforms in evaluation were set of total speed
=36
The ratio of the tardiness
bounds and corresponding tasks’ periods
Two different platform settings.π1={6,6,6,6,3,3,3,3}π2={8,8,4,4,4,4,3,3}