Segment-Fixed Priority Scheduling for Self-Suspending Real-Time Tasks

Similar documents
CycleTandem: Energy-Saving Scheduling for Real-Time Systems with Hardware Accelerators

Scheduling Periodic Real-Time Tasks on Uniprocessor Systems. LS 12, TU Dortmund

Andrew Morton University of Waterloo Canada

Schedulability of Periodic and Sporadic Task Sets on Uniprocessor Systems

Scheduling Algorithms for Multiprogramming in a Hard Realtime Environment

Non-Preemptive and Limited Preemptive Scheduling. LS 12, TU Dortmund

Embedded Systems 15. REVIEW: Aperiodic scheduling. C i J i 0 a i s i f i d i

Real-Time Scheduling. Real Time Operating Systems and Middleware. Luca Abeni

On the Design and Application of Thermal Isolation Servers

EDF Feasibility and Hardware Accelerators

Real-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3

Many suspensions, many problems: a review of self-suspending tasks in real-time systems

Static priority scheduling

Task Models and Scheduling

Lecture 13. Real-Time Scheduling. Daniel Kästner AbsInt GmbH 2013

EDF Scheduling. Giuseppe Lipari May 11, Scuola Superiore Sant Anna Pisa

Real-Time Systems. Lecture #14. Risat Pathan. Department of Computer Science and Engineering Chalmers University of Technology

Multi-core Real-Time Scheduling for Generalized Parallel Task Models

PASS: Priority Assignment of Real-Time Tasks with Dynamic Suspending Behavior under Fixed-Priority Scheduling

Schedulability and Optimization Analysis for Non-Preemptive Static Priority Scheduling Based on Task Utilization and Blocking Factors

Embedded Systems Development

Mitra Nasri* Morteza Mohaqeqi Gerhard Fohler

Multi-core Real-Time Scheduling for Generalized Parallel Task Models

Bursty-Interference Analysis Techniques for. Analyzing Complex Real-Time Task Models

Semi-Partitioned Fixed-Priority Scheduling on Multiprocessors

Real-Time Scheduling and Resource Management

Embedded Systems 14. Overview of embedded systems design

Online Scheduling Switch for Maintaining Data Freshness in Flexible Real-Time Systems

Process Scheduling for RTS. RTS Scheduling Approach. Cyclic Executive Approach

Paper Presentation. Amo Guangmo Tong. University of Taxes at Dallas February 11, 2014

EDF Scheduling. Giuseppe Lipari CRIStAL - Université de Lille 1. October 4, 2015

Real-Time Systems. Event-Driven Scheduling

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

Real-time Scheduling of Periodic Tasks (1) Advanced Operating Systems Lecture 2

IN4343 Real Time Systems April 9th 2014, from 9:00 to 12:00

Non-preemptive Fixed Priority Scheduling of Hard Real-Time Periodic Tasks

arxiv: v1 [cs.os] 25 May 2011

Paper Presentation. Amo Guangmo Tong. University of Taxes at Dallas January 24, 2014

Improved Priority Assignment for the Abort-and-Restart (AR) Model

Real-Time and Embedded Systems (M) Lecture 5

Non-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions

CPU SCHEDULING RONG ZHENG

Lecture: Workload Models (Advanced Topic)

Embedded Systems Design: Optimization Challenges. Paul Pop Embedded Systems Lab (ESLAB) Linköping University, Sweden

EDF and RM Multiprocessor Scheduling Algorithms: Survey and Performance Evaluation

Clock-driven scheduling

Supporting Read/Write Applications in Embedded Real-time Systems via Suspension-aware Analysis

Rate Monotonic Analysis (RMA)

A Note on Modeling Self-Suspending Time as Blocking Time in Real-Time Systems

System Model. Real-Time systems. Giuseppe Lipari. Scuola Superiore Sant Anna Pisa -Italy

2.1 Task and Scheduling Model. 2.2 Definitions and Schedulability Guarantees

Deadline-driven scheduling

A Theory of Rate-Based Execution. A Theory of Rate-Based Execution

Rate-monotonic scheduling on uniform multiprocessors

Bounding the Maximum Length of Non-Preemptive Regions Under Fixed Priority Scheduling

Reservation-Based Federated Scheduling for Parallel Real-Time Tasks

Maximizing Rewards for Real-Time Applications with Energy Constraints

