There are three priority driven approaches that we will look at

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

Real-Time Systems. Event-Driven Scheduling

Real-Time Systems. Event-Driven Scheduling

Priority-driven Scheduling of Periodic Tasks (1) Advanced Operating Systems (M) Lecture 4

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

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

Real-Time and Embedded Systems (M) Lecture 5

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

Andrew Morton University of Waterloo Canada

Deadline-driven scheduling

Real-time Systems: Scheduling Periodic Tasks

Embedded Systems Development

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

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

Aperiodic Task Scheduling

Task Models and Scheduling

Real-Time Scheduling

Networked Embedded Systems WS 2016/17

Embedded Systems 14. Overview of embedded systems design

CIS 4930/6930: Principles of Cyber-Physical Systems

Clock-driven scheduling

EDF Feasibility and Hardware Accelerators

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

Real-time operating systems course. 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm

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

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

Static priority scheduling

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

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

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

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

A Framework for Automated Competitive Analysis of On-line Scheduling of Firm-Deadline Tasks

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

Task Reweighting under Global Scheduling on Multiprocessors

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

Schedulability analysis of global Deadline-Monotonic scheduling

Schedule Table Generation for Time-Triggered Mixed Criticality Systems

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

Scheduling Lecture 1: Scheduling on One Machine

Cyclic Schedules: General Structure. Frame Size Constraints

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

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

Multiprocessor Real-Time Scheduling Considering Concurrency and Urgency

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

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

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

On the Soft Real-Time Optimality of Global EDF on Multiprocessors: From Identical to Uniform Heterogeneous

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

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

An Improved Schedulability Test for Uniprocessor. Periodic Task Systems

Scheduling Lecture 1: Scheduling on One Machine

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

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

Schedulability of Periodic and Sporadic Task Sets on Uniprocessor Systems

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

Real-Time Scheduling and Resource Management

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

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

Scheduling Algorithms for Multiprogramming in a Hard Realtime Environment

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

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

Tardiness Bounds under Global EDF Scheduling on a Multiprocessor

Scheduling Slack Time in Fixed Priority Pre-emptive Systems

EDF and RM Multiprocessor Scheduling Algorithms: Survey and Performance Evaluation

Rate-monotonic scheduling on uniform multiprocessors

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

A Dynamic Real-time Scheduling Algorithm for Reduced Energy Consumption

Task assignment in heterogeneous multiprocessor platforms

Algorithm Design. Scheduling Algorithms. Part 2. Parallel machines. Open-shop Scheduling. Job-shop Scheduling.

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

Design of Real-Time Software

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

Lightweight Real-Time Synchronization under P-EDF on Symmetric and Asymmetric Multiprocessors

CS 374: Algorithms & Models of Computation, Spring 2017 Greedy Algorithms Lecture 19 April 4, 2017 Chandra Chekuri (UIUC) CS374 1 Spring / 1

Laxity dynamics and LLF schedulability analysis on multiprocessor platforms

Predictability of Least Laxity First Scheduling Algorithm on Multiprocessor Real-Time Systems

Simple Dispatch Rules

On-line scheduling of periodic tasks in RT OS

Tardiness Bounds under Global EDF Scheduling on a. Multiprocessor

How much can lookahead help in online single machine scheduling

An Improved Schedulability Test for Uniprocessor Periodic Task Systems

Runtime feasibility check for non-preemptive real-time periodic tasks

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

CHAPTER 5 - PROCESS SCHEDULING

Exact speedup factors and sub-optimality for non-preemptive scheduling

Uniprocessor real-time scheduling

Real-Time Systems. LS 12, TU Dortmund

Load Regulating Algorithm for Static-Priority Task Scheduling on Multiprocessors

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

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

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

An Optimal Real-Time Scheduling Algorithm for Multiprocessors

CSE 380 Computer Operating Systems

Lightweight Real-Time Synchronization under P-EDF on Symmetric and Asymmetric Multiprocessors

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

Contention-Free Executions for Real-Time Multiprocessor Scheduling

Average-Case Performance Analysis of Online Non-clairvoyant Scheduling of Parallel Tasks with Precedence Constraints

Tardiness Bounds for EDF Scheduling on Multi-Speed Multicore Platforms

On Non-Preemptive Scheduling of Periodic and Sporadic Tasks

Multiprocessor Scheduling of Age Constraint Processes

Transcription:

Priority Driven Approaches There are three priority driven approaches that we will look at Earliest-Deadline-First (EDF) Least-Slack-Time-first (LST) Latest-Release-Time-first (LRT) 1

EDF Earliest deadline first (EDF) assigns higher priority to jobs that have earlier deadlines. In the jobs below the execution time is given first followed by the release time then deadline, 3 (0,6], 2 (2,8], 2 (2,7] 0 2 4 6 8 2

LST Least slack time first (LST) assigns higher priority to jobs that have lower slack times. At any time, t, the slack (or laxity) of a job is equal to d t minus the time required to complete the remaining portion of the job, 3 (0,6], 2 (2,8], 2 (2,7] 0 2 4 6 8 3

LRT Latest release time (LRT), or reverse EDF, treats release times as deadlines and deadlines as release times. It schedules the jobs backwards, starting from the latest deadline of all jobs. The later the release time, the higher the priority. It is not a true priority driven algorithm, 3 (0,6], 2 (2,8], 2 (2,7] 0 2 4 6 8 4

