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

Similar documents
DESH: overhead reduction algorithms for deferrable scheduling

CITY UNIVERSITY OF HONG KONG 香港城市大學. Scheduling and Sampling Technologies for Sensor Data 傳感數據的調度和採樣技術

Task Models and Scheduling

EDF Feasibility and Hardware Accelerators

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

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

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

Andrew Morton University of Waterloo Canada

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

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

CSE 380 Computer Operating Systems

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

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

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

Scheduling. Uwe R. Zimmer & Alistair Rendell The Australian National University

Real-Time Scheduling and Resource Management

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

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

RUN-TIME EFFICIENT FEASIBILITY ANALYSIS OF UNI-PROCESSOR SYSTEMS WITH STATIC PRIORITIES

CIS 4930/6930: Principles of Cyber-Physical Systems

CPU SCHEDULING RONG ZHENG

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

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

Schedulability of Periodic and Sporadic Task Sets on Uniprocessor Systems

Real-Time and Embedded Systems (M) Lecture 5

arxiv: v1 [cs.os] 6 Jun 2013

A New Sufficient Feasibility Test for Asynchronous Real-Time Periodic Task Sets

An Improved Schedulability Test for Uniprocessor. Periodic Task Systems

Necessary and Sufficient Conditions for Non-Preemptive Robustness

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

Uniprocessor Mixed-Criticality Scheduling with Graceful Degradation by Completion Rate

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

Static priority scheduling

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

2.1 Task and Scheduling Model. 2.2 Definitions and Schedulability Guarantees

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

arxiv: v1 [cs.os] 25 May 2011

Embedded Systems Development

AS computer hardware technology advances, both

The Concurrent Consideration of Uncertainty in WCETs and Processor Speeds in Mixed Criticality Systems

Aperiodic Task Scheduling

arxiv: v1 [cs.os] 21 May 2008

Scheduling Algorithms for Multiprogramming in a Hard Realtime Environment

Embedded Systems 14. Overview of embedded systems design

Efficient TDM-based Arbitration for Mixed-Criticality Systems on Multi-Cores

Networked Embedded Systems WS 2016/17

Real-Time Systems. Lecture 4. Scheduling basics. Task scheduling - basic taxonomy Basic scheduling techniques Static cyclic scheduling

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

Exam Spring Embedded Systems. Prof. L. Thiele

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

Schedulability analysis of global Deadline-Monotonic scheduling

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

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

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

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

Deadline-driven scheduling

Load Regulating Algorithm for Static-Priority Task Scheduling on Multiprocessors

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

Mitra Nasri* Morteza Mohaqeqi Gerhard Fohler

Shedding the Shackles of Time-Division Multiplexing

Bounding the End-to-End Response Times of Tasks in a Distributed. Real-Time System Using the Direct Synchronization Protocol.

Controlling Preemption for Better Schedulability in Multi-Core Systems

A Dynamic Real-time Scheduling Algorithm for Reduced Energy Consumption

Scheduling I. Today Introduction to scheduling Classical algorithms. Next Time Advanced topics on scheduling

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

Analysis and Implementation of Global Preemptive Fixed-Priority Scheduling with Dynamic Cache Allocation*

Module 5: CPU Scheduling

Chapter 6: CPU Scheduling

An Improved Schedulability Test for Uniprocessor Periodic Task Systems

Cache-Aware Compositional Analysis of Real- Time Multicore Virtualization Platforms

Proportional Share Resource Allocation Outline. Proportional Share Resource Allocation Concept

Reducing Tardiness Under Global Scheduling by Splitting Jobs

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

TDDB68 Concurrent programming and operating systems. Lecture: CPU Scheduling II

Design and Analysis of Time-Critical Systems Response-time Analysis with a Focus on Shared Resources

Rate Monotonic Analysis (RMA)

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Semi-Partitioned Fixed-Priority Scheduling on Multiprocessors

CPU scheduling. CPU Scheduling

Energy-efficient Mapping of Big Data Workflows under Deadline Constraints

How to deal with uncertainties and dynamicity?

Converting existing analysis to the EDP resource model

A 2-Approximation Algorithm for Scheduling Parallel and Time-Sensitive Applications to Maximize Total Accrued Utility Value

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

Improved Deadline Monotonic Scheduling With Dynamic and Intelligent Time Slice for Real-time Systems

Lecture Note #6: More on Task Scheduling EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan

CPU Scheduling. Heechul Yun

Spare CASH: Reclaiming Holes to Minimize Aperiodic Response Times in a Firm Real-Time Environment

Online Energy-Aware I/O Device Scheduling for Hard Real-Time Systems with Shared Resources

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

Scheduling I. Today. Next Time. ! Introduction to scheduling! Classical algorithms. ! Advanced topics on scheduling

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

Real-Time Systems. Event-Driven Scheduling