Real-Time Systems. Event-Driven Scheduling

Schedulability Analysis for the Abort-and-Restart Model

Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks

Multi-core Real-Time Scheduling for Generalized Parallel Task Models

Multiprocessor Scheduling I: Partitioned Scheduling. LS 12, TU Dortmund

Tardiness Bounds under Global EDF Scheduling on a. Multiprocessor

Real-time scheduling of sporadic task systems when the number of distinct task types is small

CIS 4930/6930: Principles of Cyber-Physical Systems

A New Task Model and Utilization Bound for Uniform Multiprocessors

arxiv: v1 [cs.os] 6 Jun 2013

Static-Priority Scheduling. CSCE 990: Real-Time Systems. Steve Goddard. Static-priority Scheduling

AS computer hardware technology advances, both

Lec. 7: Real-Time Scheduling

Schedulability Analysis for the Abort-and-Restart (AR) Model

Uniprocessor Mixed-Criticality Scheduling with Graceful Degradation by Completion Rate

Multiprocessor Scheduling II: Global Scheduling. LS 12, TU Dortmund

Load Regulating Algorithm for Static-Priority Task Scheduling on Multiprocessors

Probabilistic real-time scheduling. Liliana CUCU-GROSJEAN. TRIO team, INRIA Nancy-Grand Est

Dependency Graph Approach for Multiprocessor Real-Time Synchronization. TU Dortmund, Germany

The preemptive uniprocessor scheduling of mixed-criticality implicit-deadline sporadic task systems

Exam Spring Embedded Systems. Prof. L. Thiele

On-line scheduling of periodic tasks in RT OS

Supplement of Improvement of Real-Time Multi-Core Schedulability with Forced Non- Preemption

Aperiodic Task Scheduling

Dynamic-Priority Scheduling. CSCE 990: Real-Time Systems. Steve Goddard. Dynamic-priority Scheduling

Analysis Techniques for Supporting Harmonic Real-Time Tasks with Suspensions

Schedulability analysis of global Deadline-Monotonic scheduling

3. Scheduling issues. Common approaches 3. Common approaches 1. Preemption vs. non preemption. Common approaches 2. Further definitions

Energy-efficient Mapping of Big Data Workflows under Deadline Constraints

Optimal Utilization Bounds for the Fixed-priority Scheduling of Periodic Task Systems on Identical Multiprocessors. Sanjoy K.

Fast Methods for Scheduling with Applications to Real-Time Systems and Large-Scale, Robotic Manufacturing of Aerospace Structures. Matthew C.

Polynomial Time Algorithms for Minimum Energy Scheduling

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #7: More on Uniprocessor Scheduling

Networked Embedded Systems WS 2016/17

Analytical Enhancements and Practical Insights for MPCP with Self-Suspensions. Pratyush Patel, Iljoo Baek, Hyoseung Kim*, Raj Rajkumar

There are three priority driven approaches that we will look at

Fixed Priority Scheduling

Supporting Intra-Task Parallelism in Real- Time Multiprocessor Systems José Fonseca

Suspension-Aware Analysis for Hard Real-Time Multiprocessor Scheduling

Multiprocessor EDF and Deadline Monotonic Schedulability Analysis

Schedulability Analysis of the Linux Push and Pull Scheduler with Arbitrary Processor Affinities

Periodic scheduling 05/06/

The Partitioned Dynamic-priority Scheduling of Sporadic Task Systems

Transcription:

Segment-Fixed Priority Scheduling for Self-Suspending Real-Time Tasks Junsung Kim, Björn Andersson, Dionisio de Niz, and Raj Rajkumar Carnegie Mellon University

2/31 Motion Planning on Self-driving Parallel threads Master thread A motion planning algorithm outputs the best path using Parallel threads that calculate the cost of each possible path Master thread that picks up the best path Parallelism is essential for the motion-planning algorithm to meet its deadline

3/31 Motion Planning with Parallelism Multi-core Processor A quad-core Intel processor was used. We proposed a scheduling algorithm for this at ICCPS 2013. Some challenging cases are still present. When a difficult maneuver is necessary (e.g. parking lot) When there are just too many obstacles on our path Many-core Processor Server-class processors are not an option due to space, heating and cost constraints. Using a GP-GPU is a good option. Task executes on CPU, suspends, executes on GPU, and then resumes execution on CPU self-suspension How to deal with tasks that self-suspend?

