THE UNIVERSITY of TEHRAN Mitra Nasri Sanjoy Baruah Gerhard Fohler Mehdi Kargahi October 2014.

Slides:



Advertisements
Similar presentations
Fakultät für informatik informatik 12 technische universität dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund,
Advertisements

Washington WASHINGTON UNIVERSITY IN ST LOUIS Real-Time: Periodic Tasks Fred Kuhns Applied Research Laboratory Computer Science Washington University.
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.
Mehdi Kargahi School of ECE University of Tehran
ISE480 Sequencing and Scheduling Izmir University of Economics ISE Fall Semestre.
RUN: Optimal Multiprocessor Real-Time Scheduling via Reduction to Uniprocessor Paul Regnier † George Lima † Ernesto Massa † Greg Levin ‡ Scott Brandt ‡
Real-Time Scheduling CIS700 Insup Lee October 3, 2005 CIS 700.
Module 2 Priority Driven Scheduling of Periodic Task
Soft Real-Time Semi-Partitioned Scheduling with Restricted Migrations on Uniform Heterogeneous Multiprocessors Kecheng Yang James H. Anderson Dept. of.
Towards Feasibility Region Calculus: An End-to-end Schedulability Analysis of Real- Time Multistage Execution William Hawkins and Tarek Abdelzaher Presented.
Periodic Task Scheduling
Fakultät für informatik informatik 12 technische universität dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund,
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Spring 2002Real-Time Systems (Shin) Rate Monotonic Analysis Assumptions – A1. No nonpreemptible parts in a task, and negligible preemption cost –
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
Embedded System Design Framework for Minimizing Code Size and Guaranteeing Real-Time Requirements Insik Shin, Insup Lee, & Sang Lyul Min CIS, Penn, USACSE,
Chapter 4 – Periodic Task Scheduling In many real-time systems periodic tasks dominate the demand. Three classic periodic task scheduling algorithms: –
Technische Universität Dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund, Informatik 12 Germany 2007/12/14.
New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola.
Abhilash Thekkilakattil, Radu Dobrin, Sasikumar Punnekkat Mälardalen Real-time Research Center, Mälardalen University Västerås, Sweden Preemption Control.
Embedded System Design Framework for Minimizing Code Size and Guaranteeing Real-Time Requirements Insik Shin, Insup Lee, & Sang Lyul Min CIS, Penn, USACSE,
Introductory Seminar on Research CIS5935 Fall 2009 Ted Baker.
Quantifying the sub-optimality of uniprocessor fixed priority non-pre-emptive scheduling Robert Davis 1, Laurent George 2, Pierre Courbin 3 1 Real-Time.
Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.
Quantifying the Sub-optimality of Non-preemptive Real-time Scheduling Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.
Efficient Admission Control for Enforcing Arbitrary Real-Time Demand-Curve Interfaces Farhana Dewan and Nathan Fisher RTSS, December 6 th, 2012 Sponsors:
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
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.
Real-Time Systems Mark Stanovich. Introduction System with timing constraints (e.g., deadlines) What makes a real-time system different? – Meeting timing.
The Packing Server for Real-time Scheduling of MapReduce Workflows Shen Li, Shaohan Hu, Tarek Abdelzaher University of Illinois at Urbana Champaign 1.
Real-Time Scheduling CS 3204 – Operating Systems Lecture 20 3/3/2006 Shahrooz Feizabadi.
The Global Limited Preemptive Earliest Deadline First Feasibility of Sporadic Real-time Tasks Abhilash Thekkilakattil, Sanjoy Baruah, Radu Dobrin and Sasikumar.
The 32nd IEEE Real-Time Systems Symposium Meeting End-to-End Deadlines through Distributed Local Deadline Assignment Shengyan Hong, Thidapat Chantem, X.
CS244-Introduction to Embedded Systems and Ubiquitous Computing Instructor: Eli Bozorgzadeh Computer Science Department UC Irvine Winter 2010.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
Resource Augmentation for Performance Guarantees in Embedded Real-time Systems Abhilash Thekkilakattil Licentiate Thesis Presentation Västerås, November.
CS244-Introduction to Embedded Systems and Ubiquitous Computing Instructor: Eli Bozorgzadeh Computer Science Department UC Irvine Winter 2010.
Special Class on Real-Time Systems
CSE 522 Real-Time Scheduling (2)
Real-Time Scheduling CS 3204 – Operating Systems Lecture 13 10/3/2006 Shahrooz Feizabadi.
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
Common Approaches to Real-Time Scheduling Clock-driven (time-driven) schedulers Priority-driven schedulers Examples of priority driven schedulers Effective.
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.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Dynamic Priority Driven Scheduling of Periodic Task
Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund, Informatik 12 Germany 2012 年 12 月 19 日 These slides use Microsoft clip.
Introduction to Real-Time Systems
Mok & friends. Resource partition for real- time systems (RTAS 2001)
Resource Augmentation for Fault-Tolerance Feasibility of Real-time Tasks under Error Bursts Abhilash Thekkilakattil, Radu Dobrin, Sasikumar Punnekkat and.
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.
Lecture 6: Real-Time Scheduling
Improved Conditions for Bounded Tardiness under EPDF Fair Multiprocessor Scheduling UmaMaheswari Devi and Jim Anderson University of North Carolina at.
Tardiness Bounds for Global EDF Scheduling on a Uniform Multiprocessor Kecheng Yang James H. Anderson Dept. of Computer Science UNC-Chapel Hill.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter5: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Processes and operating systems
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Ch 4. Periodic Task Scheduling
Module 5: CPU Scheduling
Presentation transcript:

