Real-Time Scheduling CS 3204 – Operating Systems Lecture 13 10/3/2006 Shahrooz Feizabadi.

Slides:



Advertisements
Similar presentations
Feedback Control Real-Time Scheduling: Framework, Modeling, and Algorithms Chenyang Lu, John A. Stankovic, Gang Tao, Sang H. Son Presented by Josh Carl.
Advertisements

1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
CS5270 Lecture 31 Uppaal, and Scheduling, and Resource Access Protocols CS 5270 Lecture 3.
CPE555A: Real-Time Embedded Systems
Mehdi Kargahi School of ECE University of Tehran
Real-Time Scheduling CIS700 Insup Lee October 3, 2005 CIS 700.
Is It Time Yet? Wing On Chan. Distributed Systems – Chapter 18 - Scheduling Hermann Kopetz.
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
CPU SCHEDULING RONG ZHENG. OVERVIEW Why scheduling? Non-preemptive vs Preemptive policies FCFS, SJF, Round robin, multilevel queues with feedback, guaranteed.
Courseware Scheduling Uniprocessor Real-Time Systems Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
Chapter 6 Dynamic Priority Servers
Periodic Task Scheduling
Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the RTSJ  Memory Management.
Embedded Systems Exercise 3: Scheduling Real-Time Periodic and Mixed Task Sets 18. May 2005 Alexander Maxiaguine.
Chapter 5: CPU Scheduling
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
Real-Time Operating System Chapter – 8 Embedded System: An integrated approach.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs.
Chapter 4 – Periodic Task Scheduling In many real-time systems periodic tasks dominate the demand. Three classic periodic task scheduling algorithms: –
Technische Universität Dortmund Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund, Informatik 12 Germany 2007/12/14.
Real Time Process Control (Introduction)
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs.
More Scheduling cs550 Operating Systems David Monismith.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
A S CHEDULABILITY A NALYSIS FOR W EAKLY H ARD R EAL - T IME T ASKS IN P ARTITIONING S CHEDULING ON M ULTIPROCESSOR S YSTEMS Energy Reduction in Weakly.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Scheduling policies for real- time embedded systems.
Multiprocessor Real-time Scheduling Jing Ma 马靖. Classification Partitioned Scheduling In the partitioned approach, the tasks are statically partitioned.
Real-Time Systems Mark Stanovich. Introduction System with timing constraints (e.g., deadlines) What makes a real-time system different? – Meeting timing.
Real Time Scheduling Telvis Calhoun CSc Outline Introduction Real-Time Scheduling Overview Tasks, Jobs and Schedules Rate/Deadline Monotonic Deferrable.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 31 – Multimedia OS (Part 1) Klara Nahrstedt Spring 2011.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Real-Time Scheduling CS 3204 – Operating Systems Lecture 20 3/3/2006 Shahrooz Feizabadi.
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
Undergraduate course on Real-time Systems Linköping 1 of 45 Autumn 2009 TDDC47: Real-time and Concurrent Programming Lecture 5: Real-time Scheduling (I)
Real Time Systems Real-Time Schedulability Part I.
RTOS task scheduling models
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs.
CS244-Introduction to Embedded Systems and Ubiquitous Computing Instructor: Eli Bozorgzadeh Computer Science Department UC Irvine Winter 2010.
Special Class on Real-Time Systems
CSE 522 Real-Time Scheduling (2)
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
Introduction to Embedded Systems Rabie A. Ramadan 5.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Dynamic Priority Driven Scheduling of Periodic Task
Classical scheduling algorithms for periodic systems Peter Marwedel TU Dortmund, Informatik 12 Germany 2012 年 12 月 19 日 These slides use Microsoft clip.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
Introduction to Real-Time Systems
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.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 32 – Multimedia OS Klara Nahrstedt Spring 2010.
Lecture 6: Real-Time Scheduling
Undergraduate course on Real-time Systems Linköping TDDD07 – Real-time Systems Lecture 1: Introduction & Scheduling I Simin Nadjm-Tehrani Real-time Systems.
Real-Time Operating Systems RTOS For Embedded systems.
Embedded System Scheduling
Wayne Wolf Dept. of EE Princeton University
Chapter 8 – Processor Scheduling
Lecture 24: Process Scheduling Examples and for Real-time Systems
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Processes and operating systems
Real-Time Process Scheduling Concepts, Design and Implementations
Ch 4. Periodic Task Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
Presentation transcript:

Real-Time Scheduling CS 3204 – Operating Systems Lecture 13 10/3/2006 Shahrooz Feizabadi

CS3204 Fall /3/06 2 Real-Time Systems Systems that must service requests within a precise time constraint: Air traffic control systems Railway switching systems Industrial automation Robotics Military Generally, systems that must respond to external physical phenomena.

CS3204 Fall /3/06 3 Tracking System Example Dynamic trajectory calculations False alarms Verification System response Real-time clock 687m error!

CS3204 Fall /3/06 4 System Resources Different approaches to resource management: General-purpose OS  Extensible time horizon: all tasks eventually finish  Similarly, elastic memory: demand paging  Fairness  Non-starvation Real-Time system  Fixed resources  Tasks adjusted accordingly  Predictability