4/31 Our Goals Dealing with tasks that self-suspend Does not satisfy the assumptions of RMS Identify cases in which RMS is still optimal Find a utilization bound if possible Discover a way to schedule self-suspending tasks when RMS is sub-optimal Glimpse of the solution Assign a priority to each segment of a job Segment: a continuous portion of execution without self-suspension Leverage phase enforcement for each segment

5/31 Task Model T i R i D i C i,1 G i,1 C i,2 G i,si 1 C i,si τ i,1 τ i,2 τ i,si Model of a self-suspending real-time task τ i : C i,1, G i,1, C i,2,, G i,si 1, C i,si, T i C i,1 time s i is the number of task segments for τ i. C i,j is the worst-case execution time for the j th execution segment, and there are s i execution segments. G i,j is the worst-case suspension time for the j th suspension segment, and there are s i 1 suspension segments. T i is the period of τ i, and an implicit deadline is assumed.

6/31 Outline Motivation, Goals, and Models Task-Fixed Priority Scheduling for Self-Suspending Tasks Segment-Fixed Priority Scheduling Evaluation Conclusion and Future Work

7/31 Task-Fixed Priority Scheduling for Self-Suspending Tasks Assumptions R i D i C i,1 G i,1 C i,2 G i,si 1 C i,si τ i,1 τ i,2 τ i,si G i,j = G MAX i,j = G i,j T i MIN C i,1 τ i,j always runs for C i,j. No phase enforcement is used. Glimpse of the results The conventional critical instant does not always hold. When it does hold, a utilization bound exists. time

8/31 τ 1 : Failure of L&L Critical Instant One self-suspending task and one non-suspending task τ 1 : 1, 1, 3, 5 and τ 2 : 2, 7 τ 2 : 7 8 τ 2 misses its deadline at the second job release. This violates the conventional definition of a critical instant. It actually depends on which segment of τ 1 is released with τ 2.

Critical Instant Failure (cont d) For a taskset with one self-suspending task τ 1 and one non-suspending task τ 2 : Critical instant candidates arise when τ 2 arrives at the same time as any of the segments of τ 1 Pick the worst (paper has the proof) For a taskset with one self-suspending task τ 1 and many non-suspending tasks: τ 1 : 1,2ε, 2, 5 τ 2 : ε, 5 + ε τ 3 : 3ε, 5 + 2ε 0 5 6 + 3ϵ 5 + 2ϵ The critical instant for τ 2 may be different from that of τ 3. * The paper provides an algorithm to find the critical instant of each task. Motivation TFPS SFPS Evaluation Conclusion 9/31

10/31 When Does RMS Hold Good? For a taskset with one self-suspending task and n 1 non-suspending tasks: When R 1 = C 1 + G 1 < C i T 1 R 1, where i n Please refer to the paper for the proof. Then, the utilization bound (UB) for this case is given by U RM SS n, k = n G 1 T1 k lies in 0, 2 1 n 1 1 where, k = 2 + 2k 1 n 1 k When k = 0, it simply becomes the Liu and Layland bound.

11/31 UB with One Self-Suspending Task U RM SS n = n 2 + 2k 1 n 1 k, 0 k 2 1 Utilization Bound Utilization Bound (a) n=2 1 0.9 0.8 0.7 0.6 0.5 0.4 0 0.2 0.4 0.6 0.8 1 G 1 /T 1 (c) n=5 1 0.9 0.8 0.7 0.6 0.5 0.4 0 0.2 0.4 0.6 0.8 1 G 1 /T 1 Utilization Bound Utilization Bound (b) n=3 1 0.9 0.8 0.7 0.6 0.5 0.4 0 0.2 0.4 0.6 0.8 1 G 1 /T 1 (d) n=15 1 0.9 0.8 0.7 0.6 0.5 0.4 0 0.2 0.4 0.6 0.8 1 G 1 /T 1 n 1 1

12/31 Case of Multiple Self-Suspending Tasks Need to consider all possible release offsets Consider a set of two tasks scheduled with RMS: τ 1 : 1,1,1, 5 τ 2 : 2,5,2, 10 τ 1,2 and τ 2,1 arrive together τ 1 τ 2 0 5 10 Deadline miss τ 1,1 and τ 2,1 arrive together τ 1 τ 2 0 5 10 Deadline miss Observation: There is enough slack, but it is not used well. Key Idea: Assign a different priority to each segment.

