RUN: Optimal Multiprocessor Real-Time Scheduling via Reduction to Uniprocessor Paul Regnier † George Lima † Ernesto Massa † Greg Levin ‡ Scott Brandt ‡

Slides:



Advertisements
Similar presentations
Washington WASHINGTON UNIVERSITY IN ST LOUIS Real-Time: Periodic Tasks Fred Kuhns Applied Research Laboratory Computer Science Washington University.
Advertisements

1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
Courseware Scheduling of Distributed Real-Time Systems Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
THE UNIVERSITY of TEHRAN Mitra Nasri Sanjoy Baruah Gerhard Fohler Mehdi Kargahi October 2014.
DP-F AIR : A Simple Model for Understanding Optimal Multiprocessor Scheduling Greg Levin † Shelby Funk ‡ Caitlin Sadowski † Ian Pye † Scott Brandt † †
Module 2 Priority Driven Scheduling of Periodic Task
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Soft Real-Time Semi-Partitioned Scheduling with Restricted Migrations on Uniform Heterogeneous Multiprocessors Kecheng Yang James H. Anderson Dept. of.
Sporadic Server Scheduling in Linux Theory vs. Practice Mark Stanovich Theodore Baker Andy Wang.
11Sahalu JunaiduICS 573: High Performance Computing5.1 Analytical Modeling of Parallel Programs Sources of Overhead in Parallel Programs Performance Metrics.
How Many Boundaries Are Required to Ensure Optimality in Multiprocessor Scheduling? Geoffrey Nelissen Shelby Funk Dakai Zhu Joёl Goossens.
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.
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola.
A Categorization of Real-Time Multiprocessor Scheduling Problems and Algorithms Presentation by Tony DeLuce CS 537 Scheduling Algorithms Spring Quarter.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 6 CPU SCHEDULING.
Practical Schedulability Analysis for Generalized Sporadic Tasks in Distributed Real-Time Systems Yuanfang Zhang 1, Donald K. Krecker 2, Christopher Gill.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
1 Reducing Queue Lock Pessimism in Multiprocessor Schedulability Analysis Yang Chang, Robert Davis and Andy Wellings Real-time Systems Research Group University.
Scheduling policies for real- time embedded systems.
Multiprocessor Real-time Scheduling Jing Ma 马靖. Classification Partitioned Scheduling In the partitioned approach, the tasks are statically partitioned.
Real-Time Systems Mark Stanovich. Introduction System with timing constraints (e.g., deadlines) What makes a real-time system different? – Meeting timing.
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.
The Global Limited Preemptive Earliest Deadline First Feasibility of Sporadic Real-time Tasks Abhilash Thekkilakattil, Sanjoy Baruah, Radu Dobrin and Sasikumar.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
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.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
Computer Science & Engineering, ASU1/17 Pfair Scheduling of Periodic Tasks with Allocation Constraints on Multiple Processors Deming Liu and Yann-Hang.
Special Class on Real-Time Systems
Real-Time systems By Dr. Amin Danial Asham.
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
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.
6.1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Multiprocessor Fixed Priority Scheduling with Limited Preemptions Abhilash Thekkilakattil, Rob Davis, Radu Dobrin, Sasikumar Punnekkat and Marko Bertogna.
Static Process Scheduling
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Dynamic Priority Driven Scheduling of Periodic Task
Introduction to Real-Time Systems
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Introductory Seminar on Research CIS5935 Fall 2008 Ted Baker.
Determining Optimal Processor Speeds for Periodic Real-Time Tasks with Different Power Characteristics H. Aydın, R. Melhem, D. Mossé, P.M. Alvarez University.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
1 Performance Impact of Resource Provisioning on Workflows Gurmeet Singh, Carl Kesselman and Ewa Deelman Information Science Institute University of Southern.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
Lecture 6: Real-Time Scheduling
IIS Progress Report 2016/01/11. Goal Propose an energy-efficient scheduler that minimize the power consumption while providing sufficient computing resources.
Tardiness Bounds for Global EDF Scheduling on a Uniform Multiprocessor Kecheng Yang James H. Anderson Dept. of Computer Science UNC-Chapel Hill.
Multiprocessor Real-Time Scheduling
CprE 458/558: Real-Time Systems
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Sanjoy Baruah The University of North Carolina at Chapel Hill
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
Chapter 6: CPU Scheduling
Limited-Preemption Scheduling of Sporadic Tasks Systems
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
Ch 4. Periodic Task Scheduling
IIS Progress Report 2016/01/18.
Module 5: CPU Scheduling
Presentation transcript:

