Aperiodic Task Scheduling



Similar documents
Resource Reservation & Resource Servers. Problems to solve

Improved Handling of Soft Aperiodic Tasks in Offline Scheduled Real-Time Systems using Total Bandwidth Server

Scheduling Aperiodic and Sporadic Jobs in Priority- Driven Systems

Real-Time Scheduling (Part 1) (Working Draft) Real-Time System Example

4. Fixed-Priority Scheduling

Efficient Scheduling of Sporadic, Aperiodic, and Periodic Tasks with Complex Constraints

Performance of Algorithms for Scheduling Real-Time Systems with Overrun and Overload

Predictable response times in event-driven real-time systems

Real- Time Scheduling

Periodic Task Scheduling

3. Scheduling issues. Common approaches /1. Common approaches /2. Common approaches / /13 UniPD / T. Vardanega 23/01/2013. Real-Time Systems 1

Aperiodic Task Scheduling

Real-Time Scheduling 1 / 39

HARD REAL-TIME SCHEDULING: THE DEADLINE-MONOTONIC APPROACH 1. Department of Computer Science, University of York, York, YO1 5DD, England.

Real Time Scheduling Basic Concepts. Radek Pelánek

Using EDF in Linux: SCHED DEADLINE. Luca Abeni

The simple case: Cyclic execution

Handling Sporadic Tasks in Real-time Systems - Combined Offline and Online Approach -

174: Scheduling Systems. Emil Michta University of Zielona Gora, Zielona Gora, Poland 1 TIMING ANALYSIS IN NETWORKED MEASUREMENT CONTROL SYSTEMS

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

An Efficient Non-Preemptive Real-Time Scheduling

A SIX-LEGGED ROBOT: REAL-TIME ISSUES AND ARCHITECTURE. Mauro Marinoni, Alessio Carlini, Giorgio Buttazzo

Lecture 3 Theoretical Foundations of RTOS

Common Approaches to Real-Time Scheduling

Operating System Aspects. Real-Time Systems. Resource Management Tasks

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

Real-Time Software. Basic Scheduling and Response-Time Analysis. René Rydhof Hansen. 21. september 2010

Predictable response times in eventdriven real-time systems

Sporadic Server Revisited

Module 6. Embedded System Software. Version 2 EE IIT, Kharagpur 1

Soft Real-Time Task Response Time Prediction in Dynamic Embedded Systems

Scheduling Sporadic Tasks with Shared Resources in Hard-Real-Time Systems

Quality of Service su Linux: Passato Presente e Futuro

In Proceedings of the First IEEE Workshop on Real-Time Applications, New York, NY, May 1993.

Aperiodic Task Scheduling for Real-Time Systems. Brinkley Sprunt

A Periodic Events - For the Non- Scheduling Server

Real-Time Scheduling and Threads: Basics

Partition Scheduling in APEX Runtime Environment for Embedded Avionics Software

Lec. 7: Real-Time Scheduling

ICS Principles of Operating Systems

Implementing a General Real-Time Scheduling Framework in the RED-Linux Real-Time Kernel

Priority-Driven Scheduling

Scheduling of the Distributed Thread Abstraction with Timing Constraints using RTSJ

SOFTWARE VERIFICATION RESEARCH CENTRE THE UNIVERSITY OF QUEENSLAND. Queensland 4072 Australia TECHNICAL REPORT. No Real-Time Scheduling Theory

Real-time scheduling algorithms, task visualization

Schedulability analysis of distributed real-time systems

IRIS: A new reclaiming algorithm for server-based real-time systems

Effective Scheduling Algorithm and Scheduler Implementation for use with Time-Triggered Co-operative Architecture

Exercises : Real-time Scheduling analysis

REAL TIME OPERATING SYSTEMS. Lesson-18:

Scheduling Real-time Tasks: Algorithms and Complexity

Multi-core real-time scheduling

AN APPROPRIATE ENGINEERING APPROACH

2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput

Hierarchical Real-Time Scheduling and Synchronization

Gravitational task model based bandwidth compression algorithm for adaptive resource management

N. Audsley. A. Burns Department of Computer Science, University of York, UK. ABSTRACT

On-line Scheduling of Real-time Services for Cloud Computing

Overview of Presentation. (Greek to English dictionary) Different systems have different goals. What should CPU scheduling optimize?

Classification - Examples

Keywords: Dynamic Load Balancing, Process Migration, Load Indices, Threshold Level, Response Time, Process Age.

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