THE UNIVERSITY of TEHRAN Mitra Nasri Sanjoy Baruah Gerhard Fohler Mehdi Kargahi October 2014

2 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 2 of 29  Benefits ◦ No context switches ◦ Cache and pipelines are not affected by other tasks  More precise estimation of WCET ◦ Simpler mechanisms to protect critical sections  In some systems, preemption is either not allowed or too expensive Benefits from the application’s point of view Minimum I/O delay (the delays between sampling and actuation)

3 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  Non-Preemptive Scheduling is NP-Hard ◦ For Periodic Tasks [Jeffay 1991] ◦ For Harmonic Tasks [Cai 1996] ◦ For Harmonic Tasks with Binary Period Ratio [Nawrocki 1998] k i = {1, 2, 4, 8, 16, …} τ i -1 TiTi T i -1 τiτi Period Ratio

4 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  Schedulability test for npEDF, npRM, and Fixed Priority ◦ [Kim 1980, Jeffay 1991, George 1996, Park 2007, Andersson 2009, Marouf 2010,…]  Heuristic scheduling algorithms ◦ Clairvoyant EDF [Ekelin 2006], Group-Based EDF [Li 2007]  Optimal scheduling algorithms for special cases ◦ [Deogun 1986, Cai 1996, Nasri 2014]

5 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  [Deogun 1986]: An optimal algorithm if tasks have ◦ Constant integer period ratio K ≥ 3  [Cai 1996]: An optimal algorithm if tasks have ◦ Constant period ratio K = 2, or ◦ Integer period ratio k i ≥ 3  Limitations  Linear time in the number of jobs, exponential time in the number of tasks!  Constructs an offline time table with exponential number of entries Period Ratio An optimal scheduling algorithm is the one which guarantees all deadlines whenever a feasible schedule exists

6 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  Precautious-RM [Nasri 2014] is optimal if tasks have ◦ Constant period ratio K = 2 ◦ Integer period ratio k i ≥ 3 ◦ Arbitrary integer period ratio k i ≥ 1 and enough vacant intervals  Precautious-RM is online and has O(n) computational and memory complexity (in the number of tasks)

7 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 7 of 25 A Framework to Construct Customized Harmonic Periods for RTS  We study ◦ The existence of a utilization-based test ◦ The pessimism in the existing necessary and sufficient test ◦ The efficiency of the recent processor speedup approach  Then for special cases of harmonic tasks we present ◦ The schedulability conditions ◦ A more efficient speedup factor

8 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 8 of 29  Task set τ = {τ 1, τ 2, …, τ n }  T i is the period of τ i  c i is the WCET of τ i  k i is the period ratio of τ i to τ i-1  Deadlines are implicit; D i = T i τ i -1 TiTi T i -1 τiτi Period Ratio

9 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 9 of 29  Is it possible to have a utilization-based test for non-preemptive scheduling of periodic tasks? [Liu 1973] EDF [Bini 2003] RM (Hyperbolic Bound)

10 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  Utilization of a non-preemptive task set which cannot be scheduled by any clairvoyant scheduling algorithm, can be arbitrarily close to zero. 2 1/ε τ 2 :( 2, 1/ ε ) … ε missed 1 τ 1 :( ε, 1) ε ~0 ⇒ U~0

