Common Approaches to Real-Time Scheduling Clock-driven (time-driven) schedulers Priority-driven schedulers Examples of priority driven schedulers Effective.

Slides:



Advertisements
Similar presentations
Washington WASHINGTON UNIVERSITY IN ST LOUIS Real-Time: Periodic Tasks Fred Kuhns Applied Research Laboratory Computer Science Washington University.
Advertisements

Machine scheduling Job 1Job 3 Job 4 Job 5Machine 1 Machine 2 time 0C max Job 2.
REAL TIME SYSTEM Scheduling.
1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
CPE555A: Real-Time Embedded Systems
Real Time Scheduling Terminologies define Fixed Priority Scheduler
CSE 522 Real-Time Scheduling (4)
THE UNIVERSITY of TEHRAN Mitra Nasri Sanjoy Baruah Gerhard Fohler Mehdi Kargahi October 2014.
Mehdi Kargahi School of ECE University of Tehran
CSE 522 Real-Time Scheduling (1) Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
Real-time Systems Lab, Computer Science and Engineering, ASU Scheduling Algorithm and Analysis (ESP – Fall 2014) Computer Science & Engineering Department.
1 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory Embedded Systems Exercise 2: Scheduling Real-Time Aperiodic Tasks.
Tasks Periodic The period is the amount of time between each iteration of a regularly repeated task Time driven The task is automatically activated by.
Module 2 Priority Driven Scheduling of Periodic Task
1 Single Machine Deterministic Models Jobs: J 1, J 2,..., J n Assumptions: The machine is always available throughout the scheduling period. The machine.
Resource augmentation and on-line scheduling on multiprocessors Phillips, Stein, Torng, and Wein. Optimal time-critical scheduling via resource augmentation.
Examples of real-time applications On-line transaction systems and interaction systems Real-time monitoring systems Signal processing systems –typical.
Real-Time System: Introduction
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
Deterministic Scheduling
EE 249, Fall Discussion: Scheduling Haibo Zeng Amit Mahajan.
Aperiodic Task Scheduling
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment Presented by Pete Perlegos C.L. Liu and James W. Layland.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
A Categorization of Real-Time Multiprocessor Scheduling Problems and Algorithms Presentation by Tony DeLuce CS 537 Scheduling Algorithms Spring Quarter.
Module 2 Clock-Driven Scheduling
Task Scheduling By Dr. Amin Danial Asham.
Scheduling Aperiodic and Sporadic Jobs
Real Time Operating Systems Scheduling & Schedulers Course originally developed by Maj Ron Smith 8-Oct-15 Dr. Alain Beaulieu Scheduling & Schedulers- 7.
Quantifying the Sub-optimality of Non-preemptive Real-time Scheduling Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.
CPU Scheduling Gursharan Singh Tatla 1-Feb-20111www.eazynotes.com.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
3.1 : Resource Management Part2 :Processor Management.
Chapter 5 CPU Scheduling Bernard Chen Spring 2007.
CS244-Introduction to Embedded Systems and Ubiquitous Computing Instructor: Eli Bozorgzadeh Computer Science Department UC Irvine Winter 2010.
6. Application mapping 6.1 Problem definition
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
CS244-Introduction to Embedded Systems and Ubiquitous Computing Instructor: Eli Bozorgzadeh Computer Science Department UC Irvine Winter 2010.
Mapping: Applications  Processors
Special Class on Real-Time Systems
CSE 522 Real-Time Scheduling (2)
Module 2 Overview of Real Time System Scheduling
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
Real time scheduling G.Anuradha Ref:- Stallings. Real time computing Correctness of the system depends not only on the logical result of computation,
Introduction to Embedded Systems Rabie A. Ramadan 5.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
1 Chapter 5-1 Greedy Algorithms Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Dynamic Priority Driven Scheduling of Periodic Task
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
Introduction to Real-Time Systems
A Fault-Tolerant Scheduling Algorithm for Real-Time Periodic Tasks with Possible Software Faults Ching-Chih Han, Kang G. Shin, and Jian Wu.
1 JOB SEQUENCING WITH DEADLINES The problem is stated as below. There are n jobs to be processed on a machine. Each job i has a deadline d i ≥ 0 and profit.
Mok & friends. Resource partition for real- time systems (RTAS 2001)
For a good summary, visit:
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Clock Driven Scheduling
Clock Driven Schedulers
Real-Time Operating Systems RTOS For Embedded systems.
Tardiness Bounds for Global EDF Scheduling on a Uniform Multiprocessor Kecheng Yang James H. Anderson Dept. of Computer Science UNC-Chapel Hill.
Clock-Driven Scheduling (in-depth) Task Scheduler: i := 0; k := 0; BEGIN LOOP i := i+1; k:= i mod N; IF J(t k-1 )is empty THEN wakeup(aperiodic) ELSE wakeup(J(t.
Embedded System Scheduling
CprE 458/558: Real-Time Systems
Chapter 6: CPU Scheduling
Richard Anderson Lecture 6 Greedy Algorithms
Process Scheduling B.Ramamurthy 2/23/2019.
Ch.7 Scheduling Aperiodic and Sporadic Jobs in Priority-Driven Systems
Real-Time Process Scheduling Concepts, Design and Implementations
Ch 4. Periodic Task Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
Presentation transcript:

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. Special case: When job parameters are known a priori, schedule can be precomputed off-line, and stored as a table (table-driven schedulers). ABCDCAC scheduler job

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 Job becomes ready Processor becomes idle Priorities of jobs change –At each scheduling decision time, chose ready task with highest priority. In non-preemptive case, scheduling decisions are made only when processor becomes idle.

Example: Priority-Driven Non-Preemptive Schedules J 1 : 1J 2 : 2J 3 : 1J 4 : 1 J 5 : 3 J 8 : 3 J 6 : 2 J 7 : 1 Proc 1 J1J1 J2J2 J3J3 J6J6 J4J4 Proc 2 J5J5 J8J8 J7J7 L = (J 1, J 2, J 3, J 4, J 5, J 6, J 7, J 8 ) Proc 1 J5J5 J2J2 J1J1 J6J6 J4J4 Proc 2 J8J8 J7J7 LET = (J 5, J 8, J 2, J 6, J 1, J 3, J 4, J 7 ) J3J3 Proc 1 J5J5 J2J2 J1J1 J6J6 J4J4 Proc 2 J8J8 J7J7 L = (J 8, J 1, J 2, J 3, J 4, J 5, J 6, J 7 ) J3J3 execution time job ID

Example: Priority-Driven Non-Preemptive Schedules J 1 :1J 2 :2J 3 :1J 4 :1 J 5 :3 J 8 :3 J 6 :2 J 7 :1 Proc 1 J1J1 J2J2 J3J3 J6J6 J4J4 Proc 2 J5J5 J8J8 J7J7 L = (J 1, J 2, J 3, J 4, J 5, J 6, J 7, J 8 )

Example: Priority-Driven Non-Preemptive Schedules J 1 :1J 2 :2J 3 :1J 4 :1 J 5 :3 J 8 :3 J 6 :2 J 7 :1 Proc 1 J5J5 J2J2 J1J1 J6J6 J4J4 Proc 2 J8J8 J7J7 LET = (J 5, J 8, J 2, J 6, J 1, J 3, J 4, J 7 ) J3J3

Example: Priority-Driven Non-Preemptive Schedules J 1 :1J 2 :2J 3 :1J 4 :1 J 5 :3 J 8 :3 J 6 :2 J 7 :1 Proc 1 J5J5 J2J2 J1J1 J6J6 J4J4 Proc 2 J8J8 J7J7 L = (J 8, J 1, J 2, J 3, J 4, J 5, J 6, J 7 ) J3J3

Example: Priority-Driven Non-Preemptive Schedules J 1 :1J 2 :2J 3 :1J 4 :1 J 5 :3 J 8 :3 J 6 :2 J 7 :1 Proc 1 J1J1 J2J2 J3J3 J6J6 J4J4 Proc 2 J5J5 J8J8 J7J7 L = (J 1, J 2, J 3, J 4, J 5, J 6, J 7, J 8 ) Proc 1 J5J5 J2J2 J1J1 J6J6 J4J4 Proc 2 J8J8 J7J7 LET = (J 5, J 8, J 2, J 6, J 1, J 3, J 4, J 7 ) J3J3 Proc 1 J5J5 J2J2 J1J1 J6J6 J4J4 Proc 2 J8J8 J7J7 L = (J 8, J 1, J 2, J 3, J 4, J 5, J 6, J 7 ) J3J3

Effective Timing Constraints Timing constraints often inconsistent with precedence constraints. Example: d 1 > d 2, but J 1  J 2 Effective timing constraints on single processor: Effective release time: Effective deadline: Theorem: A set of Jobs J can be feasibly scheduled on a processor if and only if it can be feasibly scheduled to meet all effective release times and deadlines.  ij eff ji i JJrrr ,max:  ji eff ji i JJddd ,min:

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 J with arbitrary release times and deadlines iff such a schedule exists. Proof: by schedule transformation.

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: portion of J j portion of J i didi djdj ri, rjri, rj interval Ainterval B S is EDF up to here

Proof of Optimality of EDF (2) We now have two cases. Case 1: L(A) > L(B) didi djdj ri, rjri, rj AB portion of J j B portion of J i

Proof of Optimality of EDF (3) We now have two cases. Case 1: L(A) <= L(B) portion of J i didi djdj ri, rjri, rj AB A portion of J j

EDF Not Always Optimal Case 1: When preemption is not allowed: Case 2: On more than one processor: edr )4,12,4( )6,14,2( )3,10,0(    J J J iii )5,5,0( )1,4,0( )1,4,0(    J J J edr iii J1J1 J2J2 J3J3