Real-Time Systems Lecture 1: Introduction. Course Outline Design Methodologies Scheduling Theory  Schedulability Analysis  Real-Time Scheduling Algorithms.

Slides:



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

Real Time Scheduling.
EE5900 Advanced Embedded System For Smart Infrastructure
CPE555A: Real-Time Embedded Systems
Courseware Scheduling of Distributed Real-Time Systems Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
Real Time Scheduling Terminologies define Fixed Priority Scheduler
Mehdi Kargahi School of ECE University of Tehran
Real-Time Scheduling CIS700 Insup Lee October 3, 2005 CIS 700.
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
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Real-Time System: Introduction
Courseware Basics of Real-Time Scheduling Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
CprE 458/558: Real-Time Systems
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.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
Task Scheduling By Dr. Amin Danial Asham.
Introduction to Real-Time Systems
1. Introduction 1.1 Background 1.2 Real-time applications 1.3 Misconceptions 1.4 Issues in real-time computing 1.5 Structure of a real-time system.
Real Time Operating Systems Scheduling & Schedulers Course originally developed by Maj Ron Smith 8-Oct-15 Dr. Alain Beaulieu Scheduling & Schedulers- 7.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Real-Time Operating Systems for Embedded Computing 李姿宜 R ,06,10.
Multiprocessor and Real-Time Scheduling Chapter 10.
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 CS 3204 – Operating Systems Lecture 20 3/3/2006 Shahrooz Feizabadi.
Prepare by : Ihab shahtout.  Overview  To give an overview of fixed priority schedule  Scheduling and Fixed Priority Scheduling.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Introduction to Real-Time Systems.
CS244-Introduction to Embedded Systems and Ubiquitous Computing Instructor: Eli Bozorgzadeh Computer Science Department UC Irvine Winter 2010.
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)
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.
Special Class on Real-Time Systems
CSE 522 Real-Time Scheduling (2)
Module 2 Overview of Real Time System Scheduling
Real-Time Scheduling CS 3204 – Operating Systems Lecture 13 10/3/2006 Shahrooz Feizabadi.
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng.
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
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:
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.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
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
REAL-TIME OPERATING SYSTEMS
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Unit OS9: Real-Time and Embedded Systems
EEE 6494 Embedded Systems Design
Chapter 2 Scheduling.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
CHAPTER 3 A Reference Model of Real-Time Systems
Presentation transcript:

Real-Time Systems Lecture 1: Introduction

Course Outline Design Methodologies Scheduling Theory  Schedulability Analysis  Real-Time Scheduling Algorithms Verification

References Book:  Jane W.S. Liu, Real-Time Systems, 2000, Prentice Hall (Pub.).

Outline Typical Real-Time Applications Terms and Concepts Classification of Real-Time Systems

Typical Real-Time Applications Digital Controllers  Automotive Controllers  Industrial Automation High-Level Controllers  Command and Control Systems  Air Traffic Control Systems  Avionic Systems Signal Processing Real-Time Databases and Multimedia

Digital Controller PlantSensor Control-Law Computation A/D D/A Reference Input Actuator Controller - purely cyclic application executes periodically.

Controller Area Network (SAE J1939) Precision agricultural application - mostly cyclic process control system.

Target Vehicles The Common Digital Architecture (CDA 101) is a standard architecture for interconnecting target vehicle electronics. Transponder CDA Autopilot GPS TA/AS Transponder Autopilot GPS CDA TA/AS

Seaborne Target ST2000

System Controller (King) Engine Controller #1 Engine Controller #2 Instrument Cluster #1 Instrument Cluster #2 Rudder Controller Throttle GPS Pitch, Roll Heading Windspeed Sensors Actuator Sensors Actuator Rudder Sensor Rudder Pump xponder CAN Bus Lights Pitch,Roll, & Heading Windbird Mather Throttle Instruments, Switches, Lights Instruments, Switches, Lights Fiber to TP Seaborne Target ST2000