POWER-AWARE ONLINE DYNAMIC SCHEDULING FOR MULTIPLE FEASIBLE INTERVALS *

Real-Time (Paradigms) (51)

Chapter 19: Real-Time Systems. Overview of Real-Time Systems. Objectives. System Characteristics. Features of Real-Time Systems

The Matrix - A framework for real-time resource management for video streaming in networks of heterogenous devices

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Integrating job parallelism in real-time scheduling theory

Implementing Real-Time services in MINIX

DYNAMIC SCHEDULING STRATEGIES FOR AVIONICS MISSION COMPUTING. David L. Levine, Christopher D. Gill, and Douglas C. Schmidt

Scheduling Single Machine Scheduling. Tim Nieberg

DP-FAIR: A Simple Model for Understanding Optimal Multiprocessor Scheduling

How To Compare Real Time Scheduling To A Scheduled Scheduler On Linux On A Computer System With A Visualization System

Modular Real-Time Linux

Cache-aware compositional analysis of real-time multicore virtualization platforms

Efficient Scheduling Of On-line Services in Cloud Computing Based on Task Migration

Master thesis. Title: Real-Time Scheduling methods for High Performance Signal Processing Applications on Multicore platform

Designing Fluctronic Real-Time Systems

Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?

An Optimized Load-balancing Scheduling Method Based on the WLC Algorithm for Cloud Data Centers

CPU Scheduling. Core Definitions

Partitioned EDF Scheduling for Multiprocessors using a C=D Scheme

Linux Plumbers API for Real-Time Scheduling with Temporal Isolation on Linux

Commonly Used Approaches to Real-Time Scheduling

Dynamic Integrated Scheduling of Hard Real-Time, Soft Real-Time and Non-Real-Time Processes

Load Balancing and Switch Scheduling

Job Scheduling Model

Rate-Based Resource Allocation Models for Embedded Systems *

Online Supplement for Maximizing throughput in zero-buffer tandem lines with dedicated and flexible servers by Mohammad H. Yarmand and Douglas G.

CPU Scheduling. CPU Scheduling


Schedulability Analysis and Utilization Bounds for Highly Scalable Real-Time Services

Hard Real-Time Reconfiguration Port Scheduling


Real Time Network Server Monitoring using Smartphone with Dynamic Load Balancing

ENERGY SAVING SCHEDULING FOR EMBEDDED REAL-TIME LINUX APPLICATIONS

Advanced Operating Systems (M) Dr Colin Perkins School of Computing Science University of Glasgow

Batch Scheduling of Deteriorating Products

ADAPTIVE LOAD BALANCING ALGORITHM USING MODIFIED RESOURCE ALLOCATION STRATEGIES ON INFRASTRUCTURE AS A SERVICE CLOUD SYSTEMS

On-line scheduling algorithm for real-time multiprocessor systems with ACO

Transcription:

Aperiodic Task Scheduling Gerhard Fohler Mälardalen University, Sweden gerhard.fohler@mdh.se Real-Time Systems Gerhard Fohler 2005

Non Periodic Tasks So far periodic events and tasks what about others? Sporadic (aperiodic, but minimum interarrival time) worst case: all sporadic tasks arrive with highest frequency (with minimum time between arrivals) all other arrival patterns less demanding if we can schedule worst case, we can schedule all other worst case - minimum interarrival time - like periodic task assume sporadic tasks as periodic for schedulability test Real-Time Systems Gerhard Fohler 2005 2

Aperiodic (no limitations on arrival times known) soft: without deadline not much to do from scheduling view firm: with deadline (worst case execution time needs to be known as well) usually all or nothing semantic: when we start task, we want that it runs until completion; else we don t start Real-Time Systems Gerhard Fohler 2005 3

Background Services Fixed priority scheduling, rate monotonic What is the minimum we can do for aperiodic tasks in a periodically scheduled system? Background service: execute aperiodic tasks when no periodic ones are executing no disturbance of periodic tasks (and their feasibility) simple run-time mechanisms queue for periodics queue for aperiodics - FCFS no guarantees Real-Time Systems Gerhard Fohler 2005 4

Polling Server Background service lives from left overs of periodic tasks, without guarantees If enough idle time, ok long response times, although faster service possible How can we provide that at least a certain amount of processing goes to aperiodic tasks? Server task periodic task, whose purpose is to service aperiodic requests as soon as possible period T s computation time C s is called capacity of the server Real-Time Systems Gerhard Fohler 2005 5

