Common Approaches to Real-Time Scheduling



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

Commonly Used Approaches to Real-Time Scheduling

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

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

Priority-Driven Scheduling

Real Time Scheduling Basic Concepts. Radek Pelánek

Periodic Task Scheduling

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

Lecture 3 Theoretical Foundations of RTOS

Aperiodic Task Scheduling

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

Real-Time Task Scheduling for Energy-Aware Embedded Systems 1

Scheduling Aperiodic and Sporadic Jobs in Priority- Driven Systems

Classification - Examples

Scheduling Real-time Tasks: Algorithms and Complexity

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

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

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

Scheduling Single Machine Scheduling. Tim Nieberg

Aperiodic Task Scheduling

4. Fixed-Priority Scheduling

Introduction to Scheduling Theory

Real-time scheduling algorithms, task visualization

Partitioned real-time scheduling on heterogeneous shared-memory multiprocessors

The simple case: Cyclic execution

REAL TIME OPERATING SYSTEMS. Lesson-18:

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

Integrating job parallelism in real-time scheduling theory

Global Multiprocessor Real-Time Scheduling as a Constraint Satisfaction Problem

Partition Scheduling in APEX Runtime Environment for Embedded Avionics Software

Scheduling Shop Scheduling. Tim Nieberg

Introducción a Calendarización en Sistemas Paralelas, Grids y Nubes

Multi-core real-time scheduling

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

Today s topic: So far, we have talked about. Question. Task models

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

Earliest Due Date (EDD) [Ferrari] Delay EDD. Jitter EDD

W4118 Operating Systems. Instructor: Junfeng Yang

A binary search algorithm for a special case of minimizing the lateness on a single machine

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

Exercises : Real-time Scheduling analysis

Minimizing the Number of Machines in a Unit-Time Scheduling Problem

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

Embedded Systems 20 BF - ES

Comparison between scheduling algorithms in RTLinux and VxWorks

Embedded Systems 20 REVIEW. Multiprocessor Scheduling

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

Algorithm Design and Analysis

Chapter 5 Process Scheduling

CPU Scheduling. CPU Scheduling

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

Readings for this topic: Silberschatz/Galvin/Gagne Chapter 5

Real- Time Scheduling

Lec. 7: Real-Time Scheduling

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

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

University Dortmund. Robotics Research Institute Information Technology. Job Scheduling. Uwe Schwiegelshohn. EPIT 2007, June 5 Ordonnancement

Online Scheduling for Cloud Computing and Different Service Levels

Off-line Optimal Multiprocessor Scheduling of Dependent Periodic Tasks

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

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

Power-Aware Real-Time Scheduling upon Identical Multiprocessor Platforms

REAL-TIME SCHEDULING FOR ENERGY HARVESTING SENSOR NODES

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

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

Processor Scheduling. Queues Recall OS maintains various queues

LAB 5: Scheduling Algorithms for Embedded Systems

ICS Principles of Operating Systems

A Constant-Approximate Feasibility Test for Multiprocessor Real-Time Scheduling

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Operating Systems. III. Scheduling.

Real-Time Database Systems: Concepts and Design

Operating Systems Concepts: Chapter 7: Scheduling Strategies

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Performance Comparison of RTOS

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

RUN: Optimal Multiprocessor Real-Time Scheduling via Reduction to Uniprocessor

OPERATING SYSTEMS SCHEDULING

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

The Design and Implementation of Real-Time Schedulers in RED-Linux

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

CPU Scheduling. Core Definitions

Performance Analysis of a Telephone System with both Patient and Impatient Customers

Hierarchical Real-Time Scheduling and Synchronization

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

List Scheduling in Order of α-points on a Single Machine

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

Real-Time Scheduling of Energy Harvesting Embedded Systems with Timed Automata

Dimensioning an inbound call center using constraint programming

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

Complexity of scheduling real-time tasks subjected to cache-related preemption delays

iems for Large Scale Charging of Electric Vehicles: Architecture and Optimal Online Scheduling

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Scheduling to Minimize Power Consumption using Submodular Functions

Speed Control and Scheduling of Data Mules in Sensor Networks

Compositional Real-Time Scheduling Framework with Periodic Model

An improved on-line algorithm for scheduling on two unrestrictive parallel batch processing machines

On-line machine scheduling with batch setups

CPU Scheduling. CSC 256/456 - Operating Systems Fall TA: Mohammad Hedayati

REAL TIME OPERATING SYSTEMS. Lesson-10:

Transcription:

Common Approaches to Real-Time Scheduling Clock-driven time-driven schedulers Priority-driven schedulers Examples of priority driven schedulers Effective timing constraints The Earliest-Deadline-First EDF Scheduler and its optimality Common Approaches to Real-Time Scheduling Clock-driven time-driven schedulers Scheduling decisions are made at specific time instants, which are typically chosen a priori. Priority-driven schedulers Scheduling decisions are made when particular events in the system occur, e.g. a job becomes available processor becomes idle Work-conserving: processor is busy whenever there is work to be done.