Typical CAN Node Fiber Optic Transceivers Optically Isolated RS-232 CAN Transceiver CAN Choke uController FLASH Optically Isolated I/O Extra CAN Controller (SJA1000) RAM

Complex System Development High-Level Development Environment Real-Time Operating System Target System Application Tasks Real-Time OS (pOSEK) Hardware (C167CR) Input Output Development Host Pentium PC (SUN workstation) WinNT OS (or Solaris) Compiler, Debugger, Loader, Simulator, Shell, vxSim, etc. RS-232 Ethernet

Real-Time Operating System Functions: task management, memory management, time management, device drivers, and interrupt service. Interrupt dispatch Interrupt service Time service and event management Services (create thread, sleep, notify, send,…) Scheduler System calls (trap) External interrupt Timer interrupt kernel Task execution

Outline References - where to get more info. Typical Real-Time Applications Terms and Concepts Classification of Real-Time Systems

Terms and Concepts A real-time system is a system with performance deadlines on computations and actions; that is, system correctness depends on the timeliness of the results. An embedded system is a system that exists within a larger system.

Definitions A job is a unit of work that is scheduled and executed by the system (J i,k ). A task is a set of related jobs that provide some system function τ i = { J i,1, J i,2,..., J i,n }. ; e.g., the reception of a data frame could be a job that is part of a task that provides time service. The deadline of a job is the time at which a job must be completed.

Deadlines The release time (or arrival time) of a job is the time at which the job becomes available for execution ( r i or R i ). The response time of a job is the length of time between the release time of the job and the time instant when it completes. The relative deadline of a job is the maximum allowable response time of a job ( D i ). The absolute deadline of a job is the time at which a job must be completed ( d i = r i + D i ).

Hard vs. Soft Constraints A timing constraint or deadline is hard if the failure to meet it is consider a fatal fault. The failure to meet a soft deadline is undesirable, but not fatal. Another way of defining hard and soft timing constraints is in terms of the value of the result (to the system) relative to time.

Value of Result deadlinetime 0 1 Hard Real-Time System Soft Real-Time System

Task Model Event-Driven (Reactive) Tasks primarily react to external events which are generally aperiodic (sporadic). Time-Driven Tasks are driven by the passage of time or time epochs; generally periodic tasks.

Event-Driven Task Execution Time Deadline Slack Time Minimum Interarrival Time Actual Interarrival Time Arrival Time

Time-Driven Task Execution Time Deadline Slack Time Period Scheduled Start Time

Scheduler A scheduler assigns jobs to processors. A schedule is an assignment of all jobs in the system on available processors (produced by scheduler). The execution time (or run-time) of a job is the amount of time required to complete the execution of a job once it has been scheduled ( e i or C i ). A constraint imposed on the timing behavior of a job is called a timing constraint.

Assumptions The scheduler works correctly; e.g., it only produces valid schedules that satisfy the following conditions:  each processor is assigned to at most one job at a time,  each job is assigned to at most one processor,  no job is scheduled before its release time, and  all precedence constraints and resource usage constraints are satisfied.

Feasible Schedule A valid schedule is a feasible schedule if every job meets its timing constraints; e.g., completes executing by its deadline. A set of jobs is schedulable according to a scheduling algorithm if (when) using the algorithm (the scheduler) always produces a feasible schedule. The lateness of a job is the difference between its completion time and its deadline. If the job completes early, its lateness will be negative.

Timing Constraints Periodic - tasks arrive at fixed intervals, called periods. Aperiodic (Sporadic) - tasks may arrive at any time after a minimum interval.

Periodic Task A periodic task τ i = { J i,1, J i,2,..., J i,n } is a sequence of jobs with identical parameters with:  a period ( p i or T i ) equal to the minimum length of time between the release times of consecutive jobs,  an execution time ( e i or C i ) equal to the maximum execution time of any job in the task, and  a phase ( φ i ) equal to the release time of the first job in τ i.

