Soft Real-Time Semi-Partitioned Scheduling with

Report
Soft Real-Time Semi-Partitioned
Scheduling with Restricted Migrations
on Uniform Heterogeneous
Multiprocessors
Kecheng Yang
James H. Anderson
Dept. of Computer Science
UNC-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.
This paper
• 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.
Ci
if Sp=2
Real-Time Tasks
Ci
if Sp=1
0
Ci
2
Ci
• 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.
time
Processor p is “fast enough” for task i if sp≥ui.
Conditions
a necessary condition for only executing
tasks on fast enough processors without
overutilizing them.
Feasibility



s1 = 3,
 ≤
=1
=1


 ≤
=1
Schedulability
s2 = 1;
u1 = 2, u2 = 2.

=1
for k = 1, 2, …, m

 ≤
=1

=1
 ≤
 >

 >
for k = 1, 2, …, m
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).
τ7=(1,3)
τ =(4,3)
4
τ=
Example
(1,2
(2,6)
65
τ =(3,1)
τ3=(5,3)
) 1
τ2=(11,6)
τi=(Ci,Ti): τ1=(3,1), τ2=(11,6), τ3=(5,3),
τ4=(4,3), τ5=(1,2), τ6=(2,6), τ7=(1,3).
Migrating task are assigned to
processors from fastest to slowest
100%
τ4=(4,3)
τ4=(4,3)
1
1
6
τ7=(1,3)
τ4=(4,3)
1
6
1
6
τ7 =
(1,3)
1
6
1
3
11
6
3
5
3
1
2
Fix a task when possible
0%
Processor
Capacity
Processor
Speed
s1 = 4
s2 = 2
s3 = 2
s4 = 1
Both tasks and processors are indexed decreasingly w.r.t
utilization or speed.
Key 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.
Example
100%
τ4=(4,3)
τ4=(4,3)
1
τ2=(11,6)
τ1=(3,1)
0%
Processor
Capacity
Processor
Speed
s1 = 4
3
s2 = 2
1
6
11
6
τ7=(1,3)
τ4=(4,3)
τ3=(5,3)
s3 = 2
1
6
1
6
τ7 =
(1,3)
1
6
τ6 =
(2,6)
1
3
τ5 =
(1,2
)
1
2
5
3
s4 = 1
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
shares of
a migrating
on each
If athe
migrating
task
has been task
assigned
oneprocessor,
half to
we
have a mechanism
to systematically
assign
processor
1 and one half
to processor 2,
thenthe
we jobs
just of
this task to those processors, maintaining the long-term
need to assign
all processor
the odd-indexed
jobs
processor 1
workload
on each
to match
itsto
corresponding
share.and all the even-indexed jobs to processor 2.
Example
For τ4, every 8 jobs,
6 → Processor 1,
the one-half-one-half case
1 → Processor 2,
1 → Processorwe
3.discussed in the prior slide
100%
τ4=(4,3)
τ4=(4,3)
1
τ2=(11,6)
τ1=(3,1)
0%
Processor
Capacity
Processor
Speed
s1 = 4
3
s2 = 2
1
6
11
6
τ7=(1,3)
τ4=(4,3)
τ3=(5,3)
s3 = 2
1
6
1
6
τ7 =
(1,3)
1
6
τ6 =
(2,6
)
1
3
τ5 =
(1,2)
1
2
5
3
s4 = 1
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.
The last processor of τ4.
HighPriority:
Priority τ7 >τ4 >fixed ones.
Example
100%
τ4=(4,3)
τ4=(4,3)
1
τ2=(11,6)
τ1=(3,1)
3
1
6
11
6
τ7=(1,3)
τ4=(4,3)
τ3=(5,3)
Low Priority
0%
Processor
Capacity
Processor
Speed
s1 = 4
s2 = 2
s3 = 2
1
6
1
6
τ7 =
(1,3)
1
6
τ6 =
(2,6
)
1
3
τ5 =
(1,2)
1
2
5
3
s4 = 1
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).
Example
a bound for
τ7, τ7,
τ4 First,
sharescompute
its last processor
with
since
not
its to
lastcompute
processor.
so it
wedoes
need
τ7’sshare
bound
τ4 ’s.
100%
τ4=(4,3)
τ4=(4,3)
1
τ2=(11,6)
τ1=(3,1)
0%
Processor
Capacity
Processor
Speed
3
1
6
11
6
τ7=(1,3)
τ4=(4,3)
τ3=(5,3)
1
6
1
6
s2 = 2
s3 = 2
1
6
τ6 =
(2,6)
1
3
τ5 =
(1,2)
1
2
5
3
Finally, we compute the bounds for fixed tasks
by the already computed bounds for τ4 and
τ7.
s1 = 4
τ7 =
(1,3
)
s4 = 1
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
faster processor
highest priority
Example
faster processorslower processor
highest priority
may not be the highest priority
100%
τ4=(4,3)
τ4=(4,3)
1
τ2=(11,6)
τ1=(3,1)
0%
Processor
Capacity
3
1
6
4
3
11
6
τ7=(1,3)
τ4=(4,3)
τ4=(4,3)
τ3=(5,3)
slower processor
may not be the highest priority
Processor
Speed
s1 = 4
s2 = 2
1
6
1
6
s3 = 2
5
3
τ7 =
(1,3)
1
6
τ6 =
(2,6)
1
3
τ5 =
(1,2
)
1
2
s4 = 1
Schedulability
total speed

=1 =36
Tardiness Bounds
Multiples of
periods
total speed

=1 =36
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
the percentage
of randomly
generated
feasible task sets
that satisfied our
proposed
schedulability
conditions
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}
all the
platforms in
evaluation
were set of
total speed

=1 =36
Tardiness Bounds
Two different platform settings.
π1={6,6,6,6,3,3,3,3}
π2={8,8,4,4,4,4,3,3}
The ratio of the
tardiness
bounds and
corresponding
tasks’ periods
all the
platforms in
evaluation
were set of
total speed

=1 =36

similar documents