Computer Science Department University of Pittsburgh Multiple-Resource Periodic Scheduling Problem: how much fairness is necessary? Dakai Zhu, Daniel Mossé.

Slides:



Advertisements
Similar presentations
CPU Scheduling.
Advertisements

1 “Scheduling with Dynamic Voltage/Speed Adjustment Using Slack Reclamation In Multi-processor Real-Time Systems” Dakai Zhu, Rami Melhem, and Bruce Childers.
DP-F AIR : A Simple Model for Understanding Optimal Multiprocessor Scheduling Greg Levin † Shelby Funk ‡ Caitlin Sadowski † Ian Pye † Scott Brandt † †
Operating Systems Chapter 6
Chap 5 Process Scheduling. Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU–I/O Burst Cycle – Process execution consists of a.
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CPU Scheduling CS 3100 CPU Scheduling1. Objectives To introduce CPU scheduling, which is the basis for multiprogrammed operating systems To describe various.
Soft Real-Time Semi-Partitioned Scheduling with Restricted Migrations on Uniform Heterogeneous Multiprocessors Kecheng Yang James H. Anderson Dept. of.
How Many Boundaries Are Required to Ensure Optimality in Multiprocessor Scheduling? Geoffrey Nelissen Shelby Funk Dakai Zhu Joёl Goossens.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 5: CPU Scheduling.
Scheduling in Batch Systems
Chapter 6: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 6: CPU Scheduling Basic.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
What we will cover…  CPU Scheduling  Basic Concepts  Scheduling Criteria  Scheduling Algorithms  Evaluations 1-1 Lecture 4.
Chapter 5-CPU Scheduling
Fair Scheduling of Real-Time Tasks on Multiprocessors Uday Prabhala.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Basic Concepts Maximum CPU utilization.
Chapter 6: CPU Scheduling
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
CS212: OPERATING SYSTEM Lecture 3: Process Scheduling 1.
Computer Science Department University of Pittsburgh 1 Evaluating a DVS Scheme for Real-Time Embedded Systems Ruibin Xu, Daniel Mossé and Rami Melhem.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
Scheduling policies for real- time embedded systems.
BFair: An Optimal Scheduler for Periodic Real-Time Tasks
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
An Efficient Algorithm for Scheduling Instructions with Deadline Constraints on ILP Machines Wu Hui Joxan Jaffar School of Computing National University.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 7: CPU Scheduling Chapter 5.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
Virtual Memory. Background Virtual memory is a technique that allows execution of processes that may not be completely in the physical memory. Virtual.
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 5: CPU Scheduling Basic.
Computer Science & Engineering, ASU1/17 Pfair Scheduling of Periodic Tasks with Allocation Constraints on Multiple Processors Deming Liu and Yann-Hang.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 5 CPU Scheduling Slide 1 Chapter 5 CPU Scheduling.
Rounding scheme if r * j  1 then r j := 1  When the number of processors assigned in the continuous solution is between 0 and 1 for each task, the speed.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Clock Driven Scheduling
Determining Optimal Processor Speeds for Periodic Real-Time Tasks with Different Power Characteristics H. Aydın, R. Melhem, D. Mossé, P.M. Alvarez University.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
1 Module 5: Scheduling CPU Scheduling Scheduling Algorithms Reading: Chapter
Basic Concepts Maximum CPU utilization obtained with multiprogramming
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
Improved Conditions for Bounded Tardiness under EPDF Fair Multiprocessor Scheduling UmaMaheswari Devi and Jim Anderson University of North Carolina at.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
CPU SCHEDULING.
Imprecise Computation September 7, 2006
Chapter 6: CPU Scheduling
Process management Information maintained by OS for process management
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
Ongoing Research Jiyong Park
Chapter 5: CPU Scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Anand Srinivasan Department of Computer Science
Chapter 6: CPU Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Presentation transcript:

Computer Science Department University of Pittsburgh Multiple-Resource Periodic Scheduling Problem: how much fairness is necessary? Dakai Zhu, Daniel Mossé and Rami Melhem The work is supported by DARPA through the PARTS project.

Computer Science Department University of Pittsburgh 2 Preface  Power-aware computing for parallel systems  Frame based task sets  Shared Memory Systems Traditional AND-model applications: TPDS’03 AND/OR-model applications: to appear in TPDS  Distributed Systems: IPDPS’03  Periodic task sets  Global scheduler: P-fair [Baruah’96]

Computer Science Department University of Pittsburgh 3 Problem  Scheduling  n periodic tasks, each task T i with (c i, p i ) c i, p i are integers (i.e.,multiples of system time unit) Weight: w i = c i / p i ; System U =  w i  m resources (m  U)  Constraints: at any time One resource  one task (resources are not shareable) One task occupies one resource (tasks are not parallel)  Optimal  Full utilization (U = m);  Scheduling overhead;  Number of Context switches;

Computer Science Department University of Pittsburgh 4 Previous Work  EDF/RM: dynamic/static priority  Optimal for single resource  The famous task set [Dhall’78] (n –1) tasks with (2* , 1); 1 task with (1, 1+  ) U = (2*  (n-1) + 1/(1+  ) )/n  0 with big n  Harmonic tasks: periods are multiples of each other  [Mancini’94] and [Khemka’97]

Computer Science Department University of Pittsburgh 5 Previous Work (cont.)  PF: proportional fairness [Baruah’96]  Proportional progress for tasks at ANY time At time t: either  w i * t  or  w i * t  Absolute allocation error: less than one time unit  Optimal: full utilization, U = m;  Variations of P-fair algorithms  PD [Baruah’95]  PD 2 [Anderson’01]  ER-fair [Anderson’00] Scheduling decision at EVERY time unit !

Computer Science Department University of Pittsburgh 6 An Example  T 1 =(1, 3), T 2 =(2, 5), T 3 =(2, 5), T 4 =(2, 3), T 5 =(1, 5)  m=U=  w i =2, LCM = 15;  PF schedule [Baruah’96]  15 scheduling points  27 context switches Deadline miss only happens at period boundaries ! R2R2 R1R

Computer Science Department University of Pittsburgh 7 B-Fair: A new approach  Idea  Schedule ONLY at period boundaries Allocate resources to tasks for the time units within two consecutive boundaries  Maintain fairness at boundary time b k (B-Fair) T i get either  w i * b k  or  w i * b k   Two-step allocation Mandatory units to keep fairness Optional units for future urgent tasks

Computer Science Department University of Pittsburgh 8 The Example  T 1 =(1, 3), T 2 =(2, 5), T 3 =(2, 5), T 4 =(2, 3), T 5 =(1, 5) T 1 T 2 T 3 T 4 T 5 At boundary time 0: allocate [0  3) Demand 1 6/5 6/5 2 3/5 Mandatory pending 0 1/5 1 /5 0 3/5 Tasks T 2, T 3,T 5 are eligible for the optional unit ? R2R2 R1R1

Computer Science Department University of Pittsburgh 9 BF Algorithm  Define a set of boundaries: {b 0, …, b L }  b k < b k+1 ; b 0 = 0, b L = LCM;   k,  T i, b k is a multiple of p i ;  At b k, we allocate [b k, b k+1 )  Mandatory units  Optional units m i k = max{ 0,  RW i k + w i *(b k+1 – b k )  } RW i k = Remaining work for T i before b k RW i k = w i * b k – allocated units for T i  m*(b k+1 – b k ) >  m i k

Computer Science Department University of Pittsburgh 10 BF Algorithm (cont.)  Eligible tasks Pending work:PW i k =RW i k + w i *(b k+1 – b k ) - m i k > 0 Not fully allocated: m i k < b k+1 – b k  Dynamic priority: urgency of future  Character string  Time Factor (TF)  : idea from P-fair [Baruah’96]  k (T i ) = sign[b k+1 *w i –  b k *w i  – (b k+1 - b k )]  (T i, k) =  k+1 (T i ), …,  k+s (T i ) Minimum s such that  k+s (T i )  ‘+’  : when  k+s (T i ) = ‘–’