13/31 Multiple Self-Suspending Tasks (cont d) Idea: assign a higher priority to a segment that needs to complete sooner Consider a set of two tasks: τ 1 : 1,1,1, 5 τ 2 : 2,5,2, 10 New priority assignment: τ 2,1 > τ 1,1 > τ 1,2 > τ 2,2 τ 1,2 and τ 2,1 arrive together τ 1,1 and τ 2,1 arrive together 0 5 10 0 5 10 τ 1 τ 2 τ 1 τ 2

14/31 Outline Motivation, Goals, and Models Task-Fixed Priority Scheduling for Self-Suspending Tasks Segment-Fixed Priority Scheduling Evaluation Conclusion and Future Work

Segment-Fixed Priority Scheduling Assumptions R i D i C i,1 G i,1 C i,2 G i,si 1 C i,si τ i,1 τ i,2 τ i,si G i,j lies in G MIN i,j, G i,j MAX. τ i,j always runs for at most C i,j. This can be extended to sporadic tasks. Glimpse of the results Segment-fixed priority scheduling An exact schedulability analysis based on MILP The optimal priority and phase assignment Some heuristics T i C i,1 Motivation TFPS SFPS Evaluation Conclusion 15/31 time

16/31 Segment-Fixed Priority Scheduling T i C i,1 G i,1 C i,2 G i,si 1 C i,si C i,1 τ i,1 τ i,2 τ i,si τ i,1 φ i,2 φ i,si time Each segment τ i,j has its own priority. τ i,j does not arrive before φ i,j. The varying suspension time yields many different phase offsets.

17/31 Mixed-Integer Linear Programming For an exact schedulability analysis of task-fixed priority scheduling: Find R 1, R 2, and R 3 such that R 1 = C 1 R 2 = C 2 + R 3 = C 3 + R 1 D 1 R 2 D 2 R 3 D 3 R 2 T1 C 1 R 3 T1 C 1 + R 3 T2 C 2 A traditional response-time test The taskset is schedulable if a feasible solution exists.

18/31 Mixed-Integer Linear Programming For an exact schedulability analysis of task-fixed priority scheduling: Find R 1, R 2, and R 3 such that R 1 = C 1 R 2 = C 2 + I 2,1 C 1 R 3 = C 3 + I 3,1 C 1 + I 3,2 C 2 I 2,1 = I 3,1 = R 2 T1 R 3 T1 I 2,1, I 3,1, and I 3,2 are integers. I 3,2 = R 3 T2 R 1 D 1 R 2 D 2 R 3 D 3 The taskset is schedulable if a feasible solution exists.

19/31 Mixed-Integer Linear Programming For an exact schedulability analysis of task-fixed priority scheduling: Find R 1, R 2, and R 3 such that R 1 = C 1 R 2 = C 2 + I 2,1 C 1 R 3 = C 3 + I 3,1 C 1 + I 3,2 C 2 I 2,1 T 1 T 1 < R 2 I 2,1 T 1 I 3,1 T 1 T 1 < R 3 I 3,1 T 1 I 3,2 T 2 T 2 < R 3 I 3,2 T 2 R 1 D 1 R 2 D 2 R 3 D 3 I 2,1, I 3,1, and I 3,2 are integers. The taskset is schedulable if a feasible solution exists.

20/31 Mixed-Integer Linear Programming For an exact schedulability analysis of task-fixed priority scheduling: Find R 1, R 2, and R 3 such that R 1 = C 1 R 2 = C 2 + I 2,1 C 1 R 3 = C 3 + I 3,1 C 1 + I 3,2 C 2 I 2,1 T 1 T 1 R 2 I 2,1 T 1 I 3,1 T 1 T 1 R 3 I 3,1 T 1 I 3,2 T 2 T 2 R 3 I 3,2 T 2 R 1 D 1 R 2 D 2 R 3 D 3 Changing < to does not affect the feasibility. (See the paper) The taskset is schedulable if a feasible solution exists.