Laxity dynamics and LLF schedulability analysis on multiprocessor platforms

CMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017

TDDI04, K. Arvidsson, IDA, Linköpings universitet CPU Scheduling. Overview: CPU Scheduling. [SGG7] Chapter 5. Basic Concepts.

Response Time Analysis for Tasks Scheduled under EDF within Fixed Priorities

Real-Time Systems. LS 12, TU Dortmund

Scheduling Slack Time in Fixed Priority Pre-emptive Systems

Schedulability Analysis for the Abort-and-Restart Model

Transcription:

Online Scheduling Switch for Maintaining Data Freshness in Flexible Real-Time Systems Song Han 1 Deji Chen 2 Ming Xiong 3 Aloysius K. Mok 1 1 The University of Texas at Austin 2 Emerson Process Management 3 Google Inc

Outline Motivation Maintaining Data Freshness Utilization-based Scheduling Selection Scheduling Switch with Validity Constraint Performance Evaluation Conclusion

Motivation Maintaining data quality in real-time systems is important. Real-time data are used to capture current status of entities in the system. Real-time data have time semantics and their quality degrade with time. Many scheduling policies are available.

Motivation Maintaining data quality in real-time systems is important. Real-time data are used to capture current status of entities in the system. Real-time data have time semantics and their quality degrade with time. Many scheduling policies are available. Many real-time systems exhibit multi-modal behavior. Each mode is characterized by a different task set. Different modes have varying system workloads.

Motivation Maintaining data quality in real-time systems is important. Real-time data are used to capture current status of entities in the system. Real-time data have time semantics and their quality degrade with time. Many scheduling policies are available. Many real-time systems exhibit multi-modal behavior. Each mode is characterized by a different task set. Different modes have varying system workloads. Example: Aircraft Control Systems Real-time data: aircraft position, speed, direction, altitude, etc. Different modes: landing, takeoff, normal cruise, etc.

Motivation Goals: Maintaining data freshness in flexible real-time systems. Achieving the tradeoff between higher data quality and better schedulability.

Motivation Goals: Maintaining data freshness in flexible real-time systems. Achieving the tradeoff between higher data quality and better schedulability. Problems: Which scheduling policy should be applied to a mode? When to do the switch to maintain data freshness during the transition?

Temporal Validity and Data Staleness A validity interval is associated with a data value. A data value is fresh within the validity interval. Staleness is used to measure the degradation in data freshness. Increases linearly within the validity interval until the data is refreshed. t 1 V 1 V 1 t 2 t 1 + V 1 t 2 + V 1 Staleness 1 V 2 (t 3 -r i,j+1 ) / V i t 3 t 3 + V 2 (t 1 -r i,j ) / V i V 1: validity length of X 1 V 2: validity length of X 2 0 r i,j t 1 t 2 r i,j+1 t 3 Time

Algorithms for Maintaining Data Freshness Half-Half [Ramamritham 93] Period (P i ) and relative deadline (D i ) of an update transaction τ i are each set to be one-half of the data validity length (V i ). More-Less [Xiong & Ramamritham 99] Validity Constraint (to ensure data validity): Period + Relative Deadline Validity Length Deadline Constraint (to reduce workload): Computation Time Relative Deadline Period Schedulability Constraint (by deadline monotonic): Response time of the 1st instance Relative Deadline 1st instance response time is the longest response time of all instances of a transaction if all periodic transactions start synchronously

Algorithms for Maintaining Data Freshness J i,j J i,j J i,j+1 J i,j+1 T T+P i T+2P i V i = 2P i J i,j J i,j J i,j+1 J i,j+1 T T+D i T+P i T+V i V i = D i + P i Remark More-Less is pessimistic because the relative deadline is fixed and equal to the worst case response time of the transaction.

Algorithms for Maintaining Data Freshness Deferrable Scheduling with Fixed Priority (DS-FP) [Xiong, Han & Lam 05] Adopts the sporadic task model. Defers the sampling time, r i,j+1, of J i,j s next job as late as possible. Increases the distance of two consecutive jobs as much as possible. J i, j J i, j+1 V i J i, j+1 Higher-priority preemption to J i, j+1 J i, j J i, j+1 r i, j d i, j d i, j+1 V i r i, j+1 d i, j+2 V i r' i, j+1 d' i, j+2

Utilization-based Scheduling Selection MCR Try HH. Use Liu & Layland s schedulability test condition. Calculate Period and Deadline under HH Schedulable? N Calculate Period and Deadline under ML Y Apply HH Schedulable? N Apply DS-FP in the new mode Y Apply ML Schedulable? N Error Y Success

Utilization-based Scheduling Selection MCR Calculate Period and Deadline under HH Schedulable? Y Apply HH N Try ML. Need to satisfy the three constraints in ML. Calculate Period and Deadline under ML Schedulable? Y Apply ML N Apply DS-FP in the new mode Schedulable? Y Success N Error