11 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 11 of 29  It is impossible to find any relation between utilizations such that if it holds, schedulability of any scheduling algorithm is guaranteed. We build an infeasible task set with those utilizations τ 1 to τ n-1 : T 1 = T 1 = … = T n-1 = an arbitrary value c 1 = u 1 T 1, c 2 = u 2 T 2, …, c n-1 = u n-1 T n-1 … c 1 + c 2 + … + c n-1 T1-crT1-cr T 1 -c r + ε τ n : c n = 2(T 1 -c r )+ ε T n = c n /u n c r = c 1 + c 2 + … + c n-1 c n = 2(T 1 -c r ) + ε τnτn … c 1 + c 2 + … + c n-1 τ 1 to τ n-1 At least one deadline miss

12 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 12 of 29 Yes! (for npEDF)  [Jeffay 1991]: Necessary and sufficient conditions for the schedulability of periodic tasks with unknown release offsets (with npEDF): Does it provide necessary conditions for task sets with known release offset?

13 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  For task sets with no or known release offset, Jeffay’s conditions are only sufficient. This task set is feasible by npEDF, but it is rejected in Jeffay’s test

14 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 14 of 29 cici … τiτi Processor with speed 1 Processor with speed S ci/Sci/S … TiTi τiτi [Thekkilakattil 2013]

15 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 15 of 29  The speed S that guarantees the feasibility of a non-preemptive execution of a harmonic task set is upper bounded by  The proof can be done by finding the bound on the maximum possible execution time of a non-preemptive task! S ≤ 8 It may reduce U=1 to U’=0.125

16 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 16 of 29  Can we find cases where npEDF and npRM are optimal?  Can we find better speedup factor?

17 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 17 of 29 What if the execution times are limited to c i ≤ T 1 – c 1 ? Schedulable!Non-Schedulable!

18 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 18 of 29  If we have U ≤ 1 and c i ≤T 1 – c 1 can we guarantee schedulability?  Intuition: maximum blocking will be bounded to T 1 – c 1  Is it enough?

19 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  npRM and npEDF are not optimal for harmonic tasks with U ≤ 1 and c i ≤T 1 – c 1 This task set is infeasible The relation between periods cannot be ignored easily!

20 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 20 of 29  We can count the vacant intervals to make sure each task has its own place to be scheduled!

21 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  A vacant interval is constructed by the slack of τ 1  The number of vacant intervals is defined as τ3τ3 c 3 = T 1 – c 1 τ1τ1 c1c1 τ2τ2 c 2 = T 1 – c 1 V 2 = 3 V 3 = 2

22 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 22 of 29 c i = T 1 – c 1  npRM and npEDF have no deadline miss if in the harmonic task set we have  U ≤ 1  c i ≤T 1 – c 1  V i ≥ 1, 1 < i < n; and V n ≥ 0 τ3τ3 c1c1 τ1τ1 τ2τ2 c 2 = T 1 – c 1 c 3 = T 1 – c 1 τiτi …… k i > 1

23 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 23 of 29  npEDF and npRM guarantee schedulability if c i ≤T 1 – c 1 and k i > 1, or c i ≤T 1 – c 1 and V i ≥ 1  [Deogun 1986] c i ≤ 2(T 1 – c 1 ) and K ≥ 3  [Cai 1996] c i ≤ 2(T 1 – c 1 ) and K = 2 or k i ≥ 3 S is bounded to 2

24 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 24 of 29 npEDF and npRM with speedup factor 2 are optimal for task sets with enough vacant interval or integer period ratio greater than 1 In ECRTS 2014, we have introduced a framework to construct customized harmonic periods. It can be used to increase the applicability of our results.

25 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 25 of 29

26 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  Non-preemptive RM (npRM)  Precautious-RM (pRM) [Nasri 2014]  Cai’s Algorithm (GSSP) [Cai 1996]  Group-Based EDF (gEDF) [Li 2007]  npEDF + Speedup Factor of [Thekkilakattil 2013] (TSP-EDF)  npEDF + Our Speedup Factor (OSP-EDF)

