On-line scheduling of periodic tasks in RT OS

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

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

CEC 450 Real-Time Systems

Real-Time Systems. Event-Driven Scheduling

Scheduling Algorithms for Multiprogramming in a Hard Realtime Environment

Andrew Morton University of Waterloo Canada

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

CIS 4930/6930: Principles of Cyber-Physical Systems

Real-Time Scheduling and Resource Management

Real-Time Systems. Event-Driven Scheduling

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

Embedded Systems Development

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

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

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

Real-Time and Embedded Systems (M) Lecture 5

CEC 450 Real-Time Systems

CPU SCHEDULING RONG ZHENG

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

Embedded Systems 14. Overview of embedded systems design

Real-time Systems: Scheduling Periodic Tasks

Exam Spring Embedded Systems. Prof. L. Thiele

AS computer hardware technology advances, both

Rate Monotonic Analysis (RMA)

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

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

Periodic scheduling 05/06/

Networked Embedded Systems WS 2016/17

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

Static priority scheduling

Scheduling Slack Time in Fixed Priority Pre-emptive Systems

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

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

EDF and RM Multiprocessor Scheduling Algorithms: Survey and Performance Evaluation

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

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

There are three priority driven approaches that we will look at

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

Last class: Today: Threads. CPU Scheduling

Task Models and Scheduling

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

Module 5: CPU Scheduling

Chapter 6: CPU Scheduling

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

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

CPU Scheduling Exercises

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

EDF Feasibility and Hardware Accelerators

CPU scheduling. CPU Scheduling

2/5/07 CSE 30341: Operating Systems Principles

Schedulability of Periodic and Sporadic Task Sets on Uniprocessor Systems

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

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

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

CHAPTER 5 - PROCESS SCHEDULING

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

Lec. 7: Real-Time Scheduling

Load Regulating Algorithm for Static-Priority Task Scheduling on Multiprocessors

Schedulability analysis of global Deadline-Monotonic scheduling

TEMPORAL WORKLOAD ANALYSIS AND ITS APPLICATION TO POWER-AWARE SCHEDULING

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

Design of Real-Time Software

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

Tardiness Bounds under Global EDF Scheduling on a Multiprocessor

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

Non-preemptive Scheduling of Distance Constrained Tasks Subject to Minimizing Processor Load

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

Lecture: Workload Models (Advanced Topic)

A Utilization Bound for Aperiodic Tasks and Priority Driven Scheduling

Scheduling periodic Tasks on Multiple Periodic Resources

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song

Real Time Operating Systems

LSN 15 Processor Scheduling

CSE 380 Computer Operating Systems

Uniprocessor real-time scheduling

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

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

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

Clock-driven scheduling

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

Selected solutions for. TDDD07 Real-time Systems

Aperiodic Task Scheduling

A FAST MATRIX-ANALYTIC APPROXIMATION FOR THE TWO CLASS GI/G/1 NON-PREEMPTIVE PRIORITY QUEUE

Comp 204: Computer Systems and Their Implementation. Lecture 11: Scheduling cont d

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Real Time Operating Systems

Process Scheduling. Process Scheduling. CPU and I/O Bursts. CPU - I/O Burst Cycle. Variations in Bursts. Histogram of CPU Burst Times

Rate-monotonic scheduling on uniform multiprocessors

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

Deadline-driven scheduling

Multiprocessor EDF and Deadline Monotonic Schedulability Analysis

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

CPU Scheduling. Heechul Yun

Scheduling Lecture 1: Scheduling on One Machine

On the Design and Application of Thermal Isolation Servers

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

CPU Scheduling. CPU Scheduler

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

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

Transcription:

On-line scheduling of periodic tasks in RT OS Even if RT OS is used, it is needed to set up the task priority. The scheduling problem is solved on two levels: fixed priority assignment by RMS dynamic scheduling by priority based preemptive RT OS

T 1 T 2 T 3 Typical application RT deadline it is assumed to be equal to the release time of the next period periodic tasks (aperiodic tasks are scheduled using so called servers ) Example 1: 100 200 300 150 300 350 Task T 1 : processing time..p 1 =40; period..τ 1 =100; Task T 2 : p 2 =40; τ 2 =150; Task T 3 : p 3 =100; τ 3 =350;

Rate Monotonic Scheduling (RMS) Basic assumptions: tasks are executed by priority based preemptive kernel deadline is at the end of each period RMS: Assign fixed priorities to the tasks according to their request rate (inverse to their period ~ deadline). Highest priority is assigned to the task with highest frequency. Schedulability: n periodic and independent tasks are completed before their deadlines Optimality: RMS is optimal among all fixed priority algorithms. There is no fixed priority algorithms able to schedule an application that is not schedulable by RMS

Solution to Example 1 using RMS T 1 T 2 100 200 300 T 3 150 300 350 deadline of previous period ~ release time of the next period) completion time