Utilization-based Scheduling Selection MCR Calculate Period and Deadline under HH Schedulable? Y Apply HH N Calculate Period and Deadline under ML Schedulable? Y Apply ML N Try DS-FP. Use the schedulability test Apply DS-FP in the new mode condition invented in [Han, Chen, Xiong & Mok 08] Schedulable? N Y Success Error

An Example: Mode 1 is schedulable under HH Mode 1: T2: {C2=3, V2=15} T3: {C3=3, V3=47} 0 10 20 30 40 50 Time U HH = 2 C 1 V 1 + 2 C 2 V 2 = 0.525 < 0.828

Switch to DS-FP in mode 2 to increase schedulability Mode 2: T1: {C1=2, V1=6} T2: {C2=3, V2=15} T3: {C3=3, V3=47} Repeating pattern 0 10 20 30 40 50 50 60 70 80 90 100 Time Mode 2 is not schedulable under ML but has a repeating pattern under DS-FP

Switch to ML in mode 3 to improve data quality Mode 3: T1: {C1=2, V1=6} T2: {C2=3, V2=15} T3: {C3=3, V3=49} J 3, 0 completes before V 3 /2 Time 0 10 20 30 40 50 Mode 3 is schedulable under ML but not HH

Scheduling Switch with Validity Constraint Major Challenges The temporal validity of the tasks persistent through the switch could be violated during the scheduling switch. How to choose the switch point to avoid these violations?

Scheduling Switch with Validity Constraint Major Challenges The temporal validity of the tasks persistent through the switch could be violated during the scheduling switch. How to choose the switch point to avoid these violations? Clean Switch There is no outstanding execution from the old task set at the switch point. The new policy can schedule the new task set independently.

Scheduling Switch with Validity Constraint Major Challenges The temporal validity of the tasks persistent through the switch could be violated during the scheduling switch. How to choose the switch point to avoid these violations? Clean Switch There is no outstanding execution from the old task set at the switch point. The new policy can schedule the new task set independently. Non-clean Switch How to schedule the outstanding executions from the old task set?

Search-based Switch Basic Idea: Strictly follows the clean switch requirements. We only need to check the temporal validity at the begin of each idle period. t1: {C1=4, V1=16} t2: {C2=5, V2=26} 0 10 20 28 MCR = 33 Switch Latency T = 17 28 30 t1 = 33 40 t2 = 45 50

Search-based Switch Basic Idea: Strictly follows the clean switch requirements. We only need to check the temporal validity at the begin of each idle period. t1: {C1=4, V1=16} t2: {C2=5, V2=26} 0 10 20 28 MCR = 33 Switch Latency T = 17 28 30 t1 = 33 40 Switch at t1 failed. 50 t2's Validity Deadline

Search-based Switch Basic Idea: Strictly follows the clean switch requirements. We only need to check the temporal validity at the begin of each idle period. t1: {C1=4, V1=16} t2: {C2=5, V2=26} 0 10 20 28 MCR = 33 t2 = 45 Switch Latency T = 17 28 30 t1 = 33 40 Switch at t2 is successful. 50 58

Adjustment-based Switch Basic Ideas: Takes every time point in [t MCR, t MCR + t L ] as the candidate for scheduling switch. Converts the non-clean switch to clean switch scenario through schedule adjustment. Pushes all outstanding executions back to the switch point t w. Adjust the schedule in [t MCR, t w ] backwards from time t w to guarantee the validity constraints. t1: {C1=4, V1=16} t2: {C2=5, V2=26} 0 10 20 28 MCR = 33 Switch Latency T = 17 28 30 40 Each time is a candidate for scheduling switch 50

Adjustment-based Switch Basic Ideas: Takes every time point in [t MCR, t MCR + t L ] as the candidate for scheduling switch. Converts the non-clean switch to clean switch scenario through schedule adjustment. Pushes all outstanding executions back to the switch point t w. Adjust the schedule in [t MCR, t w ] backwards from time t w to guarantee the validity constraints. t1: {C1=4, V1=16} t2: {C2=5, V2=26} 0 10 20 28 MCR = 33 Switch Latency T = 17 28 30 40 50 Switch Point under adjustment- based switch, Succeed. 28 30 40 50

Performance Evaluation Simulation Model and Parameters Single CPU, main memory based RTDBS and up to 10 modes in the system. The number of real-time data objects in the system varies from 1 to 20. The validity length is uniformly distributed from 50 to 150 time units. the computational time is uniformly distributed from 1 to 5 time units. Experiment Design Single scheduling policy vs. Online utilization-based scheduling switch (UBSS). Search-based Switch (SBS) vs. Adjustment-based Switch (ABS). Performance Metrics CPU Utilization, Scheduling Success Ratio, Data Staleness, Scheduling Overhead and Switch Latency.

