Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Resource Access Control (Part I) The Mars Pathfinder Incident Resource Model Priority Inversion."— Presentation transcript:

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

2 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

3 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

4 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

5 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

6 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

7 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

8 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

9 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

10 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

11 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

12 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

13 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

14 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

15 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

16 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

17 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

18 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

19 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!

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


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

Similar presentations


Ads by Google