Real Time Scheduling Basic Concepts. Radek Pelánek



Similar documents
Aperiodic Task Scheduling

Periodic Task Scheduling

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

Common Approaches to Real-Time Scheduling

Classification - Examples

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

Introduction to Scheduling Theory

Scheduling Real-time Tasks: Algorithms and Complexity

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

Lecture 3 Theoretical Foundations of RTOS

Scheduling Single Machine Scheduling. Tim Nieberg

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

The simple case: Cyclic execution

Aperiodic Task Scheduling

Predictable response times in event-driven real-time systems

Today. Intro to real-time scheduling Cyclic executives. Scheduling tables Frames Frame size constraints. Non-independent tasks Pros and cons

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

4. Fixed-Priority Scheduling

Process Scheduling. Process Scheduler. Chapter 7. Context Switch. Scheduler. Selection Strategies

REAL TIME OPERATING SYSTEMS. Lesson-18:

Real- Time Scheduling

Multi-core real-time scheduling

Exercises : Real-time Scheduling analysis

Priority-Driven Scheduling

Scheduling Aperiodic and Sporadic Jobs in Priority- Driven Systems

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

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

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

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

A Survey of Fitting Device-Driver Implementations into Real-Time Theoretical Schedulability Analysis

W4118 Operating Systems. Instructor: Junfeng Yang

Commonly Used Approaches to Real-Time Scheduling

ICS Principles of Operating Systems

Announcements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading

Operating Systems. III. Scheduling.

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

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

CPU Scheduling. CPU Scheduling

Scheduling Shop Scheduling. Tim Nieberg

Operating Systems Concepts: Chapter 7: Scheduling Strategies

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

Abstract Title: Planned Preemption for Flexible Resource Constrained Project Scheduling

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

Job Scheduling Model

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

Real-time scheduling algorithms, task visualization

Real-Time Scheduling 1 / 39

Real Time Database Systems

AN APPROPRIATE ENGINEERING APPROACH

Using EDF in Linux: SCHED DEADLINE. Luca Abeni

A STUDY OF TASK SCHEDULING IN MULTIPROCESSOR ENVIROMENT Ranjit Rajak 1, C.P.Katti 2, Nidhi Rajak 3

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

Hard Real-Time Reconfiguration Port Scheduling

Quality of Service su Linux: Passato Presente e Futuro

CPU Scheduling. Multitasking operating systems come in two flavours: cooperative multitasking and preemptive multitasking.

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

/ Operating Systems I. Process Scheduling. Warren R. Carithers Rob Duncan

Operatin g Systems: Internals and Design Principle s. Chapter 10 Multiprocessor and Real-Time Scheduling Seventh Edition By William Stallings

Scheduling Algorithms for Real-Time Systems

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

Cloud Management: Knowing is Half The Battle

Production Planning Solution Techniques Part 1 MRP, MRP-II

Scheduling Resources and Costs

Introduction to production scheduling. Industrial Management Group School of Engineering University of Seville

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

Dimensioning an inbound call center using constraint programming

Long-term monitoring of apparent latency in PREEMPT RT Linux real-time systems

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

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Factors to Describe Job Shop Scheduling Problem

4.2 Description of the Event operation Network (EON)

Clustering and scheduling maintenance tasks over time

A Computer Application for Scheduling in MS Project

ESQUIVEL S.C., GATICA C. R., GALLARD R.H.

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

Completely Fair Scheduler and its tuning 1

Global Multiprocessor Real-Time Scheduling as a Constraint Satisfaction Problem

CHAPTER 1. Basic Concepts on Planning and Scheduling

The Trip Scheduling Problem

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

Discrete-Event Simulation

4 The M/M/1 queue. 4.1 Time-dependent behaviour

Transcription:

Real Time Scheduling Basic Concepts Radek Pelánek

Basic Elements Model of RT System abstraction focus only on timing constraints idealization (e.g., zero switching time)

Basic Elements Basic Notions task process, something that needs to be done (sequentially) job a) same as task, b) task is a series of jobs (i.e., periodic task) resource active (processor), passive (e.g., mutex, file, database lock) schedule assignments of resources to tasks scheduling algorithm creates schedule

Basic Elements Basic Notions II feasible schedule all tasks can be completed according to a set of specified constraints schedulable set of tasks there exists at least one algorithm that can produce feasible schedule

Basic Elements Model of Execution

Basic Elements Preemption Preemption temporarily interrupting a task (without requiring its cooperation), with the intention of resuming the task at a later time Why preemption?

Basic Elements Preemption Reasons for preemption (examples): different levels of criticality (e.g., brakes control vs. radio tuning) more efficient schedules