21/31 Mixed-Integer Linear Programming For an exact schedulability analysis of task-fixed priority scheduling: Find R 1, R 2, and R 3 such that R 1 = C 1 R 2 = C 2 + I 2,1 C 1 R 3 = C 3 + I 3,1 C 1 + I 3,2 C 2 I 2,1 T 1 T 1 R 2 I 2,1 T 1 I 3,1 T 1 T 1 R 3 I 3,1 T 1 I 3,2 T 2 T 2 R 3 I 3,2 T 2 R 1 D 1 R 2 D 2 R 3 D 3 This is linear, and an MILP problem. The taskset is schedulable if a feasible solution exists.

22/31 MILP for Priority Assignment Introducing a few parameters for priority assignment Find R 1, R 2, R 3, x 1,2, x 1,3, x 2,1, x 2,3, x 3,1, and x 3,2 such that R R 1 = C 1 + 1 R T2 C 2 x 1,2 + 1 T3 C 3 x 1,3 R 2 = C 2 + R 3 = C 3 + R 2 T1 C 1 x 2,1 + R 3 T1 C 1 x 3,1 + R 2 T3 C 3 x 2,3 R 3 T2 C 2 x 3,2 R 1 D 1 R 2 D 2 R 3 D 3 x i,j is a binary variable, and it becomes 1 if τ j has higher priority than the priority of τ i. When x i,j is given, this can be used to check the schedulability. The phase assignment can be found using a similar approach.

23/31 Heuristics for Priority and Phase Assignment to Task Segments Idea: assign a deadline to a task segment such that the Deadline-Monotonic policy can be used Four heuristics that assign a deadline to a segment: ED (Equal Density): Assign to τ i,j a segment deadline so that all segment densities for τ i are same. MTD (Minimize Total Density): Assign to τ i,j a segment deadline such that the total density for τ i is minimized. ES (Equal Slack): Assign to τ i,j a segment deadline such that D i,1 C i,1 = D i,2 C i,2 = = D i,si C i,si. PS (Proportional Slack): Assign to τ i,j a segment deadline such that D i,j C i,j : D i,j+1 C i,j+1 U i,j : U i,j+1.

24/31 Outline Motivation, Goals, and Models Task-Fixed Priority Scheduling for Self-Suspending Tasks Segment-Fixed Priority Scheduling Evaluation Conclusion and Future Work

25/31 Evaluation Parameters Generated 100 tasksets per datapoint such that The number of tasks varies from 2 to 16 The total utilization of each taskset varies from 0.1 to 1 The period of each task is uniformly distributed between 10 and 100 The maximum value of G i Ti is either 0.1 or 0.6 The number of segments is set to 2 We assume D i = T i

26/31 Evaluation Parameters (cont d) Techniques compared: OPT: Exact schedulability analysis based on MILP RM: Rate-Monotonic ES: Equal Slack ED: Equal Density MTD: Minimize Total Density PS: Proportional Slack

Success ratio Motivation TFPS SFPS Evaluation Conclusion 27/31 40 times When max i G i Ti 0. 1 n = 2 n = 8 Total Utilization Total Utilization All heuristics perform better than RM. ED performs the best among all techniques. The performance difference between OPT and ED gets larger as the total taskset utilization becomes larger.

Success ratio Motivation TFPS SFPS Evaluation Conclusion 28/31 When max i G i Ti 0. 6 n = 2 n = 8 Total Utilization Total Utilization As the suspension time becomes larger, it is difficult for tasks to meet their deadlines (due to tight constraints) regardless of the amount of CPU idle time.

29/31 Related Work Scheduling self-suspending tasks with task-fixed priority scheduling is NP-hard in the strong sense. [Ridouard 04] Other contributions Soft Real-time Suspension-agnostic [Elliott 12] [Gai 03] Suspension-aware [Liu 09] [Liu 12] Hard Real-time [Rajkumar 91] [Gai 03] [Bletsas 05] [Lakshmanan 10]

30/31 Conclusions and Future Work Dealing with tasks that self-suspend Determined a new critical instant when there is one selfsuspending task and multiple non-suspending tasks. Derived a utilization bound when RMS is still optimal. Proposed segment-fixed priority scheduling (SFPS). Performed exact schedulability analysis for SFPS. Gave an optimal configuration for priority and phase offset. Four practical heuristics were proposed and evaluated. Deadlines that lead to equal density of segments do best. Future work Multi-core processing

31/31 Thank you and Questions?