Real Time Scheduling.

Slides:



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

Chapter 7 - Resource Access Protocols (Critical Sections) Protocols: No Preemptions During Critical Sections Once a job enters a critical section, it cannot.
Priority Inheritance and Priority Ceiling Protocols
Washington WASHINGTON UNIVERSITY IN ST LOUIS Resource and Resource Access Control Fred Kuhns Applied Research Laboratory Computer Science and Engineering.
Outline Introduction Assumptions and notations
Introduction to Embedded Systems Resource Management - III Lecture 19.
Priority INHERITANCE PROTOCOLS
Copyright © 2000, Daniel W. Lewis. All Rights Reserved. CHAPTER 8 SCHEDULING.
1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
0 Synchronization Problem Resource sharing –Requires mutual exclusion –Critical section A code section that should be executed mutually exclusively by.
CS5270 Lecture 31 Uppaal, and Scheduling, and Resource Access Protocols CS 5270 Lecture 3.
CPE555A: Real-Time Embedded Systems
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Resource Access Control Protocols.
CSE 522 Real-Time Scheduling (3)
Real Time Scheduling Terminologies define Fixed Priority Scheduler
An Introduction to Real Time Systems
Real-time concepts Lin Zhong ELEC424, Fall Real time Correctness – Logical correctness – Timing Hard vs. Soft – Hard: lateness is intolerable Pass/Fail.
Task Allocation and Scheduling n Problem: How to assign tasks to processors and to schedule them in such a way that deadlines are met n Our initial focus:
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
Operating Systems1 5. Process and thread scheduling 5.1 Organization of Schedulers – Embedded and Autonomous Schedulers 5.2 Scheduling Methods – A Framework.
1 Multiprocessor and Real-Time Scheduling Chapter 10.
Embedded Systems Exercise 3: Scheduling Real-Time Periodic and Mixed Task Sets 18. May 2005 Alexander Maxiaguine.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Spring 2002Real-Time Systems (Shin) Rate Monotonic Analysis Assumptions – A1. No nonpreemptible parts in a task, and negligible preemption cost –
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.
UCDavis, ecs251 Fall /23/2007ecs251, fall Operating System Models ecs251 Fall 2007 : Operating System Models #3: Priority Inversion Dr. S.
Introduction to Embedded Systems
Introduction to Embedded Systems Rabie A. Ramadan 6.
Real-Time Systems Design1 Priority Inversion When a low-priority task blocks a higher-priority one, a priority inversion is said to occur Assume that priorities:
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 and Real-Time Scheduling Chapter 10.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
Real Time Operating Systems Schedulability - Part 3 Course originally developed by Maj Ron Smith 10/24/2015Dr Alain Beaulieu1.
Real Time Scheduling Telvis Calhoun CSc Outline Introduction Real-Time Scheduling Overview Tasks, Jobs and Schedules Rate/Deadline Monotonic Deferrable.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Prepare by : Ihab shahtout.  Overview  To give an overview of fixed priority schedule  Scheduling and Fixed Priority Scheduling.
CompSci 143A1 5. Process and thread scheduling 5.1 Organization of Schedulers – Embedded and Autonomous Schedulers – Priority Scheduling 5.2 Scheduling.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2006 Universität Dortmund Periodic scheduling For periodic scheduling, the best that we can do is to.
Special Class on Real-Time Systems
B. RAMAMURTHY 12/25/2015 Realtime System Fundamentals : Scheduling and Priority-based scheduling Pag e 1.
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.
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.
Sandtids systemer 2.modul el. Henriks 1. forsøg m. Power Point.
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.
Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)
Real-Time Operating Systems RTOS For Embedded systems.
Embedded System Scheduling
REAL-TIME OPERATING SYSTEMS
Scheduling and Resource Access Protocols: Basic Aspects
Wayne Wolf Dept. of EE Princeton University
Unit OS9: Real-Time and Embedded Systems
EEE 6494 Embedded Systems Design
Chapter 2 Scheduling.
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy cse321-fall2014 9/20/2018.
Realtime Scheduling Algorithms
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy cse321-fall /27/2018.
CSCI1600: Embedded and Real Time Software
Multiprocessor and Real-Time Scheduling
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy Amrita-UB-MSES /11/2013.
CSCI1600: Embedded and Real Time Software
Processes and operating systems
Chapter 10 Multiprocessor and Real-Time Scheduling
CS703 - Advanced Operating Systems
Presentation transcript:

Real Time Scheduling

Outline About real time systems Basic Scheduling Techniques Recent Work Future Work

Real Time Systems Correctness of the system may depend not only on the logical result of the computation but also on the time when these results are produced Tasks attempt to control events or to react to events that take place in the outside world These external events occur in real time and processing must be able to keep up Processing must happen in a timely fashion, neither too late, nor too early Some examples include, Air Traffic Control, Robotics, Controlling Cars/Trains, Medical Support, Multimedia.