Clock-Driven Time-Driven -- Overview Scheduling decision time: point in time when scheduler decides which job to execute next. Scheduling decision time in clock-driven schedulers is defined a priori. For example: Scheduler periodically wakes up and generates a portion of the schedule. scheduler job A B C D C A C Special case: When job parameters are known a priori, schedule can be pre-computed off-line, and stored as a table table-driven schedulers. Priority-Driven -- Overview Basic rule: Never leave processor idle when there is work to be done. such schedulers are also called work conserving Based on list-driven, greedy scheduling. Examples: FIFO, LIFO, SET, LET, EDF. Possible implementation of preemptive priority-driven scheduling: Assign priorities to jobs. Scheduling decisions are made when ob becomes ready Processor becomes idle Priorities of jobs change At each scheduling decision time, choose ready task with highest priority. In non-preemptive case, scheduling decisions are made only when processor becomes idle. 2

Scheduling Decisions ready 4 running 2 3 waiting Scheduling decision points:. The running process changes from running to waiting current CPU burst of that process is over. 2. The running process terminates. 3. A waiting process becomes ready new CPU burst of that process begins. 4. The current process switches from running to ready. job ID execution time : 2 : 2 : 4 : 2 6 4 5 8 7 L, 2,, 4, 5, 6, 7, 8 5 : 3 Proc 5 2 6 4 8 : 3 6 : 2 7 : 8 7 LET 5, 8, 2, 6,,, 4, 7 8 5 4 2 6 7 L 8,, 2,, 4, 5, 6, 7 3

2 6 4 : 2 :2 : 4 : 5 8 7 L, 2,, 4, 5, 6, 7, 8 5 :3 8 :3 6 :2 7 : : 2 :2 : 4 : 5 :3 Proc 5 2 6 4 8 :3 6 :2 7 : 8 7 LET 5, 8, 2, 6,,, 4, 7 4

: 2 :2 : 4 : 5 :3 8 :3 6 :2 7 : 8 5 4 2 6 7 L 8,, 2,, 4, 5, 6, 7 2 6 4 : 2 :2 : 4 : 5 :3 5 8 7 L, 2,, 4, 5, 6, 7, 8 Proc 5 2 6 4 8 :3 6 :2 7 : 8 7 LET 5, 8, 2, 6,,, 4, 7 8 5 4 2 6 7 L 8,, 2,, 4, 5, 6, 7 5

Effective Timing Constraints Timing constraints often inconsistent with precedence constraints. Example: d > d 2, but 2 Effective timing constraints on single processor: Effective release time: r i eff : max {ri, {r j eff j i } Effective deadline: d i eff : min {di, {r j eff j i } Theorem: A set of obs can be feasibly scheduled on a processor if and only if it can be feasibly scheduled to meet all effective release times and deadlines. Interlude: The EDF Algorithm The EDF Earliest-Deadline-First Algorithm: At any time, execute that available job with the earliest deadline. Theorem: Optimality of EDF In a system one processor and with preemptions allowed, EDF can produce a feasible schedule of a job set with arbitrary release times and deadlines iff such a schedule exists. Proof: by schedule transformation. 6

Proof of Optimality of EDF Assume that arbitrary schedule S meets timing constraints. For S to not be an EDF schedule, we must have the following situation: S is EDF up to here interval A interval B portion of j portion of i r i, r j d i d j Proof of Optimality of EDF 2 We now have two cases. Case : LA > LB A B portion of j portion of i r i, r j B d i d j 7

Proof of Optimality of EDF 3 We now have two cases. Case 2: LA < LB A B portion of j portion of i r i, r j A d i d j EDF Not Always Optimal Case : When preemption is not allowed: 2 3 r i 0, 2, 4, d i 0, 4, 2, e i 3 6 4 2 Case 2: On more than one processor: 2 3 ri 0, 0, 0, di 4, 4, 5, ei 5 2 8

Preemptive Scheduling of obs with Arbitrary Release Times, Deadlines, Execution Times Determine schedule over a hyperperiod. Formulate scheduling problem as network flow problem. I 2 I 2 Source e i i............ I j I j Sink n- I m- n I m I I m r r 2 d d 2 r 3 r 4 d 4 d 3 t NP Completeness of Non-Preempt Deadline Scheduling Theorem: The problem of scheduling a non-preemptable set of jobs,..., i,... n, each with release time r i, deadline d i, and execution time e i is NP-complete. Proof: Transformation from PARTITION [Garey/ohnson,979] Given: Finite set A {A,..., A i,..., A m }, each element of size a i. Let Partition A into two sets, each of same size. Define a job set,..., m+, as follows: B/2 B/2 m+ 0 B/2 B/2+ B+ 9