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.

Slides:



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

CPE555A: Real-Time Embedded Systems
Operating Systems Process Scheduling (Ch 3.2, )
1 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory Embedded Systems Exercise 2: Scheduling Real-Time Aperiodic Tasks.
Chapter 3: CPU Scheduling
1 Multiprocessor and Real-Time Scheduling Chapter 10.
Project 2 – solution code
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
Cs238 CPU Scheduling Dr. Alan R. Davis. CPU Scheduling The objective of multiprogramming is to have some process running at all times, to maximize CPU.
Chapter 5: CPU Scheduling
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.
Real Time Process Control (Introduction)
Chapter 6: CPU Scheduling
Chapter 4 Processor Management
Operating System Concepts and Techniques Lecture 5 Scheduling-1 M. Naghibzadeh Reference M. Naghibzadeh, Operating System Concepts and Techniques, First.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
Chapter 6 CPU SCHEDULING.
More Scheduling cs550 Operating Systems David Monismith.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
Fair Resource Access & Allocation  OS Scheduling
Real Time Operating Systems Scheduling & Schedulers Course originally developed by Maj Ron Smith 8-Oct-15 Dr. Alain Beaulieu Scheduling & Schedulers- 7.
Round Robin Scheduling A preemptive scheduling designed for Time Sharing Systems The Ready Queue is treated as a circular queue A small execution.
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
Classification of scheduling policies Preemptive methods (typical representative: RR) Non-preemptive methods (typical representative: FCFS) Preemption.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Multiprocessor and Real-Time Scheduling Chapter 10.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
6. Application mapping 6.1 Problem definition
RTOS task scheduling models
Lecture 6 Page 1 CS 111 Online Preemptive Scheduling Again in the context of CPU scheduling A thread or process is chosen to run It runs until either it.
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.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 31 – Process Management (Part 1) Klara Nahrstedt Spring 2009.
CS333 Intro to Operating Systems Jonathan Walpole.
For a good summary, visit:
Real-Time Scheduling --- An Overview Real-Time Scheduling --- An Overview Xiaoping He.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
Lecture 6: Real-Time Scheduling
Real-Time Operating Systems RTOS For Embedded systems.
Embedded System Scheduling
REAL-TIME OPERATING SYSTEMS
Chapter 19: Real-Time Systems
Networks and Operating Systems: Exercise Session 2
Wayne Wolf Dept. of EE Princeton University
EEE 6494 Embedded Systems Design
Chapter 2 Scheduling.
Chapter 8 – Processor Scheduling
Real-time Software Design
Lecture 24: Process Scheduling Examples and for Real-time Systems
CprE 458/558: Real-Time Systems
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Lecture 21: Introduction to Process Scheduling
TDC 311 Process Scheduling.
CPU SCHEDULING.
CPU scheduling decisions may take place when a process:
Multiprocessor and Real-Time Scheduling
Chapter 19: Real-Time Systems
Lecture 21: Introduction to Process Scheduling
Chapter 10 Multiprocessor and Real-Time Scheduling
CS703 - Advanced Operating Systems
CS703 - Advanced Operating Systems
Shortest-Job-First (SJR) Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
Chapter 6: CPU Scheduling
Real-Time Process Scheduling Concepts, Design and Implementations
Presentation transcript:

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 the kernel at regular intervals. Non Periodic Respond to randomly arriving events. Event driven The task is activated upon the arrival of an event or through an explicit activation.

Tasks Non periodic tasks can be converted to periodic tasks –Converting an interrupt handler to a polling task. –Instead of reacting to an external event the moment it occurs, the system polls the external input regularly. – If the awaited event is detected, the appropriated action is performed.

Tasks Hard Missing a deadline may cause catastrophic effects on the controlled system. Sensory acquisition low-level control sensory-motor planning Soft Missing a deadline only causes a performance degradation. Reading data from the keyboard User command interpretation Message displaying Graphical activities

Schedule A schedule is a particular assignment of tasks to the processor. τ3τ3 τ2τ2 τ1τ1 Idle t1t1 t2t2 t3t3 t4t4 t

Schedule algorithm Preemptive The running task can be temporarily suspended in the ready queue to execute a more important task. Non Preemptive The running task cannot be suspended until completion.

Schedule Preemptive t1t1 t2t2 t3t3 t4t4 t τ1τ1 τ2τ2 τ3τ3 t5t5

Schedule Algorithms Constraints Timing constraints –Activation, completion, jitter. Precedence constraints –They impose an ordering in the execution. Resource constraints –They enforce a synchronization in the access of mutually exclusive resources.

Some Schedule Algorithms First Come First Served Shortest Job First Priority Scheduling Round Robin  Not suitable for Real Time!!!!!

First Come First Served It assigns the CPU to tasks based on their arrival times. –Very unpredictable –Response times strongly depend on task arrivals.

Shortest Job First It selects the task with the shortest computation time.

Shortest Job First Sometimes…is not feasible

Priority Scheduling Each task is assigned a priority: e.g. [0, 255]- The task with the highest priority is selected for execution. - Tasks with the same priority are served FCFS. Problem: starvation –low priority tasks may experience long delays due to the preemption of high priority tasks.

Round Robin The ready queue is served as FCFS Each task cannot execute more than Q time units (Q = time quantum). When Q expires, the task is put back in the queue. CPU τ3τ3 τ2τ2 τ1τ1 Activatio n Q expired

Round Robin Each task runs as it was executing alone on a virtual processor n times slower than the real one!!! Q nQ

Real Time Algorithms –Tasks can be scheduled by Relative deadlines Di (static) Absolute deadlines di (dynamic) t didi τiτi DiDi

Earliest Due Date (EDD) –It selects the task with the earliest relative deadline. All tasks arrive simultaneously Fixed priority (Di is known in advance) Preemption is not an issue It minimizes the maximum lateness (Lmax)

Earliest Deadline First (EDF) –It selects the task with the earliest absolute deadline Tasks may arrive at any time Dynamic priority (di depends on arrival) Full preemptive tasks It minimizes the maximum lateness (Lmax)

Earliest Deadline First Example

Periodic Tasks Scheduling –Defining the problem Each group of tasks has to start after the period defined. Each group of tasks has to finish before the next period come.

Cyclic Scheduling It has been used for 30 years in military systems, navigation, and monitoring systems. Examples: –Air traffic control –Space Shuttle –Boeing 777

Cyclic Scheduling Method –The time axis is divided in intervals of equal length (time slots). –Each task is statically allocated in a slot in order to meet the desired request rate. –The execution in each slot is activated by a timer.

Cyclic Scheduling Example Specification : –Task A f=40 Hz, T=25 ms –Task B f=20 Hz, T=50 ms –Task C f=10 Hz, T=100 ms 0 ms 25 ms 75 ms50 ms 100 ms 125 ms 175 ms150 ms225 ms200 ms Λ Λ Minor Cycle T T Major Cycle Assumptions guaranteed!!!: C A + C B ≤ Λ C A + C c ≤ Λ