Types of Real Time Systems Hard real time systems Must always meet all deadlines System fails if deadline window is missed Soft real time systems Must try to meet all deadlines System does not fail if a few deadlines are missed Firm real time systems Result has no use outside deadline window Tasks that fail are discarded

Real time tasks Periodic - Each task is repeated at a regular interval - Max execution time is the same each period - Arrival time is usually the start of the period - Deadline is usually the end Aperiodic - Each task can arrive at any time

Real-Time Scheduling Determines the order of real time task executions Dynamic vs. Static Dynamic schedule computed at run-time based on tasks really executing, priorities computed on the fly Static schedule done at compile time for all possible tasks, priorities are already known

Rate Monotonic Simplest type of real time scheduling - Tasks are periodic, with hard deadlines - Tasks are completely independent and do not communicate with each other - Tasks are scheduled according to priority and task priorities are fixed - Computation time is known and constant

Rate Monotonic Higher priorities usually assigned to tasks with smaller periods If t(h) < t(l), then PR(h) > PR(l), where t indicated period and PR indicates the priority. This is called rate monotonic priority assignment. Calculates the critical instant for each task. Occurs when task Ti and all higher priority tasks are scheduled simultaneously If tasks deadline scheduled at critical instant, then the task can always meet its deadline.

Deadline Monotonic Tasks with shorter deadlines get higher priority. Static Scheduling. If D(h) < D(l), then PR(h) > PR(l), where D indicates the deadline. This is called Deadline Monotonic priority assignment.

EDF: Earliest Deadline First Dynamic Scheduling Assume a preemptive system with dynamic priorities Like deadline monotonic, the task with shortest deadline gets highest priority, but the difference is real time priorities can vary during the system’s execution. Priorities are reevaluated when events such as task arrivals, completions occur

Real Time Synchronization Required when tasks are not independent and need to share information and synchronize If two tasks want to access the same data, semaphores are used to ensure non-simultaneous access Potential Issues Priority Inversion – A situation in which a higher priority job is blocked by lower priority jobs for an indefinite period of time Chain Blocking – A situation in which more than two resources are available and a high priority task is blocked off from both because of two or more lower priority tasks holding locks on one or both of the resources.

Priority Inversions Low priority task holds resource that prevents execution of higher priority tasks. - Task L acquires lock - Task H needs resource, but is blocked by Task L, so Task L is allowed to execute - Task M preempts Task L, because it is higher priority - Thus Task M delays Task L, which delays Task H

Priority Inheritance Protocol PIP eliminates priority inversion problem The algorithm will increase the priority of a task to the maximum priority of any task waiting for any resource the task has a resource lock on - i.e. if a lower priority task L has a lock on a resource required by a higher priority task H, then the priority of the lower task is increased to the priority of the higher task - Once the lock is released the task resumes back its original priority

Priority Ceiling Protocol Each resource is assigned a priority ceiling, which is a priority equal to the highest priority of any task which may lock the resource. PCP eliminates chain blocking which considers the use of more than one resource or semaphore A task can acquire a lock on resource S only if no other task holds a lock on resource R. Thus higher priority tasks will not be blocked through both S and R If a high priority task is blocked through a resource, then the task holding that resource gets the priority of the high priority task. Once the resource is released, the priority is reset back to its original

Recent Work Semaphore queue priority assignment for real-time multiprocessor synchronization Hardware support for Priority Inheritance using System-on-a-Chip Lock Cache (SoCLC) Separate cache allocated on a chip for handling lock hand-offs. Improves real-time predictability of the system and improves performance Deferrable scheduling for fixed priority systems E.g. Actively schedule the maximum time between periodic sensor updates to minimize energy consumption in a wireless sensor network.

Future Work Enhancements in Multiprocessor and Distributed environments resulting in better utilization of resources Real time scheduling algorithms for Artificial Intelligent systems that take decisions and prioritize execution of tasks based on heuristics Context-Aware Scheduling - the decision of which job to schedule next should be based on the deadline of the job as well as the context of resources being managed

References Chow, Randy, et. al.,Distributed Operating Systems & Algorithms, Addison Wesley, March 18, 1997 M. Xiong, S. Han and K.Y. Lam, ”A Deferrable Scheduling Algorithm for Real-Time Transactions Maintaining Data Freshness,” IEEE Real-Time Systems Symposium, 2005. http://www.netrino.com/Publications/Glossary/PriorityInversion.php, 2007 Sha, L.; Rajkumar, R.; Lehoczky, J.P.; Priority inheritance protocols: an approach to real-time synchronization, Computers, IEEE Transactions on Volume 39, Issue 9, Sept. 1990 Page(s):1175 – 1185 Gupta, Kanishka; Matta, Ibrahim; Bestavroz, Azer; Context Aware Real Time Scheduling, Boston University