EDF The EDF algorithm is optimal. When preemption is allowed and jobs do not content for resources, the EDF algorithm can produce a feasible schedule of a set J of jobs with arbitrary release times and deadlines on a processor if and only if J has feasible schedules Proof: any feasible schedule of J can be systematically transformed into and EDF schedule 5

EDF: Proof of Optimality I 1 I 2 J i J k (a) r k d k d i J k J k J i (b) J k J k J i (c) 6

EDF: Proof of Optimality There are two cases to consider Case 1 r k is later than the end of I 1 nothing to do. Jobs are scheduled according to EDF Case 2 r k is before the beginning of I 1, (a) swap J k with J i If I1 is shorter than I2, do as in previous slide, (b) If I1 is longer than I2, Jk and Ji scheduled in I 1 and rest of J i in I 2 repeat for all such pairs eliminate idle intervals, as in previous slide, (c) 7

EDF: Proof of Optimality The preemptive EDF algorithm can always produce a feasible schedule as long as feasible schedules exist follows straightforwardly from the fact that every feasible schedule can be transformed into a preemptive EDF schedule If the EDF algorithm fails to produce a feasible schedule, then no feasible schedule exists 8

non optimality of EDF EDF is optimal only when preemption is allowed r 1 r 2 r 3 J 3 misses its deadline 0 0 2 4 6 8 10 12 14 2 4 6 8 10 12 14 r 1, r 2, r 3 = 0, 2, 4 e 1, e 2, e 3 = 3, 6, 4 d 1, d 2, d 3 = 10, 14, 12 9

non optimality of EDF EDF is optimal only for single processor systems misses its deadline P 1 0 2 4 6 P 2 P 1 r 1, r 2, r 3 = 0, 0, 0 e 1, e 2, e 3 = 1, 1, 5 d 1, d 2, d 3 = 1, 2, 5 0 2 4 6 P 2 10

Priority driven approach Pros Easy to implement run-time overhead small minimal information needed Cons Timing behaviour is non-deterministic when job parameters vary, i.e. it is difficult to validate deadlines 11

The validation problem Given: the set of jobs, the set of resources, and the scheduling algorithm to allocate processors and resources to jobs, determine whether all the jobs meet their deadlines 12

Scheduling anomalies Consider a system of four jobs with priority order,, and J 4, with having the highest priority Jobs may be preempted but never migrated, i.e. once a job is started on a processor it is constrained to complete on that processor 's deadline can vary Execution times, deadlines and release times are on the next slide 13

Scheduling anomalies r 1 d 1 [e i-, e i+ ] J 4 0 10 5 0 10 [2, 6] 4 15 8 0 20 10 14

Scheduling anomalies Problem: Does the system meet all the deadlines and is the completion time jitter (i.e., the difference between the latest and earliest completion times) of every job is no more than 4. 15

0 5 10 15 20 P 1 P 2 J 4 6 16 (a) P 1 P 2 J 4 2 20 J 4 (b) P 1 P 2 J 4 3 21 J 4 (c) P 1 P 2 J 4 (d) 5 15

Scheduling anomalies Priority driven schedules (a) and (b) are for e 2 = 6 and e 2 = 2 respectively. One might say that all jobs meet their deadlines and completion time jitter is small As far as J 4 is concerned, worst case schedule is (c), with e 2 = 3, J 4 misses its deadline Best case schedule, wrt J 4 is (d), however the completion time jitter = 5 (>4) 17

Scheduling anomalies Conclusion to find the best-case and worst-case schedules, we must try all possible values of e 2 A scheduling anomaly is an unexpected timing behaviour of priority driven system 18

Off-line vs On-line scheduling Off-line scheduling algorithm Pros inflexible can be applied only to deterministic systems Cons complexity of the algorithm can be ignored 19

Off-line vs On-line scheduling On-line scheduling algorithm Pros can accommodate dynamic variations in user demands and resource availability requires no knowledge of jobs that will be released in the future Cons Without prior knowledge about future jobs, the scheduler cannot make optimal scheduling decisions requires an acceptance test for new jobs 20

On-line scheduling r 1, r 2 = 0, x where x < 1 and is non preemptable e 1, e 2 = 1, 1-x d 1, d 2 = 2, 1 x 0 1 2 on-line scheduler: will miss deadline 0 1 2 clairvoyant scheduler: delays until J2 released 21

On-line scheduling r 1, r 2 = 0, x where x < 1 and is non premptable e 1, e 2 = 1, 1 d 1, d 2 = 2, 2 x 0 1 2 on-line scheduler: will miss deadline 0 1 2 clairvoyant scheduler: starts first 22

Overloaded systems A system is said to be overloaded when the jobs offered to the scheduler cannot be feasibly scheduled even by a clairvoyant scheduler When a system is not overloaded, an optimal on-line scheduling algorithm is one that always produces a feasible schedule of all offered jobs No optimal on-line schedule exists when some of the jobs are non preemptable 23

Performance measure The value of a job v(j) = e j if it completes by the deadline, otherwise v(j) = 0 The value of a schedule of a sequence of jobs V son = v(j); for all j An on-line algorithm has a competive factor c, if and only if V son = c * V clair Using this measure, EDF and LST are optimal when the jobs are preemptable and no overload exists 24

Performance measure EDF and LST both have competive factors of 1, under no overload Under overload, both of their competive factors are 0 e r 1, r 2 e 1, e 2 d 1 = 0, e = 2e, e = e, D 1 = e 0 2e Maximum possible competive factor achievable is e 25