A presentation for Brian Evans’ Embedded Software Class By Nate Forman Liaison Technology Inc. 3/30/2000 For Real-Time Scheduling.

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 Inversion BAE5030 Advanced Embedded Systems 9/13/04.
Real-time Embedded Systems Complex RMS and deadline monotonic scheduling.
Scheduling Algorithms for Multiprogramming in a Hard Real-Time Environment (then and now) EECS 750 – Spring 2006 Presented by: Shane Santner, TJ Staley,
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.
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 Systems Lab, Computer Science and Engineering, ASU Scheduling Algorithm and Analysis (ESP – Fall 2014) Computer Science & Engineering Department.
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:
Resource Access Control in Real-Time Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical.
Scheduling Theory ITV Multiprogramming and Real-Time Programs Anders P. Ravn Aalborg University May 2009.
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.
Resource Access Control (Part I) The Mars Pathfinder Incident Resource Model Priority Inversion.
Embedded Systems Exercise 3: Scheduling Real-Time Periodic and Mixed Task Sets 18. May 2005 Alexander Maxiaguine.
CprE 458/558: Real-Time Systems
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.
UCDavis, ecs251 Fall /23/2007ecs251, fall Operating System Models ecs251 Fall 2007 : Operating System Models #3: Priority Inversion Dr. S.
Chapter 4 – Periodic Task Scheduling In many real-time systems periodic tasks dominate the demand. Three classic periodic task scheduling algorithms: –
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Combined Scheduling of Periodic and Aperiodic Tasks.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
1 Reducing Queue Lock Pessimism in Multiprocessor Schedulability Analysis Yang Chang, Robert Davis and Andy Wellings Real-time Systems Research Group University.
Scheduling policies for real- time embedded systems.
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.
Deadlocks Silberschatz Ch. 7 and Priority Inversion Problems.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2006 Universität Dortmund Periodic scheduling For periodic scheduling, the best that we can do is to.
Lab 3 Real-Time Control of a Hot Air Plant using RTOS µC/OSII Due Date: Week of Nov. 2 nd, 2010.
CSE 522 Real-Time Scheduling (2)
Real Time Operating Systems Schedulability - Part 2 Course originally developed by Maj Ron Smith 12/20/2015Dr Alain Beaulieu1.
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.
Rate Monotonic Analysis Rob Oshana Southern Methodist University.
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.
Sandtids systemer 2.modul el. Henriks 1. forsøg m. Power Point.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Mutual Exclusion -- Addendum. Mutual Exclusion in Critical Sections.
Lecture 6: Real-Time Scheduling
Introduction to Real-Time Operating Systems
REAL-TIME OPERATING SYSTEMS
RTOS Scheduling 2.0 Problems - Solutions
Scheduling and Resource Access Protocols: Basic Aspects
Unit OS9: Real-Time and Embedded Systems
EEE 6494 Embedded Systems Design
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy cse321-fall2014 9/20/2018.
Rate Monotonic Analysis For Real-Time Scheduling A presentation for
Realtime System Fundamentals : Scheduling and Priority-based scheduling B. Ramamurthy cse321-fall /27/2018.
Real Time Scheduling Mrs. K.M. Sanghavi.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Processes and operating systems
Failure in the PATHFINDER Mission
Mechanisms for Detecting and Handling Timing Errors
Real-Time Process Scheduling Concepts, Design and Implementations
Real-Time Process Scheduling Concepts, Design and Implementations
Presentation transcript:

A presentation for Brian Evans’ Embedded Software Class By Nate Forman Liaison Technology Inc. 3/30/2000 For Real-Time Scheduling

3/2000Rate Monotonic Analysis, Nate Forman Agenda Introduction Anatomy of a Task Rate Monotonic Principles and Tests Extended Rate Monotonic Analysis Demonstration Mars Pathfinder Mission

3/2000Rate Monotonic Analysis, Nate Forman Introduction Rate Monotonic refers to assigning priorities as a monotonic function of the rate (frequency of occurrence) of those processes. Rate Monotonic Scheduling (RMS) can be accomplished based upon rate monotonic principles. Rate Monotonic Analysis (RMA) can be performed statically on any hard real-time system concept to decide if the system is schedulable.

3/2000Rate Monotonic Analysis, Nate Forman Anatomy of a Task 11 22 33 time Task Execution Time (C)End Of Period (T = Period Length)

3/2000Rate Monotonic Analysis, Nate Forman Rate Monotonic Assumptions All tasks are periodic Task switching is instantaneous Tasks account for all processor execution time Tasks become ready to execute precisely at the beginning of their periods and relinquish the CPU only when execution is complete

3/2000Rate Monotonic Analysis, Nate Forman Rate Monotonic Assumptions (2) Task interactions are not allowed Task deadlines are always at the end of the period Tasks with shorter periods are assigned higher priorities; no other criteria are considered for priority assignment Task execution is always consistent with rate monotonic priority: a lower priority task never executes when a higher priority task is ready

3/2000Rate Monotonic Analysis, Nate Forman Utilization Bound (UB) Test Processor Utilization for a task, i U i = CiCi TiTi Utilization Bound for n tasks U(n) = n(2 - 1) 1 n Results: If  U i ≤ U(n) then the set of tasks is schedulable. If  U i > 1 then the set of tasks is unschedulable. If U(n) <  U i ≤ 1 then the test is inconclusive.

3/2000Rate Monotonic Analysis, Nate Forman UB Test Example Task Execution Time (C) Period (T) 1 2 3 U(3) = 3(2 1/3 – 1) = U 1 = 40 / 100 = 0.4 U 2 = 40 / 150 = U 3 = 100 / 350 = U total = Result: U 1+2 = 0.667, schedulable. However, < < 1 Therefore, inconclusive for  3.

