170 likes | 233 Views
Develops a polynomial-time pfair schedulability test for periodic tasks over multiple processors with allocation constraints. Includes an approximate scheduling algorithm for fixed tasks, ensuring proportionate fairness and steady task progress. Theoretical proof and graph construction technique applied to illustrate the scheduling problem. Demonstrates the on-line approximate pfair scheduling challenge and hierarchical pfair algorithm for global and local scheduling. Explores uniprocessor pfair scheduling to ensure efficient task handling.
E N D
Pfair Scheduling of Periodic Tasks with Allocation Constraints on Multiple Processors Deming Liu and Yann-Hang Lee Computer Science & Engineering, ASU
Contributions • Give a polynomial-time pfair schedulability test of periodic tasks over multiple processors with arbitrary allocation constraints • Propose an approximate scheduling algorithm for fixed tasks Computer Science & Engineering, ASU
Basics of Proportionate Fairness (pfair) • n periodic tasks to be scheduled over m identical processors • Task constraint – at any time, no task can run on more than one processor • All input parameters of any task x are integers • Period px, execution time ex, release time etc. • Pfair (proportionate fairness) • Task x receives either wxt or wxt serving time in [0, t], where wx = ex / px • Tasks make progress in a steady rate Computer Science & Engineering, ASU
Allocation Constraints • Allocation constraint • A task can only run on a given subset of processors • An instance is defined as a tuple {T, R,{P(x)|xT }} • Tis a set of n periodic tasks • Ris a ser of m identical processors • Pis a allocation constraint function defined asP: Tsubsets ofRsuch that forx T, P(x) Rrepresents the subset of processors on which taskxcan be executed Computer Science & Engineering, ASU
Schedulability with Arbitrary Allocation Constraints • For , assuming wx 1 and • Theorem 1. Instance is pfair schedulable if and only if there exists a set of nonnegative numbers w(x, r) (xT, rR) such that Computer Science & Engineering, ASU
Proof by Constructing a Graph • Proof of Theorem 1 • Applying max-flow theory to a constructed digraph G = (V, E) representing the scheduling problem • V = V0V1V2V3V4V5 • V0 = {source}. • V1 = {1, x, i | xT, i [0, wxL)}. • V2= {2, x, j | xT, j [0, L)}. • V3 = {3, x, j | xT, j [0, L)}. • V4 = {4, r, j | rR, j [0, L)}. • V5 = {sink}. Computer Science & Engineering, ASU
Proof by Constructing a Graph • E = E0 E1 E2 E3 E4 • E0 = {(source, 1, x, i, 1) | xT, i [0, wxL)}. • E1 = {(1, x, i, 2, x, j, 1) | xT, i [0, wxL), j [earliest(x, i), latest(x, i)]} • earliest(x, i) (latest(x, i)) is the earliest (latest) time slot at which subtask i of task x can run • E2 = {(2, x, j, 3, x, j, 1) | xT, j [0, L)}. • E3 = {(3, x, j, 4, r, j, 1) | xT, rP(x), j [0, L)}. • E4= {(4, r, j, sink, 1) | rR, j [0, L)}. Computer Science & Engineering, ASU
An Example of Graph Construction • An example • T = {x0, x1, x2, x3} and R = {r0, r1, r2}. Computer Science & Engineering, ASU
An Example of Graph Construction The constructed graph for the example of scheduling problem Computer Science & Engineering, ASU
Properties of the Constructed Graph • Lemma 1 – A pfair schedule exists for iff there is a flow of size of mL in G • If there is a fractional flow of size mL, then there is an integral flow of size mL • The max flow of G is mL • Lemma 2 – There is a flow of size mL iff there exists a set of numbers w(x, r) (xT, rR), • Construct a fractional flow of size mL toG [3] • Let w(x, r) correspond to • Where f(e) denotes the flow of edge e • The max flow of G is mL Computer Science & Engineering, ASU
Proof of the Schedulability Test Condition • Theorem 1 follows by applying Lemma 1 and Lemma 2 Computer Science & Engineering, ASU
Polynomial Time Pfair Schedulability Test • Checking existence of the set of w(x, r) (xT, rR), can be done in O((n+m)3) • Similarly, construct a bipartite digraph of n+m+2 vertices [3] • w(x, r) is mapped to edge flow in the graph • Max-flow can be found by O((n+m)3) Computer Science & Engineering, ASU
An Example of Polynomial Time Schedulability Test Computer Science & Engineering, ASU
On-Line Approximate Pfair Scheduling • Although schedulability test is solved, on-line pfair scheduling for any allocation constraints is still a challenge • Let us consider special allocation constraints, fixed tasks • Fixed task – A task can only run on a given processor Computer Science & Engineering, ASU
The Approximate Scheduling Algorithm • All the fixed tasks on a processor are combined to a supertask X with weight wX • An approximate algorithm – HPA (hierarchical pfair algorithm) • Global scheduling – Use PD2 algorithm [J. Anderson et al.] to schedule all migrating tasks and supertasks • Local scheduling – On the time slots allocated to a supertask X in global scheduling, schedule the fixed tasks in X using uniprocessor pfair scheduling algorithm Computer Science & Engineering, ASU
Uniprocessor Pfair Scheduling • Uniprocessor pfair scheduling – Similar to non-preemptive non-idling EDF • A subtask i, iN, of task x can only be eligible to run at or after time instant i/wx (the beginning of time slot i/wx ) • At any time slot, one of eligible subtasks is selected to run according to EDF policy, where the deadline of subtask i, iN, of task x is defined as the time instant (i+1)/wx (inside time slot (i+1)/wx -1) • The upper (lower) limit of the windowof a subtask of a fixed task in X under HPA is not 1/wX less (greater) than the upper (lower) limit of the ideal pfair window of the subtask • The deviation from ideal pfair is bounded Computer Science & Engineering, ASU
Channel 1 Session 1 Scheduler Channel 2 Session 2 … … … … Session n Channel m Parallel packet scheduling in WDM switching networks An Application of Pfair Scheduling • PFRR (parallel fair round robin) packet scheduling for switching networks • Multiple channels exist in links, e.g., WDM • n sessions share m channels Computer Science & Engineering, ASU