Polling server algorithm at periods T s server becomes active and serves aperiodic requests with its capacity C s no aperiodic activities - not execute, waits for next period, capacity lost based on rate monotonic Lehozcky, Sha, Strosnider, Sprunt 987, 989 Real-Time Systems Gerhard Fohler 2005 6

Example Polling Server two tasks, 2 C i T i 4 2 2 6 server C s =2 T S =5 Real-Time Systems Gerhard Fohler 2005 7

server Cs=2 TS=5 2 aper. c=2 c= c=2 c= no no aper cap 0 2 4 6 8 0 2 4 6 8 20 22 24 26 28 time C s 2 Real-Time Systems Gerhard Fohler 2005 8

Aperiodic Guarantee Aperiodic guarantee hard aperiodic task T a, C a, D a worst case: aperiodic request misses the server task has to wait until next instance if C a <= C s, aperiodic request completed within two server periods (one for waiting, one for executing) 2*T s <= D a arbitrary execution times: T s + C a /C s T s <= D a average response time not very good! Real-Time Systems Gerhard Fohler 2005 9

Further FPS Server Algorithms Deferrable Server(Lehozcky, Sha, Strosnider 987, 995) lower bound for periodic tasks Priority exchange (Lehozcky, Sha, Strosnider 987) Sporadic server Sprunt, Sha, Lehozcky 989 replenishes capacity only after aperiodic execution optimum algorithm does not exist! Tia, Liu, Shankar 995 proof that with static priority assignment, no algorithm exists to minimize response time Real-Time Systems Gerhard Fohler 2005 0

Dynamic Priority Servers EDF based Dynamic priority exchange server Spuri, Buttazzo 994, 996 like rate monotonic priority exchange, but for EDF Dynamic sporadic server Spuri, Buttazzo 994, 996 Earliest deadline late server Chetto, Chetto 989 Real-Time Systems Gerhard Fohler 2005

Total bandwidth server Spuri, Buttazzo 994, 996 response time dependent on server period: shorter periods have shorter response times but higher overhead how else shorter response times? change the deadline of the aperiodic to earlier time (its EDF here, so it will get serviced earlier) but make sure that total load of aperiodics does not exceed maximum value (bandwidth) U s Real-Time Systems Gerhard Fohler 2005 2

How can we calculate minimum deadline for U S? assume we have all CPU for us: dl = C U U t C t+c 0.5 U S t C t+2*c Real-Time Systems Gerhard Fohler 2005 3

k th aperiodic request arrival time r k computation time c k deadline d k server utilization U S d k = max( r k, d k- ) + C k /U s d 0 = 0 uses all bandwidth of server very simple run-time mechanism no extra server task schedulability U p + U s <= Sum of periodic load and bandwidth of server less or equal. Real-Time Systems Gerhard Fohler 2005 4

Example Total Bandwidth Server periodic tasks (3,6), 2 (2,8) TBS U s = - U p = 0.25 2 aper. dl = 3+/0.25=7 2 dl 3 = max(4,7)+/0.25=2 0 2 4 6 8 0 2 4 6 8 20 22 24 26 28 time dl 2 = 9+2/0.25=7 Real-Time Systems Gerhard Fohler 2005 5

Total Bandwith Server - Comments based on U s not actual periodic load worst case c Real-Time Systems Gerhard Fohler 2005 6

Total Bandwith Server - Comments TBS assigns deadlines based on maximum U s (not actual load) d k = max( r k, d k- ) + C k /U s, d 0 = 0 U s =0.25 aper. dl = 6+/0.25=4 0 2 4 6 8 0 2 4 6 8 20 22 24 26 28 time Real-Time Systems Gerhard Fohler 2005 7

TB* Buttazzo, Sensini - 997 assigns deadlines d k first according to TBS then shortens, as much as periodics allow new d = f k k finishing time according to EDF schedule, including periodics apply recursively maintains schedulability, since order maintained complexity, many steps Real-Time Systems Gerhard Fohler 2005 8

Constant Bandwidth Server Abeni and Buttazzo, 998 designed for multimedia applications sporadic (hard) tasks soft tasks: mean execution, interarrival times, not fixed periodic tasks assign maximum bandwidth of CPU to each soft task handles overload of aperiodics limited by assigned bandwidth might slow down, but not impair effect other tasks EDF based Real-Time Systems Gerhard Fohler 2005 9