3/2000Rate Monotonic Analysis, Nate Forman Response Time (RT) Test Theorem: If a task meets its first deadline with worst-case task phasing, that deadline will always be met. For the response time for task i, find the least fixed-point of the following recurrence: a 0 =  C j j  H + {i} a n+1 = C i +  C j j  H anan TjTj where H is the set of tasks with higher priority than task i.

3/2000Rate Monotonic Analysis, Nate Forman RT Test Example Task Execution Time (C) Period (T) 1 2 3 a 0 =  C j = = 180 j  H + {i} a 1 = C 3 +  C j = (2 * 40) + (2 * 40) = 260 j  H 180 TjTj a 2 = C 3 +  C j = (3 * 40) + (2 * 40) = 300 j  H 260 TjTj a 3 = C 3 +  C j = (3 * 40) + (2 * 40) = 300 j  H 300 TjTj a 2 = a 3 = <  3 = 350  3 is schedulable.

3/2000Rate Monotonic Analysis, Nate Forman Extensions to RMA Aperiodic task handling Preperiod task deadlines (D i = deadline for task i) Nonzero task switching times (S = task switch time) Interrupt handling for top-priority tasks Task blocking and interaction through shared resources (B i = blocking time for task i)

3/2000Rate Monotonic Analysis, Nate Forman Sporadic Servers A conceptual task that uses its execution budget handling incoming aperiodic tasks Its execution budget is only replenished after a period where it is completely consumed instead of after every period’s end. Avoids deferred execution effect and reduces aperiodic tasks to the same model as periodic tasks

3/2000Rate Monotonic Analysis, Nate Forman Priority Inversion A high priority task is ready to execute, but a lower priority task continues execution because it holds a lock on a shared resource that the high priority task needs. Unbounded priority inversion occurs when a system allows tasks with lower priority than the blocked task to preempt the blocking task.

3/2000Rate Monotonic Analysis, Nate Forman Priority Inversion (2) To successfully share resources, a system needs two properties: freedom from mutual deadlock, and bounded priority inversion. The combination of priority inheritance and the priority ceiling protocol guarantee the above properties. Priority Inheritance: When a task blocks the execution of other, higher priority tasks, it executes at the highest priority of all of the tasks it blocks.

3/2000Rate Monotonic Analysis, Nate Forman Priority Ceiling Protocol Priority Ceiling: of a binary semaphore is the highest priority of all of the tasks that may lock it. A task attempting to a execute critical section is blocked unless its priority is higher than the priority ceilings of all of the locked semaphores in the system. The task holding the lock on the highest priority ceiling semaphore inherits the priorities of tasks blocked in this way.

3/2000Rate Monotonic Analysis, Nate Forman Extended UB Test for  i = D i / T i, redefine utilization bound: U(n,  i ) = n ((2  i ) 1/n – 1) + 1 –  i, 0.5 <  i ≤ 1 i,i,  i ≤ 0.5

3/2000Rate Monotonic Analysis, Nate Forman Extended UB Test (2) +++ C i + 2S TiTi TiTi BiBi f i =  j  Hn C j + 2S TjTj  (C k + 2S) k  H1 TiTi 1 Updated processor utilization: where Hn is the set of higher priority tasks that can preempt task i more than once (shorter periods) and H1 are higher priority tasks that can preempt task i only once (longer periods) Compare each f i to its utilization bound, U(n,  i ). The results can be interpreted as before.

3/2000Rate Monotonic Analysis, Nate Forman Extended RT Test Theorem: If a task meets its first deadline with worst-case task phasing, that deadline will always be met. The above theorem still stands although the deadline is D i instead of T i. For the response time find the least fixed-point of the recurrence below: a 0 = B i +  (C j + 2S) j  H + {i} a n+1 = B i + C i + 2S +  (C j + 2S) j  H anan TjTj where H is the set of tasks with higher priority than task i.

3/2000Rate Monotonic Analysis, Nate Forman What really happened on Mars? (the first time) Two tasks were critical for controlling communication on the lander’s communication bus, the scheduler task (bc_sched) and the distribution task (bc_dist). Each of these tasks checked each cycle to be sure that the other had run successfully. time = s bc_sched bc_dist bus active

3/2000Rate Monotonic Analysis, Nate Forman Mars Pathfinder: The Problem bc_dist was blocked by a much lower priority meteorological science task (ASI/MET) ASI/MET was preempted by several medium priority processes such as accelerometers and radar altimeters. bc_sched started and discovered that bc_dist had not completed. Under these circumstances, bc_sched reacted by reinitializing the lander’s hardware and software and terminating all ground command activities.

3/2000Rate Monotonic Analysis, Nate Forman Mars Pathfinder: Resolution “Faster, better, cheaper” had NASA and JPL using “shrink- wrap” hardware (IBM RS6000) and software (Wind River vxWorks RTOS). Logging designed into vxWorks enabled NASA and Wind River to reproduce the failure on Earth. This reproduction made the priority inversion obvious. NASA patched the lander’s software to enable priority inheritance.

3/2000Rate Monotonic Analysis, Nate Forman Resources Software Engineering Institute, technical reports and presentations on rate monotonic analysis NASA Jet Propulsion Laboratory, information about Mars missions, pictures “Guaranteeing Real-Time Performance Using RMA,” The Embedded Systems Conference, R. Obenza & G. Mendal research.microsoft.com: letter by Glenn Reeves of JPL about Mars Pathfinder mission fall99/ -- The RMADriver Application