Processor utilization factor Processor utilization factor U is fraction of processor time spent by execution of n tasks. U = n p i i= 1 τ i Upper bound of utilization factor U ub (T,A): is the maximum value of U below which is the task set T schedulable by algorithm A.

Least upper bound U lub (A) of utilization factor, is the minimum of utilization factor over all task sets that fully utilize processor: U lub (A) = min T U ub (T,A) T 1 U ub1 U T 2 U ub2 U T 3 U ub3 U T k U lub U ubk l U Conclusion: Schedulable? Non schedulable

Utilization bound theorem for RMS Sufficient condition: Any set T of n independent periodic tasks is schedulable by RMS if: U(n) n(2 1/n -1) n 1 2 3 4 5 6 7 8 9 10 U lub 1,00 0,828 0,780 0,757 0,743 0,735 0,729 0,724 0,721 0,718 U lub (RMS)= lim n-> n(2 1/n -1) = ln 2 = 0.69

Utilization bound theorem is pesimistic In case of example 1: Task T 1 : p 1 =40; τ 1 =100; 0.4 Task T 2 : p 2 =40; τ 2 =150; 0.267 Task T 3 : p 3 =100; τ 3 =350; 0.286 U = 0.4 + 0.267 + 0.28 = 0.953 exceeds Utilization bound theorem since 0.953 3(2 1/3-1) = 0.780 T 3 has lower priority than T 1 and T 2 (since there are no inter-task communications, T 3 cannot influence execution of T 1 and T 2 ), we can try Utilization bound theorem for 2 tasks: T 1 and T 2 do not exceed since: 0.667 2(2 1/2-1)=0.828 To test schedulability of T 3 we will use Completion time theorem

Completion time theorem necessary and sufficient condition for the set of independent periodic tasks using RMS worst case situation all tasks start at the same time (worst phasing). It is sufficient to examine one period of given task T x. set of examined dates consists of the end of T x period and each end of higher task periods. at each examined date we check whether all tasks have been compeeted as often as they have been released

In the case of example 1: T 1 1 3 T 2 100 200 300 2 4 T 3 150 300 5 deadline completion time 350 1,, 4 5 ends of periods of T 1 a T 2 end of period of T 3

It is not needed to derive a Gantt chart for tis analysis. Task T 3 is schedulable iff at least one of the following conditions hold: 1 p 1 + p 2 + p 3 τ 1 40+40+100>100 NO 2 2p 1 + p 2 + p 3 τ 2 80+40+100>150 NO 3 2p 1 + 2p 2 + p 3 2τ 1 80+80+100>200 NO 4 3p 1 + 2p 2 + p 3 2τ 2 120+80+100=300 YES 5 4p 1 + 3p 2 + p 3 τ 3 160+120+100>350 NO task T 3 is schedulable since at the worst phasing it is completed in time 300

RMA Extension by inter-tasks communication When tasks share resource with mutual access (critical section), the task, which is inside critical section can cause blocking of the higher priority task waiting to enter critical section. When the blocking of tasks is bounded, we can compute the longest duration of task blocking B i and take it into account in generalized utilization bound theorem and in generalized completion time theorem. very pessimistic result

RMA Extension by aperiodic tasks - Fixed priority servers Fixed priority servers Assumption: neither periodic nor aperiodic tasks can be released infinitely often to consume infinite amount of the processor time Solutions: they can run on the background (lowest priority) using servers the server (periodic task) is ready to use its capacity p S within period τ S

Polling server at the moment of its activation, the server serves already released aperiodic tasks using its capacity p S. if there is no aperiodic task at this moment, then the server capacity is erased (as in the restaurant, when a waiter finds out that there is nobody requiring its service) Example 2: two periodic tasks + polling server (priority by RMS) T 1 p i τ i T 1 1 4 T 2 2 6 T 2 aperiodic requests p S τ S server 2 5 p S 2 1

Defferable server the server serves aperiodic tasks using its capacity p S unused capacity is kept until the end of the period (patient waiter) Ex. 3: two periodic tasks + defferable server (priority by RMS) T 1 p i τ i T 1 1 4 T 2 2 6 T 2 aperiodic requests server p S 2 τ S 5 p S 2 1

RMS - conclusion Rate monotonic scheduling is good to specify the task priorities for preemptive kernels Good behavior in overload (unexpected prolongation of p i ) lowest priority task deadline is exceeded first Extension by inter-task communication is too pessimistic

EDF in on-line scheduling EDF can be used as on-line scheduling rule (can be seen as dynamic priority assignment) optimality: since EDF does not make any specific assumption on the periodicity of the tasks, the optimality proven for aperiodic tasks also holds for periodic tasks Theorem: A set of periodic independent tasks is schedulable with EDF if and only if: U n = τ i= 1 p i i 1