RUN: Optimal Multiprocessor Real-Time Scheduling via Reduction to Uniprocessor Paul Regnier † George Lima † Ernesto Massa † Greg Levin ‡ Scott Brandt ‡ † Federal University of Bahia ‡ University of California Brazil Santa Cruz

Multiprocessors Most high-end computers today have multiple processors In a busy computational environment, multiple processes compete for processor time  More processors means more scheduling complexity 2

3 Real-Time Multiprocessor Scheduling Real-time tasks have workload deadlines  Hard real-time = “Meet all deadlines!” Problem: Schedule a set of periodic, hard real-time tasks on a multiprocessor systems so that all deadlines are met.

4 Example: EDF on One Processor On a single processor, Earliest Deadline First (EDF) is optimal (it can schedule any feasible task set) Task 1: time = CPU 2 units of work for every 10 units of time Task 3: 10 units of work for every 25 units of time Task 2: 6 units of work for every 15 units of time

5 Scheduling Three Tasks Example: 2 processors; 3 tasks, each with 2 units of work required every 3 time units job release time = 0 deadline Task 1 Task 2 Task 3 123

6 Global Schedule Example: 2 processors; 3 tasks, each with 2 units of work required every 3 time units time = 0 CPU 1 CPU Task 1 migrates between processors

Taxonomy of Multiprocessor Scheduling Algorithms Uniprocessor Algorithms LLFEDF Partitioned Algorithms Globalized Uniprocessor Algorithms Global EDF Dedicated Global Algorithms Partitioned EDF Optimal Algorithms EKG DP-Wrap pfair LLREF 7 Uniprocessor Multiprocessor

8 Problem Model n tasks running on m processors A periodic task T = (p, e) requires a workload e be completed within each period of length p T's utilization u = e / p is the fraction of each period that the task must execute job release time = 0 p 2p2p 3p3p job release period p workload e

9 Assumptions Processor Identity: All processors are equivalent Task Independence: Tasks are independent Task Unity: Tasks run on one processor at a time Task Migration: Tasks may run on different processors at different times No overhead: free context switches and migrations  In practice: built into WCET estimates

10 The Big Goal (Version 1) Design an optimal scheduling algorithm for periodic task sets on multiprocessors  A task set is feasible if there exists a schedule that meets all deadlines  A scheduling algorithm is optimal if it can always schedule any feasible task set

11 Necessary and Sufficient Conditions Any set of tasks needing at most 1) 1 processor for each task ( for all i, u i ≤ 1 ), and 2) m processors for all tasks (  u i ≤ m) is feasible Status: Solved  pfair (1996) was the first optimal algorithm

12 The Big Goal (Version 2) Design an optimal scheduling algorithm with fewer context switches and migrations  ( Finding feasible schedule with fewest migrations is NP-Complete )

13 The Big Goal (Version 2) Design an optimal scheduling algorithm with fewer context switches and migrations Status: Ongoing…  All existing improvements over pfair use some form of deadline partitioning…

14 Deadline Partitioning Task 1 Task 2 Task 4 Task 3

15 Deadline Partitioning CPU 2 CPU 1

16 The Big Goal (Version 2) Design an optimal scheduling algorithm with fewer context switches and migrations Status: Ongoing…  All existing improvements over pfair use some form of deadline partitioning…  … but all the activity in each time window still leads to a large amount of preemptions and migrations Our Contribution: The first optimal algorithm which does not depend on deadline partitioning, and which therefore has much lower overhead

17 The RUN Scheduling Algorithm RUN uses a sequence of reduction operations to transform a multiprocessor problem into a collection of uniprocessor problems  Uniprocessor scheduling is solved optimally by Earliest Deadline First (EDF)  Uniprocessor schedules are transformed back into a single multiprocessor schedule A reduction operation is composed of two steps: packing and dual

18 A collection of tasks with total utilization at most one can be packed into a single fixed- utilization task: The Packing Operation Task 1: u = 0.1 Task 2: u = 0.3 Task 3: u = 0.4 Packed Task: u = 0.8

19 We divide time with the packed tasks’ deadlines, and schedule them with EDF. In each segment, consume according to total utilization. Scheduling a Packed Task’s Clients Task 1: p=5, u=.1 Task 2: p=3, u=.3 Task 3: p=2, u=.4 EDF schedule of tasks

20 The packed task temporarily replaces (acts as a proxy for) its clients. It may not be periodic, but has a fixed utilization in each segment. Defining a Packed Task Packed Task EDF schedule of tasks Task 1: p=5, u=.1 Task 2: p=3, u=.3 Task 3: p=2, u=.4

21 The dual of a task T is a task T* with the same deadlines, but complementary utilization / workloads: The Dual of a Task T: u = 0.4, p = 3 T*: u = 0.6, p = 3