TaskPeriodDeadlineRun-TimePhase τ i T i D i C i φ i A B Example #1 A B (High Priority) (Low Priority) - assume priority-driven scheduling

TaskPeriodDeadlineRun-TimePhase τ i T i D i C i φ i A B Example #2 A B (High Priority) (Low Priority)

TaskPeriodDeadlineRun-TimePhase τ i T i D i C i φ i A B Example #3 A B (High Priority) (Low Priority)

TaskPeriodDeadlineRun-TimePhase τ i T i D i C i φ i A B Example #4 A B (High Priority) (Low Priority)

Example #5 TaskPeriodDeadlineRun-TimePhase τ i T i D i C i φ i A B U = C 1 / T 1 + C 2 / T 2 = 1 / / 5 = 0.92 Even if U < 1, a task set may not be schedulable using fixed priority scheduling.

Observations The schedulability of a task set depends on priority assignment. Even if the utilization of a task set is less than one, it may not be schedulable by any fixed priority assignment.

Outline References - where to get more info. Typical Real-Time Applications Terms and Concepts Classification of Real-Time Systems

System Characterization Preemptivity - are the jobs preemptable? Context-switch time - is the context- switching time negligible? Laxity type - are deadlines hard or soft? Resource requirements - are any resources required by the job to execute, and for what time interval are these resources required (e.g., critical sections).

Real-Time Scheduling Priority-Driven (Event-Driven) Approach  ready jobs with highest priorities are scheduled. Clock-Driven (Time-Driven) Approach  decisions on what jobs execute at what times are made at specific time instants. Weighted Round-Robin Approach  every job joins a FIFO queue when it becomes ready for execution - the weight refers to the fraction of processor time allocated to the job.

Priority-Driven Scheduling Algorithms for Periodic Tasks Fixed-Priority - assigns the same priority to all jobs in a task. Dynamic-Priority - assigns different priorities to the individual jobs in each task. We will start by considering fixed-priority algorithms.

Issues in Fixed Priority Assignment How to assign priorities? How to determine which assignment is the best; e.g., how to evaluate a priority assignment algorithm (method)? How to compare different priority assignment algorithms?

Fixed Priority Assignment Methods According to execution times ( C i )  smallest execution time first  largest execution time first According to periods ( T i )  smallest period first  largest period first According to task utilization ( C i / T i )  smallest task utilization first  largest task utilization first Other

Rate-Monotonic Algorithm (RM) The rate of a task is the inverse of its period. Task with higher rates are assigned higher priorities. C. L. Liu and J. W. Layland, “Scheduling Algorithms for Multiprogramming in a Hard Real-Time Environment”, JACM, Vol. 20, No. 1, pages 46-61, 1973.

Types of Scheduling Algorithms Static versus Dynamic Online versus Offline

Static Scheduling Static scheduling can be used if the scheduling algorithm has complete knowledge of the task set and all timing constraints such as deadlines, execution times, precedence, and future arrival times. The static algorithm operates on the set of tasks and constraints to generate a single, fixed schedule.

Dynamic Scheduling Dynamic scheduling algorithms have complete knowledge of currently active tasks, but new tasks may arrive at any time in the future. Dynamic scheduling is performed at run- time (online); however, offline scheduling is usually performed to constrain the dynamic schedule.

Metrics Used To Evaluate Scheduling Algorithms processor utilization throughput weighted sum of task completion times schedule length number of processors required maximum lateness missed deadlines

Minimize maximum lateness T1 T2 T3T4T5 d1 Maximum lateness is minimized, but all deadlines are missed. d2 d3d4 d5 T2 T3T4T5T1 Only one deadline missed.

Missed Deadlines Much real-time work is only concerned with missed deadlines. In which case, an optimal scheduling algorithm is one that will fail to meet a deadline only if no other scheduling algorithm can meet the deadline.

For Next Time Read Ch Real-Time Scheduling – Commonly Used Approaches (Ch. 4) Design Methodologies