27 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 27 of 29 Task sets c i ≤ 2(T 1 – c 1 ) V i ≥ 1 k i ∊ {1, 2, …, 6} Parameter: u 1 from 0.1 to 0.9  OSP-EDF, TSP-EDF, and Precautious-RM have no misses.  gEDF has the highest amount of miss ratio. In this case, it is worse than npRM.  The goal is to show the efficiency of the speedup of TSP- and OSP-EDF.

28 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 28 of 29 npEDF npRM Negative Results Non-existence of any utilization-based test Pessimism in the existing test For tasks with known release time Inefficiency of the recent processor speedup approach for many cases of harmonic tasks

29 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 29 of 29 npEDF npRM New Results Schedulability conditions with limited execution time Extending those conditions to task sets with k i > 1 Deriving more efficient speedup factor when the execution time is not limited Deriving more efficient speedup factor when the execution time is not limited

30 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 30 of 25 A Framework to Construct Customized Harmonic Periods for RTS Questions Thank you

31 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  The speedup factor that guarantees feasibility of npRM and npEDF for task sets with U ≤ 1 and c i ≤ 2(T 1 – c 1 ) and V i ≥ 1 (for 1 < i < n), and V n ≥ 0 is bounded to S is bounded to 2

32 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  U ≤ 1  c i ≤ 2(T 1 – c 1 ) We call it the Slack Rule

33 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 33 of 25 A Framework to Construct Customized Harmonic Periods for RTS  We can use a sort of packing in the tasks so that in the formula, each vacant interval can be occupied by different subset of tasks.  We might be able to show that the problem of finding the minimum number of V i s is NP-Complete because it can reduces to subset sum problem. T 1 - c 1 τ1τ1 c1c1 … … c 2 + c 5 + … + c j τ 2, τ 5, …, τ j … T2T2

34 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  [Kim 1980] : Exact schedulability analysis for npEDF  [Jeffay 1991]: ◦ Necessary and sufficient conditions for schedulability of npEDF for periodic tasks with unknown release phase ◦ npEDF is optimal among non-work conserving algorithms  [George 1996, Park 2007, Andersson 2009] : Sufficient conditions for RM and FP algorithms  [Marouf 2010] : Schedulability analysis for strictly periodic tasks

35 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  Clairvoyant EDF [Ekelin 2006] ◦ It looks ahead in the schedule and tries to … ◦ Not optimal  Group-Based EDF [Li 2007] ◦ Creates groups of tasks with close deadlines ◦ Selects a task with the shortest execution time from a group with the earliest deadline ◦ Efficient for soft real-time tasks ◦ Not optimal

36 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  General task sets with limited execution time ◦ c i ≤ 2(T 1 – c 1 ) ◦ k i ∊ {1, 2, …, 6} ◦ Parameter: U from 0.1 to 0.9

37 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 37 of 29  TSP-EDF is only optimal algorithm (it uses S ≤ 8 ).  OSP-EDF has in average only 1% miss ratio, however, it cannot guarantee schedulability because of not having V i ≥ 1 condition.  Precautious-RM is very efficient among other algorithms, yet it is not optimal.  Note: some of those task sets are infeasible.

38 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  General task sets ◦ k i ∊ {1, 2, …, 6} ◦ Parameter: U from 0.1 to 0.9  (with uUniFast)

39 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 39 of 29  TSP-EDF is only optimal algorithm (it uses speedup).  OSP-EDF has in average only 0.02 miss ratio, however, it cannot guarantee schedulability  Precautious-RM is very efficient among other algorithms, yet it is not optimal.  Note: many of those task sets are infeasible.

40 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  Feasible task sets ◦ c i ≤ T 1 – c 1 ◦ V i ≥ 1 ◦ k i ∊ {1, 2, …, 6} ◦ Parameter: u 1 from 0.1 to 0.9

41 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 41 of 29  gEDF has a lot of misses.  GSSP cannot handle k i =1  Others have no misses  Before u 1 =0.5, C max is usually from other tasks, after that c 1 becomes larger than others [Thekkilakattil 1013]

42 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 42 of 29  For the proof we use necessary condition c i ≤ 2(T 1 – c 1 ), thus: ◦ C max is either 2(T 1 – c 1 ) or c 1 ◦ D min is T 1  The speed S that guarantees the feasibility of a non-preemptive execution of a harmonic task set is upper bounded by S ≤ 8 It may reduce U=1 to U’=0.125

43 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks  npRM and npEDF are identical if the period is the tie breaker (for npEDF) From now on, any result for npRM is applicable on npEDF as well RM and EDF are also identical