Resource Access Control (Part I) The Mars Pathfinder Incident Resource Model Priority Inversion.

Slides:



Advertisements
Similar presentations
Fakultät für informatik informatik 12 technische universität dortmund Resource Access Protocols Peter Marwedel Informatik 12 TU Dortmund Germany 2008/12/06.
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
REAL TIME SYSTEM Scheduling.
Copyright © 2000, Daniel W. Lewis. All Rights Reserved. CHAPTER 8 SCHEDULING.
1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
DEADLOCK. Contents  Principles of deadlock  Deadlock prevention  Deadlock detection.
LUI SHA,RAGUNATHAN RAJKUMAR,JOHN P.LEHOCZKY IEEE TRANSACTIONS ON COMPUTERS, VOL. 39, NO. 9, SEPTEMBER 1990 Repesent : Shu Wei Ho.
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
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)
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
Resource Access Control in Real-Time Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical.
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.
Witawas Srisa-an Chapter 6
Examples of real-time applications On-line transaction systems and interaction systems Real-time monitoring systems Signal processing systems –typical.
CPSC 4650 Operating Systems Chapter 6 Deadlock and Starvation
1 Concurrency: Deadlock and Starvation Chapter 6.
Spring 2002Real-Time Systems (Shin) Rate Monotonic Analysis Assumptions – A1. No nonpreemptible parts in a task, and negligible preemption cost –
UCDavis, ecs251 Fall /23/2007ecs251, fall Operating System Models ecs251 Fall 2007 : Operating System Models #3: Priority Inversion Dr. S.
Concurrency: Deadlock and Starvation Chapter 6. Goal and approach Deadlock and starvation Underlying principles Solutions? –Prevention –Detection –Avoidance.
1 Concurrency: Deadlock and Starvation Chapter 6.
ELN5622 Embedded Systems Class 8 Spring, 2003 Aaron Itskovich
CS 153 Design of Operating Systems Spring 2015 Lecture 11: Scheduling & Deadlock.
Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli CRTS workshop – Barcelona, November,
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
Real Time Scheduling Telvis Calhoun CSc Outline Introduction Real-Time Scheduling Overview Tasks, Jobs and Schedules Rate/Deadline Monotonic Deferrable.
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance 3.6. Deadlock prevention.
Operating Systems 软件学院 高海昌 Operating Systems Gao Haichang, Software School, Xidian University 22 Contents  1. Introduction** 
Deadlocks Silberschatz Ch. 7 and Priority Inversion Problems.
Fall 2013 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Deadlock Detection and Recovery
1 Review of Process Mechanisms. 2 Scheduling: Policy and Mechanism Scheduling policy answers the question: Which process/thread, among all those ready.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2006 Universität Dortmund Periodic scheduling For periodic scheduling, the best that we can do is to.
B. RAMAMURTHY 12/25/2015 Realtime System Fundamentals : Scheduling and Priority-based scheduling Pag e 1.
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
Introduction to Embedded Systems Rabie A. Ramadan 5.
A presentation for Brian Evans’ Embedded Software Class By Nate Forman Liaison Technology Inc. 3/30/2000 For Real-Time Scheduling.
Lab 4 : Real-Time OS Team #7 P 李彥勳 P 謝嵩淮 R 侯凱文.
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.
REAL-TIME OPERATING SYSTEMS
RTOS Scheduling 2.0 Problems - Solutions
Scheduling Review FIFO: RR: + simple
Scheduling and Resource Access Protocols: Basic Aspects
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.
Conditions for Deadlock
Computer Science & Engineering Electrical Engineering
Resource access control -- example
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
DEADLOCK.
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
CHAPTER 8 Resources and Resource Access Control
Examples of real-time applications
Failure in the PATHFINDER Mission
Real-Time Process Scheduling Concepts, Design and Implementations
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
Real-Time Process Scheduling Concepts, Design and Implementations
Presentation transcript:

Resource Access Control (Part I) The Mars Pathfinder Incident Resource Model Priority Inversion

Resource Access Control in Real-Time Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical Sections, Blocking Priority Inversion, Deadlocks Nonpreemptive Critical Sections Priority Inheritance Protocol Priority Ceiling Protocol Stack-Based Protocols

Resource Access Control in Real-Time Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical Sections, Blocking Priority Inversion, Deadlocks Nonpreemptive Critical Sections Priority Inheritance Protocol Priority Ceiling Protocol Stack-Based Protocols