22 The Dual of a System Given a system of n tasks and m processors, assume full utilization (  u i = m ) The dual system consists of n dual tasks running on n-m processors  Note that the dual utilizations sum to  u i  = n -  u i = n-m  If n < 2m, the dual system has fewer processors The dual task T* represents the idle time of T. T* is executed in the dual system precisely when T is idle, and vice versa.

23 The Dual of a System Task 1 Task 2 Task 3

24 The Dual of a System Task 1 Task 2 Task 3 time = Dual System

25 The Dual of a System Because each dual task represents the idle time of its primal task, scheduling the dual system is equivalent to scheduling the original system. Original System time = Dual System

26 The RUN Algorithm Reduction = Packing + Dual  Keep packing until remaining tasks satisfy: u i + u j > 1 for all tasks T i, T j Schedule of Dual System Schedule for “Primal” System Replace packed tasks in schedule with their clients, ordered by EDF

27 RUN: A Simple Example Task 1: u=.2 Task 2: u=.6 Task 3: u=.3 Step 1: Pack tasks until all pairs have utilization > 1 Task 5: u=.5 Task 4: u=.4 Task 12: u=.8

28 RUN: A Simple Example Task 3: u=.3 Step 1: Pack tasks until all pairs have utilization > 1 Task 5: u=.5 Task 4: u=.4 Task 12: u=.8 Task 34: u=.7

29 RUN: A Simple Example Step 2: Find the dual system on n-m = 3-2 = 1 processor Task 5: u=.5 Task 12: u=.8 Task 34: u=.7

30 RUN: A Simple Example Step 2: Find the dual system on n-m = 3-2 = 1 processor Task 5: u=.5 Task 12: u=.8 Task 34: u=.7 Task 5*: u=.5 Task 12*: u=.2 Task 34*: u=.3

31 RUN: A Simple Example Step 3: Schedule uniprocessor dual with EDF Task 5*: u=.5Task 12*: u=.2 Task 34*: u=.3 time = 0246 Dual CPU

32 RUN: A Simple Example Step 4: Schedule packed tasks from dual schedule time = 0246 Dual CPU

33 RUN: A Simple Example Step 4: Schedule packed tasks from dual schedule time = 0246 Dual CPUCPU 1 CPU 2

34 RUN: A Simple Example Step 5: Packed tasks schedule their clients with EDF time = 0246 Dual CPUCPU 1 CPU 2

35 RUN: A Simple Example The original task set has been successfully scheduled! time = 0246 CPU 1 CPU 2 Task 1: u=.2 Task 2: u=.6 Task 3: u=.3 Task 5: u=.5 Task 4: u=.4

36 RUN: A Few Details Several reductions may be necessary to produce a uniprocessor system  Reduction reduces the number of processors by at least half  On random task sets with 100 processors and hundreds of tasks, less than 1 in 600 task sets required more than 2 reductions. RUN requires  u i = m.  When this is not the case, dummy tasks may be added during the first packing step to create a partially or entirely partitioned system.

37 Proven Theoretical Performance RUN is optimal Reduction is done off-line, prior to execution, and takes O(n log n) Each scheduler invocation is O(n), with total scheduling overhead O(jn log m) when j jobs are scheduled RUN suffers at most (3r+1)/2 preemptions per job on task sets requiring r reductions.  Since r ≤ 2 for most task sets, this gives a theoretical upper bound of 4 preemptions per job.  In practice, we never observed more than 3 preeptions per job on our randomly generated task sets.

38 Simulation and Comparison We evaluated RUN in side-by-side simulations with existing optimal algorithms LLREF, DP- Wrap, and EKG.  Each data point is the average of 1000 task sets, generated uniformly at random with utilizations in the range [0.1, 0.99] and integer periods in the range [5,100].  Simulations were run for 1000 time units each.  Values shown are average migrations and preemptions per job.

39 Comparison Varying Processors Number of processors varies from m = 2 to 32, with 2m tasks and 100% utilization

40 Comparison Varying Utilization Total utilization varies from 55 to 100%, with 24 tasks running on 16 processors

Ongoing Work Heuristic improvements to RUN Extend RUN to broader problems: sporadic arrivals, arbitrarily deadlines, non-identical multiprocessors, etc Develop general theory and new examples of non-deadline-partitioning algorithms 41

Summary- The RUN Algorithm: is the first optimal algorithm without deadline partitioning outperforms existing optimal algorithms by a factor of 5 on large systems scales well to larger systems reduces gracefully to the very efficient Partitioned EDF on any task set that Partitioned EDF can schedule 42

43 Thanks for Listening Questions?