CS3204 Fall /3/06 5 Schedulers Preemptive / non-preemptive Static / dynamic On-line / off-line Optimal / heuristic Clairvoyance

CS3204 Fall /3/06 6 Real-Time Task Parameters CiCi aiai didi sisi fifi t Arrival time Computation time start time finish time deadline

CS3204 Fall /3/06 7 Real-Time Tasks CiCi aiai didi sisi fifi t CiCi aiai didi sisi fifi t Laxity (slack) Deadline miss x

CS3204 Fall /3/06 8 RMA Rate Monotonic Algorithm Static Preemptive Fixed-priority assignment Periodic tasks Guarantee-based Hard real-time correctness – all deadlines always met

CS3204 Fall /3/06 9 RMA (continued) RMA: Assign unique priorities, in descending order, to tasks ordered by ascending periods: the shorter the period, the higher the priority.

CS3204 Fall /3/06 10 RMA – Example TaskTCP A51 B C A Assume deadline equals period (T).

CS3204 Fall /3/06 11 RMA – Example TaskTCP A51 B93 C A B

CS3204 Fall /3/06 12 RMA – Example TaskTCP A51 B93 C122 A B C

CS3204 Fall /3/06 13 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 14 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 15 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 16 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 17 RMA – Example TaskTCP A513 B932 C1221 A B C A preempts C

CS3204 Fall /3/06 18 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 19 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 20 RMA – Example TaskTCP A513 B932 C1221 A B C A preempts B

CS3204 Fall /3/06 21 RMA – Example TaskTCP A513 B932 C1221 A B C C arrives

CS3204 Fall /3/06 22 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 23 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 24 RMA – Example TaskTCP A513 B932 C1221 A B C

CS3204 Fall /3/06 25 RMA (continued) How far can we push this? Constraints  Number of tasks?  Periods?  Computational times?

CS3204 Fall /3/06 26 Processor Utilization Factor Fraction of CPU time spent in execution of tasks: Otherwise stated: sum of the individual relative load contribution of each task in the task-set. Provides an indication of system-wide computational load.

CS3204 Fall /3/06 27 Feasibility Test RMA guarantee: No deadlines will be missed under rate monotonic scheduling if the following condition holds:

CS3204 Fall /3/06 28 Feasibility Test (continued) Note that: That is, any task-set with a CPU utilization factor of 69% or less is schedulable under RMA Sufficient, but not necessary condition

CS3204 Fall /3/06 29 Optimality RMA is an optimal fixed-priority assignment algorithm: no other fixed- priority algorithms can schedule a task set that cannot be scheduled under RMA.

CS3204 Fall /3/06 30 EDF Earliest Deadline First Earlier the deadline, higher the priority. Dynamic assignment On-line No periodicity assumptions – can schedule aperiodic tasks.

CS3204 Fall /3/06 31 EDF – Example TaskTC A41 B84 C Assume deadline equals period (T). A B C Hyper-period

CS3204 Fall /3/06 32 EDF – Example TaskTC A41 B84 C Assume deadline equals period (T). A B C

CS3204 Fall /3/06 33 EDF – Example TaskTC A41 B84 C Assume deadline equals period (T). A B C

CS3204 Fall /3/06 34 EDF – Example TaskTC A41 B84 C Assume deadline equals period (T). A B C Lexical order tie breaker

CS3204 Fall /3/06 35 EDF – Example TaskTC A41 B84 C Assume deadline equals period (T). A B C

CS3204 Fall /3/06 36 EDF – Example TaskTC A41 B84 C Assume deadline equals period (T). A B C

CS3204 Fall /3/06 37 EDF – Example TaskTC A41 B84 C Assume deadline equals period (T). A B C

CS3204 Fall /3/06 38 EDF – Example TaskTC A41 B84 C Assume deadline equals period (T). A B C Pattern repeats

CS3204 Fall /3/06 39 EDF Properties Feasibility test: U = 100% in example Bound theoretical Sufficient and necessary Optimal

CS3204 Fall /3/06 40 Overload Hard real-time  No deadlines misses.  Dimension system to meet exact timing requirements. Soft real-time  May encounter transient or sustained overload.  Design algorithm to achieve desired temporal behavior.

CS3204 Fall /3/06 41 Real-Time Overload Scheduling Runtime uncertainty Dynamic system Aggregate demand exceeds capacity Fixed available bandwidth Must shed load Starvation Who survives?

CS3204 Fall /3/06 42 EDF Domino Effect Deadline sole scheduling parameter

CS3204 Fall /3/06 43 EDF Domino Effect X X X Cascading deadline misses Deadline sole scheduling parameter

CS3204 Fall /3/06 44 Load Shedding Feasible schedule if any task excluded in example? Selection criteria Fitness metric Second dimension: utility

CS3204 Fall /3/06 45 Load Shedding X X X Overload detected

CS3204 Fall /3/06 46 Load Shedding X X X Least valuable task u = 3 u = 1 u = 5 u = 7 Two scheduling parameters: deadline and utility

CS3204 Fall /3/06 47 Load Shedding X Least valuable task u = 3 u = 1 u = 5 u = 7