Resource Access Control in Real-Time Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical Sections, Blocking Priority Inversion, Deadlocks Nonpreemptive Critical Sections Priority Inheritance Protocol Priority Ceiling Protocol Stack-Based Protocols

Resource Access Control in Real-Time Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical Sections, Blocking Priority Inversion, Deadlocks Nonpreemptive Critical Sections Priority Inheritance Protocol Priority Ceiling Protocol Stack-Based Protocols

Resource Access Control in Real-Time Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical Sections, Blocking Priority Inversion, Deadlocks Nonpreemptive Critical Sections Priority Inheritance Protocol Priority Ceiling Protocol Stack-Based Protocols

Resource Access Control in Real-Time Systems Resources, Resource Access, and How Things Can Go Wrong: The Mars Pathfinder Incident Resources, Critical Sections, Blocking Priority Inversion, Deadlocks Nonpreemptive Critical Sections Priority Inheritance Protocol Priority Ceiling Protocol Stack-Based Protocols

Mars Pathfinder Incident Landing on July 4, 1997 “experiences software glitches” Pathfinder experiences repeated RESETs after starting gathering of meteorogical data. RESETs generated by watchdog process. Timing overruns caused by priority inversion. Resources: research.microsoft.com/~mbj/Mar s_Pathfinder/Mars_Pathfinder.ht ml

Priority Inversion on Mars Pathfinder Task bc_dist Task ASI/MET other tasks high priority low priority starts locks mutex gets preempted becomes active blocks on mutex Task bc_sched detects overrun

Priority Inversion on Mars Pathfinder Task bc_dist Task ASI/MET other tasks high priority low priority starts locks mutex gets preempted becomes active blocks on mutex Task bc_sched detects overrun

Priority Inversion on Mars Pathfinder Task bc_dist Task ASI/MET other tasks high priority low priority starts locks mutex gets preempted becomes active blocks on mutex Task bc_sched detects overrun

Priority Inversion on Mars Pathfinder Task bc_dist Task ASI/MET other tasks high priority low priority starts locks mutex gets preempted becomes active blocks on mutex Task bc_sched detects overrun

Priority Inversion on Mars Pathfinder Task bc_dist Task ASI/MET other tasks high priority low priority starts locks mutex gets preempted becomes active blocks on mutex Task bc_sched detects overrun

Priority Inversion on Mars Pathfinder Task bc_dist Task ASI/MET other tasks high priority low priority starts locks mutex gets preempted becomes active blocks on mutex Task bc_sched detects overrun

Priority Inversion on Mars Pathfinder Task bc_dist Task ASI/MET other tasks high priority low priority starts locks mutex gets preempted becomes active blocks on mutex Task bc_sched detects overrun

Priority Inversion on Mars Pathfinder Task bc_dist Task ASI/MET other tasks high priority low priority starts locks mutex gets preempted becomes active blocks on mutex Task bc_sched detects overrun

Resource Access: System Model Processor(s) –m types of serially reusable resources R 1,..., R m –An execution of a job J i requires: a processor for e i units of time some resources for exclusive use Resources –Serially Reusable: Allocated to one job at a time. Once allocated, held by the job until no longer needed. –Examples: semaphores, locks, servers,... –Operations: lock(Ri) unlock(Ri) –Resources allocated non-preemptively –Critical sections properly nested

Resource Access: System Model Processor(s) –m types of serially reusable resources R 1,..., R m –An execution of a job J i requires: a processor for e i units of time some resources for exclusive use Resources –Serially Reusable: Allocated to one job at a time. Once allocated, held by the job until no longer needed. –Examples: semaphores, locks, servers,... –Operations: lock(Ri) unlock(Ri) –Resources allocated non-preemptively –Critical sections properly nested

Preemption of Tasks in their Critical Sections Negative effect on schedulability and predictability. Traditional resource management algorithms fail (e.g. Banker’s Algorithm). They decouple resource management decisions from scheduling decisions. Example: T1T1 T2T2 T3T3 lock(s)unlock(s) lock(s) unlock(s) Zzzz!

Unpredictability: Scheduling Anomalies Example:T 1 = (c 1 =2, e 1 = 5, p 1 = 8) T 2 = (4, 7, 22) T 3 = (4, 6, 26) Shorten critical section of T 3 : T 1 = (c 1 =2, e 1 = 5, p 1 = 8) T 2 = (4, 7, 22) T 3 = (2.5, 6, 26)