Example A Simple Case set of tasks J = {J 1,..., J n } 1 processor no other resources schedule: function σ : R + N σ(t) = k, k > 0 means that the task J k is active at time t σ(t) = 0 means that the processor is idle

Example Example of a Schedule

Example Example of a Preemptive Schedule

Timing Parameters Basic Parameters arrival time a i time when a task becomes ready for execution also denoted release time, request time: r i computation time C i time necessary for completion of a task absolute deadline d i time before which a task should be completed start time s i time at which a task starts its execution finishing time f i time at which a task finishes its execution criticality typically hard/soft

Timing Parameters Illustration of Timing Parameters

Timing Parameters Derived Parameters relative deadline D i = d i a i response time R i = f i a i lateness L i = f i d i delay of a task (can be negative) tardiness (exceeding time) E i = max(0, L i ) slack time (laxity) X i = d i a i C maximum time a task can be delayed on its activation to complete within deadline

Timing Parameters Example J 1 J 2 J 3 a i 1 2 2 C i 2 2 3 d i 6 5 11 determine slack time of each job find a feasible schedule (with, without preemption) determine response time, lateness of each job (in your schedule)

Timing Parameters Periodicity periodic infinite sequence of identical jobs, activated at a constant rate; denoted τ i phase φ i activation time of the first job period T, activation time of the k-th job is φ i + (k 1) T i aperiodic a single job, or a sequence without regular activation, denoted J i sporadic: consecutive jobs separated by minimum inter-arrival time

Timing Parameters Periodicity: Examples

Precedence Constraints Precedence Relations used to capture dependencies among tasks described by precedence graph J a < J b means J a is a predecessor of J b J a J b means J a is an immediate predecessor of J b

Resource Constraints Resources resource something needed to advance execution of a task shared resource resource used by several tasks mutually exclusive resource shared resource that can be used by only one task at a time critical section piece of code executed under mutual exclusion constraint

Resource Constraints Blocking on Shared Resources

Resource Constraints Task Status

Definition General Problem Input set of tasks J = {J 1,..., J n } set of processors P = {P 1,..., P m } set of resources R = {R 1,..., R r } constraints: timing, precedence,... Output Assignment of processor P and resources R to tasks from J such that the given constraints are satisfied. In general NP-complete.

Examples Example 1 5 periodic tasks, relative deadline D i = period T i, phase of all tasks is 0 A B C D E T i 2 2 2 8 8 C i 1 1 1 6 6 Is there a feasible schedule on three processors (with preemption, without preemption).

Examples Example 2 9 tasks, arrival time 0, deadline 12, computation time: A B C D E F G H J C i 3 2 2 2 4 4 4 4 9 precedence constraints: A J; D E, F, G, H Is there a feasible schedule on three processors (without preemption)?

Examples Example 2 9 tasks, arrival time 0, deadline 12, computation time: A B C D E F G H J C i 3 2 2 2 4 4 4 4 9 precedence constraints: A J; D E, F, G, H Is there a feasible schedule on three processors (without preemption)? Assume that jobs have priorities p A > p B >... > p J. What is the schedule based on priorities? Are all deadlines met?

Classification Preemption preemptive running task can be interrupted non-preemptive task, once started, is executed by processor until completion

Classification Static vs Dynamic static scheduling decision based on fixed parameters, assigned before their activation typical example: highest priority scheduling dynamic scheduling decisions based on dynamic parameters that may change during system evolution typical example: earliest deadline scheduling

Classification Off line vs On line off line the schedule is generated for the entire task set before the task activations (must be static) on line scheduling decisions are taken at runtime every time a new task enters the system (may be static or dynamic)

Classification Optimal vs Heuristic optimal algorithm minimizes a given cost function; if no cost function is given then it always finds a feasible schedule if there exists one heuristic algorithm tries to find feasible schedule; no guarantees of optimality

Performance Evaluation Cost Functions for Tasks

Performance Evaluation Cost Functions for Schedule average response time total completion time maximum lateness number of late tasks 1 n Σn i=1(f i a i ) max i (f i ) min i (a i ) max i (f i d i )

Performance Evaluation Example: Different Cost Functions All jobs have arrival time 0. J 1 J 2 J 3 J 4 J 5 C i 6 4 4 3 9 d i 3 8 13 16 24 Find a schedule which: 1 minimizes the number of late tasks 2 minimizes the maximum lateness

Performance Evaluation Example: Different Cost Functions

Performance Evaluation Outlook we will study algorithms for specific scheduling problems given: type of tasks, type of schedule, cost function find: scheduling algorithm