Computer Science Department University of Pittsburgh 11 BF Algorithm (cont.)  For eligible tasks T i and T j  Compare  (T i, k) and  (T i, k) Character by character: ‘+’ > ‘0’ > ‘–’ Bigger string has higher priority  If tie and last character is ‘0’: arbitrary  If tie and last character is ‘–’ Compare time factor (TF) smaller time factor has higher priority If tie again: arbitrary, e.g., smaller index  High priority tasks get one optional unit each

Computer Science Department University of Pittsburgh 12 The Example (cont.)  T 1 =(1, 3), T 2 =(2, 5), T 3 =(2, 5), T 4 =(2, 3), T 5 =(1, 5) T 1 T 2 T 3 T 4 T 5 pending 0 1/5 1 /5 0 3/5 string * - - * -* 0 0 * 0 TF Mandatory Optional Compared BF vs. PF: Scheduling Points: 7 vs. 15 Context Switches: 24 vs. 27 R2R2 R1R1

Computer Science Department University of Pittsburgh 13 Complexity of BF  For each scheduling point: O(n*p max )  Mandatory units allocation: O(n)  Optional units: O(n*p max ) Priority compare: O(p max ) Linear selection from ‘n’ tasks: O(n) [Blum’73]  Improved BF: O(n);  Improve priority comparison: O(1) If  k (T i ) =  k (T j ) = ‘+’, consider two counter-task with weight of 1-w i and 1-w j, respectively.  k (CT i ) =  k (CT j ) = ‘-’: compare their time factors (TF) Bigger TF gets higher priority  Efficient P-fair: PD has O(min{n, m log n} ) [Baruah’95]

Computer Science Department University of Pittsburgh 14 Number of Scheduling Points  Up to 100 tasks  Min period: 10  Max period  20  100  LCM  2 32

Computer Science Department University of Pittsburgh 15 Cycles per Scheduling Point  Up to 100 tasks  Min period: 10  Max period: 100  c i is randomly chosen from 1 to p i ; i.e., m  n/2  Conservative implementation

Computer Science Department University of Pittsburgh 16 Total Time to Generate Schedules  Up to 100 tasks  Min period: 10  Max period: 100  c i is randomly chosen from 1 to p i ; i.e., m  n/2

Computer Science Department University of Pittsburgh 17 Conclusion  Notion of boundary-fairness  BF is optimal: full system utilization  Fewer scheduling points than P-fair algorithms  Complexity per scheduling point is O(n)  Comparable to PD: O (min {n, m log n} )  Less total time to generate schedules  Compared with PD: less than 100 tasks

Computer Science Department University of Pittsburgh Multiple-Resource Periodic Scheduling Problem: how much fairness is necessary? Dakai Zhu, Daniel Mossé and Rami Melhem Questions ?

Computer Science Department University of Pittsburgh 19 Analysis of B-Fair  Ahead, behind, punctual task sets  RW i k 0, =0; respectively  Pre-ahead, pre-behind task set  PW i k 0; respectively

Computer Science Department University of Pittsburgh 20 Analysis of B-Fair (cont.)  No tasks miss the deadline if m   (w i )  When allocating [b k, b k+1 ): m =  (w i )  No over requirement  m i k  m*(b k+1 – b k )  Enough eligible tasks At least m*(b k+1 – b k ) –  m i k  Otherwise, non-empty ahead set and behind set for each previous boundary, which contradicts at b 0

Computer Science Department University of Pittsburgh 21 Performance Evaluation (cont.)  Generally, prime number points are not scheduling point for B-Fair  Prime number theory: big number x  x / ln(x) prime numbers smaller than x  LCM: > 1/lnLCM  10 3  >14.5%  10 6  >7.24%  10 9  > 5%