Success Ratio vs. CPU Utilization Density Factor Success Ratio 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 1.0 0.8 0.6 0.5 0.55 0.57 0.59 0.6 1 2 3 4 5 6 7 8 9 10 0.4 0.2 More-Less DS-FP 0.0 UBSS 1 2 3 4 5 6 7 8 9 10 Mode 0.63 0.61 The success ratio drops along with the increase of the density factor. 0.56 DS-FP and UBSS outperform ML. 0.53 0.45 DS-FP performs the best. The CPU utilization of UBSS is between the ML and DS-FP. CPU Utilization 1.00 0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.60 0.55 0.50 0.45 0.40 Density Factor More-Less UBSS DS-FP 1 2 3 4 5 6 7 8 9 10 Mode

Data Staleness Improvement with UBSS Heavy System Workload vs. Light System Workload Staleness Density Factor 1.00 0.96 0.92 0.88 0.84 0.80 0.76 UBSS 0.72 DS-FP 0.68 1 2 3 4 5 6 7 8 9 10 0.8 0.7 0.6 0.55 0.57 0.59 0.6 0.63 0.61 0.56 0.5 0.53 0.5 0.45 0.4 0.3 0.2 0.1 0.0 1 2 3 4 5 6 7 8 9 10 Mode Staleness Density Factor 1.0 0.9 0.8 0.7 0.6 0.5 0.4 50 40 30 20 10 0 0.45 UBSS DS-FP 1 2 3 4 5 6 7 8 9 10 0.40 0.33 0.3 0.14 0.42 1 2 3 4 5 6 7 8 9 10 0.2 Mode 0.25 0.38 0.50

Scheduling Overhead Calc Cost (Sec) Density Factor 6 5 4 3 2 1 0 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 0.5 DS-FP UBSS 1 2 3 4 5 6 7 8 9 10 0.55 0.57 0.59 0.6 0.63 0.61 0.53 1 2 3 4 5 6 7 8 9 10 Mode 0.56 0.45 DS-FP and UBSS have the same scheduling success ratio. UBSS greatly reduces the online scheduling overhead especially when the density factor is low.

Search-based vs. Adjustment-based Switch Latency Success Ratio 140 120 100 80 60 40 20 0 1.0 0.8 0.6 0.4 SBS ABS 65 70 75 80 85 90 95 100 0.2 SBS 0.0 ABS 65 70 75 80 85 90 95 100 Percentage Switch scenario: DS-FP to ML T k+1 T k and is specified by a given percentage p. ABS always outperforms SBS in terms of the switch success ratio ABS always has lower switch latency.

Conclusion We studied the problem how to maintain the temporal validity of real-time data in the presence of mode changes in flexible real-time systems. We proposed the online utilization-based scheduling switch (UBSS) to get the tradeoff between higher data quality and better schedulability. Two algorithms are proposed to search for the proper switch point online to maintain the data temporal validity during the transition.

Appendix: Search-based Switch Algorithm Alg 1 Search-based Switch Algorithm Input: T k, T k+1, Ψ k, Ψ k+1, the search start time t 0 and t L. Output: t w. 1: for t = t 0 to t 0 + t L do 2: if t = t 1 then 3: // t 1 is the begin point of an idle period 4: f = true; 5: 6: // Whether t is a possible candidate for t w for each τ i T k Tk+1 do 7: t s = release time of τ i s last job in Ψ k; 8: l = time to finish τ i s first job in Ψ k+1; 9: if t t s + l > V i then 10: f = false; 11: if f = true then 12: return t; 13: return no t w exists;

Appendix: Adjust-based Switch Algorithm Alg 1 Adjustment-based Switch Algorithm Input: T k, T k+1, Ψ k, Ψ k+1, t 0 and t L. Output: t w. 1: for t = t 0 to t 0 + t L do 2: // Γi(t) is accumulated outstanding execution at t i 3: if I(t 0, t) < Γi(t) then i 4: continue; 5: else 6: // Adjust the schedule of T k in [t 0, t] 7: f = ScheduleAdjustment (T k, t 0, t); 8: if f = fail then 9: continue; 10: else 11: for each τ i T k Tk+1 do 12: t s = adjusted request time of τ i s last job in Ψ k; 13: l = time to finish τ is first job in Ψ k+1; 14: if t t s + l > V i then 15: // The temporal validity is violated. 16: f = fail; 17: if f = success then 18: return t; 19: return no t w exists;

Future Works Suppose the MCR latency requirement is infinite, if the old and new task sets are schedulable under the old and new scheduling policies respectively, does there exist a proper switch point using SBS or ABS? How to handle the situation when the proper switch point cannot be found? SBS and ABS are both synchronous algorithms. Can we design asynchronous algorithms? If so, how should scheduling switch be conducted?