CBS Definitions task i sequence of jobs J i,j r i,j request, arrival time of the j th job of task I hard task (C i,t i ) C i worst case execution time T i minimum interarrival time deadline equal to next period: d i,j = r i,j + T i soft task (C i,t i ) C i mean execution time T i desired interarrival time soft deadline equal to next period: d i,j = r i,j + T i Real-Time Systems Gerhard Fohler 2005 20

c S budget (Q S,T S ) Q S maximum budget T S period of server U S = Q S/ T S server bandwidth d S,k deadline associated to server initial d S,0 =0 job J i,j comes in, is served, assigned dynamic deadline d i,j equal to current server deadline d S,k job executes, server budget c s decreased Real-Time Systems Gerhard Fohler 2005 2

c S =0: budget recharged to maximum Q S new server deadline: d s,k+ =d s,k +T S J i,j arrives, CBS active (jobs pending): put in queue J i,j arrives, CBS idle: c S (d s,k - r i,j )*U S : new deadline d s,k+ = r i,j + T S c S recharged to Q S else job served with last server deadline d s,k job finishes: next job in queue at any time, job assigned last deadline generated by server Real-Time Systems Gerhard Fohler 2005 22

Example CBS (2,3) hard 2 soft c =3 c s (d s,0 - r )*U S :d s, =r +T S =9 c 2 =2 c s =<(23-7)*2/7=2/7 no new deadline server active - queue c 3 = CBS r r 2 r 3 c S = 0:d S,2 =d s, +T S =6 c S = 0:d S,3 =d s,2 +T S =23 (2,7) 0 2 4 6 8 0 2 4 6 8 20 22 24 26 28 time Real-Time Systems Gerhard Fohler 2005 23

limits impact harm by ill behaved aperiodics, e.g., exec time overrun various improvements several servers capacity exchange feedback control.. Real-Time Systems Gerhard Fohler 2005 24

Articles TBS: Spuri, Buttazzo Efficient Aperiodic Service under Earliest Deadline Scheduling Proceedings of the 5th IEEE Real-Time System Symposium (RTSS 94), Portorico, pp. 2-2, December 994 CBS: L. Abeni and G. Buttazzo, "Integrating Multimedia Applications in Hard Real-Time Systems", Proceedings of the IEEE Real-Time Systems Symposium, Madrid, Spain, pp. 4-3, December 998. Real-Time Systems Gerhard Fohler 2005 25

Schedulability Analysis First show that aperiodic load executed not exceeds U S of server Lemma: In each interval of time [t,t 2 ], if C ape is the total execution time demanded by aperiodic requests arrived at t or later and served with deadlines less than or equal to t 2, then Proof: by definition: C ape (t 2 - t ) U S C ape C k t rk, dk t 2 Real-Time Systems Gerhard Fohler 2005 26

TB* uses periodic interference can now calculate it (formulae for completeness only) I f (t, d k s) = n i max 0, d s k next T i _ r ( t) i C i next_r i (t) time at which next instance of I after t starts Real-Time Systems Gerhard Fohler 2005 27

TBS assigns deadlines in increasing order, therefore there must exist two aperiodic requests with indeces k and k 2 such that k C ape k k 2 k C k k k t 2 rk, d k t 2 k 2 C k C [ dk max( rk, dk k k k )] * U [ max( r, d k k k d )]* U 2 S S ( t t ) * 2 U S Real-Time Systems Gerhard Fohler 2005 28

Proof main result: Theorem: Given a set of n periodic tasks with processor utilization U p and a TBS with processor utilization of U S, the whole set is schedulable by EDF if and only if U p + U S Proof: If: assume U p + U S plus overflow at time t overflow preceded by continuous utilization from a point t on (t < t), only instances of tasks ready at t or later and having deadlines less than or equal to t are run C total execution time demanded by these instances since there is overflow at t: t - t < C Real-Time Systems Gerhard Fohler 2005 29

Real-Time Systems Gerhard Fohler 2005 30 we also know that ape i n i i C C T t t C * ' S i n i i U t t C T t t ) * ( * ' ' ) )*( ( ' U p U S t t it follows: U p +U S > # contradiction

only if: assume aperiodic request enters periodically with period T S and execution time C S =T S U S, then server behaves like periodic task total utilization of processor is then U p +U S if task set schedulable: U P +U S Real-Time Systems Gerhard Fohler 2005 3