Introduction to Embedded Systems Rabie A. Ramadan 5.

Slides:



Advertisements
Similar presentations
Real Time Scheduling.
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.
Resource Access Protocols
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
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.
Operating Systems1 5. Process and thread scheduling 5.1 Organization of Schedulers – Embedded and Autonomous Schedulers 5.2 Scheduling Methods – A Framework.
CS 3013 & CS 502 Summer 2006 Scheduling1 The art and science of allocating the CPU and other resources to processes.
UCDavis, ecs150 Fall /23/2007ecs150, fall Operating System ecs150 Fall 2007 : Operating System #3: Priority Inversion (a paper on the class.
UCDavis, ecs150 Spring /21/2006ecs150, spring Operating System ecs150 Spring 2006 : Operating System #3: Priority Inversion (paper) Dr. S.
Embedded Systems Exercise 3: Scheduling Real-Time Periodic and Mixed Task Sets 18. May 2005 Alexander Maxiaguine.
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.
Spring 2002Real-Time Systems (Shin) Rate Monotonic Analysis Assumptions – A1. No nonpreemptible parts in a task, and negligible preemption cost –
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:
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.
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.
© 2000 Morgan Kaufman Overheads for Computers as Components Processes and operating systems Operating systems. 1.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2006 Universität Dortmund Periodic scheduling For periodic scheduling, the best that we can do is to.
Advanced Operating Systems - Spring 2009 Lecture 14 – February 25, 2009 Dan C. Marinescu Office: HEC 439 B. Office.
Special Class on Real-Time Systems
Real-Time Scheduling CS 3204 – Operating Systems Lecture 13 10/3/2006 Shahrooz Feizabadi.
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,
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:
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Lecture 6: Real-Time Scheduling
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
Unit OS9: Real-Time and Embedded Systems
EEE 6494 Embedded Systems Design
Lecture 24: Process Scheduling Examples and for Real-time Systems
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
CSCI1600: Embedded and Real Time Software
Processes and operating systems
Chapter 10 Multiprocessor and Real-Time Scheduling
CHAPTER 8 Resources and Resource Access Control
Presentation transcript:

Introduction to Embedded Systems Rabie A. Ramadan 5

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 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) 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) 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

15 Priority inversion - A scheduling scenario where a high priority task is indirectly preempted by a medium priority task because it is blocked waiting for a shared resource. Priority inheritance - A scheduling policy that attempts to solve the problem of priority inversion as follows: whenever a high priority task has to wait for some resource, shared with an executing low priority task, the low priority task is temporarily assigned the priority of the highest waiting priority task for the duration of its own use of the shared resource. This strategy prevents medium priority tasks from preempting it. When the shared resource is released the low priority task continues to execute at its original priority level.

16 Priority ceiling inheritance - An enhancement of the priority inheritance policy. A priority ceiling is defined for each resource. The scheduling policy is the same as for priority inheritance except that tasks can only acquire a resource if their static priority is higher than the ceiling of any currently locked resource (excluding that it has already blocked itself).