SlideShare a Scribd company logo
1 of 22
RAVINDRA V. JOSHI
MARS – PATH FINDER
Description of the Problem
occurred
 Path Finder was getting reset every now and then
 System appeared to be unstable
 Crucial data was getting lost as system was getting
reset
 No clue what was the problem, as there was no test
report suggested this behavior!!!
 How to analyze? How to debug?? How to correct???
Analysis Of the Problem
 Information bus – High Priority Task
 Data Gathering Task – Low Priority Task
 Information Bus Task was getting reset continuously
 Finally got zeroed-on to Priority Inversion Problem
PROCESSES, TASKS, AND THREADS
 An instance of Program in Execution
 For simplicity’s sake let us use the term, tasks
PROCESSES
TASKS
TASKS AND RESOURCES
 A typical system contains a set of tasks and set of
resources
SCHEDULING – ART OF ASSIGNING
RESOURCES TO TASKS
 FIFO
 Shortest Job First
 Priority based scheduling
 Round Robin
 Pre-emptive and Non-PreEmptive ( Co-operative )
 Longest Waiting First
Priority Based
Pre-Emptive Scheduling
Priority Based
Pre-Emptive Scheduling
Priority Based
Pre-Emptive Scheduling
Priority Based
Pre-Emptive Scheduling
Locking a Resource
DESCRIPTION OF
PRIORITY INVERSION
 Consider 3 Tasks with Priority J<Q<K and a
resource JOKER which is required by J and K but
not by Q
 Currently J is scheduled and it locks JOKER
DESCRIPTION OF
PRIORITY INVERSION
 Now Q becomes Ready and Pre Empts J as it does not
require JOKER
DESCRIPTION OF
PRIORITY INVERSION
 Q got scheduled though K with higher priority is
waiting. This is PRIORITY INVERSION.
DESCRIPTION OF
PRIORITY INVERSION
Solution
 Priority Inheritance = Current Highest Priority
 Priority Ceiling = Statically scheduled
Debugging and Correcting the
problem
 Problem was tried for reproduction on ground by
collected Traces and Logs
 At last, the problem got reproduced when everybody
gave up and went home except one engineer who
finally saw the reproduction
 It turned out that VxWorks( the operating system
inside Path Finder ) had implemented a solution (
with Priority Inheritance ) but that function was called
with parameter false
 A short patch overwriting the parameter was beamed
to Mars and Program was “Corrected” in Mars
LESSONS LEARNT
 Never leave distant machine in Un-debuggable
method. Some format of Remote debugging MUST be
present
 Exercise the options conservatively. When cost of
using or not using “Priority Inheritance” is not
extraordinarily large, use Priority Inheritance
 Do not give up hope 
Unsung Heroes
 But who had found that such problem can occur? It
was quiet three Academicians from Carnegie Mellon
University
 Lui Sha
 John Lehoczky and
 Raj Rajkumar
 Standing Applause
Questions??
THANK YOU
WATCHDOG – The Ultimate Savior
 Basic Principle is – Never to hang
 If required, Automatically Resetting is preferred
 If it finds, that the system is “HUNG”, it will reset the
system

More Related Content

What's hot

What's hot (20)

Trends in Embedded system Design
Trends in Embedded system DesignTrends in Embedded system Design
Trends in Embedded system Design
 
Generation of fm
Generation of fmGeneration of fm
Generation of fm
 
Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems
 
Embedded c
Embedded cEmbedded c
Embedded c
 
UART
UARTUART
UART
 
Embedded System Presentation
Embedded System PresentationEmbedded System Presentation
Embedded System Presentation
 
Atmega 328p
Atmega 328p Atmega 328p
Atmega 328p
 
Von neumann architecture
Von neumann architectureVon neumann architecture
Von neumann architecture
 
Interrupts and types of interrupts
Interrupts and types of interruptsInterrupts and types of interrupts
Interrupts and types of interrupts
 
Equalization
EqualizationEqualization
Equalization
 
Presentation on risc pipeline
Presentation on risc pipelinePresentation on risc pipeline
Presentation on risc pipeline
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18
 
M-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
M-ary Modulation, noise modelling, bandwidth, Bandpass ModulationM-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
M-ary Modulation, noise modelling, bandwidth, Bandpass Modulation
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Arm assembly language programming
Arm assembly language programmingArm assembly language programming
Arm assembly language programming
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
MicroC/OS-II
 

Viewers also liked

Handheld operting system
Handheld operting systemHandheld operting system
Handheld operting systemAj Maurya
 
Inter process communication
Inter process communicationInter process communication
Inter process communicationRJ Mehul Gadhiya
 
Interprocess communication
Interprocess communicationInterprocess communication
Interprocess communicationSushil Singh
 
Inter process communication
Inter process communicationInter process communication
Inter process communicationMohd Tousif
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 

Viewers also liked (8)

Handheld operting system
Handheld operting systemHandheld operting system
Handheld operting system
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Interprocess communication
Interprocess communicationInterprocess communication
Interprocess communication
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 

Similar to Priority inversion

How to Get Automatic Analysis for Load Test Results
How to Get Automatic Analysis for Load Test ResultsHow to Get Automatic Analysis for Load Test Results
How to Get Automatic Analysis for Load Test ResultsClare Avieli
 
Performing Oracle Health Checks Using APEX
Performing Oracle Health Checks Using APEXPerforming Oracle Health Checks Using APEX
Performing Oracle Health Checks Using APEXDatavail
 
If The Singularity Arrives, Will It Be By Design Or Evolution?
If The Singularity Arrives, Will It Be By Design Or Evolution?If The Singularity Arrives, Will It Be By Design Or Evolution?
If The Singularity Arrives, Will It Be By Design Or Evolution?billwzel
 
Lecture 7: Troubleshooting Deep Neural Networks (Full Stack Deep Learning - S...
Lecture 7: Troubleshooting Deep Neural Networks (Full Stack Deep Learning - S...Lecture 7: Troubleshooting Deep Neural Networks (Full Stack Deep Learning - S...
Lecture 7: Troubleshooting Deep Neural Networks (Full Stack Deep Learning - S...Sergey Karayev
 
Preventing the Next Deployment Issue with Continuous Performance Testing and ...
Preventing the Next Deployment Issue with Continuous Performance Testing and ...Preventing the Next Deployment Issue with Continuous Performance Testing and ...
Preventing the Next Deployment Issue with Continuous Performance Testing and ...Correlsense
 
Performance Analysis of Idle Programs
Performance Analysis of Idle ProgramsPerformance Analysis of Idle Programs
Performance Analysis of Idle Programsgreenwop
 
Risk-Based Attack Surface Approximation: How Much Data is Enough? [ICSE - SEI...
Risk-Based Attack Surface Approximation: How Much Data is Enough? [ICSE - SEI...Risk-Based Attack Surface Approximation: How Much Data is Enough? [ICSE - SEI...
Risk-Based Attack Surface Approximation: How Much Data is Enough? [ICSE - SEI...Chris Theisen
 
Open-source tools for generating and analyzing large materials data sets
Open-source tools for generating and analyzing large materials data setsOpen-source tools for generating and analyzing large materials data sets
Open-source tools for generating and analyzing large materials data setsAnubhav Jain
 
Troubleshooting Deep Neural Networks - Full Stack Deep Learning
Troubleshooting Deep Neural Networks - Full Stack Deep LearningTroubleshooting Deep Neural Networks - Full Stack Deep Learning
Troubleshooting Deep Neural Networks - Full Stack Deep LearningSergey Karayev
 
Talk-Foutse-SrangeLoop.pdf
Talk-Foutse-SrangeLoop.pdfTalk-Foutse-SrangeLoop.pdf
Talk-Foutse-SrangeLoop.pdfFoutse Khomh
 
It Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
It Does What You Say, Not What You Mean: Lessons From A Decade of Program RepairIt Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
It Does What You Say, Not What You Mean: Lessons From A Decade of Program RepairClaire Le Goues
 
Reactome: Usability testing - is it useful?
Reactome: Usability testing - is it useful? Reactome: Usability testing - is it useful?
Reactome: Usability testing - is it useful? Francis Rowland
 
Face Identification for Humanoid Robot
Face Identification for Humanoid RobotFace Identification for Humanoid Robot
Face Identification for Humanoid Robotthomaswangxin
 
Neural Networks and Deep Learning
Neural Networks and Deep LearningNeural Networks and Deep Learning
Neural Networks and Deep LearningAsim Jalis
 
LanceShivnathHadoopSummit2015
LanceShivnathHadoopSummit2015LanceShivnathHadoopSummit2015
LanceShivnathHadoopSummit2015Lance Co Ting Keh
 
Semantical Cognitive Scheduling
Semantical Cognitive SchedulingSemantical Cognitive Scheduling
Semantical Cognitive Schedulingigalshilman
 
Apache MXNet ODSC West 2018
Apache MXNet ODSC West 2018Apache MXNet ODSC West 2018
Apache MXNet ODSC West 2018Apache MXNet
 
Quick and dirty performance analysis
Quick and dirty performance analysisQuick and dirty performance analysis
Quick and dirty performance analysisChris Kernaghan
 

Similar to Priority inversion (20)

How to Get Automatic Analysis for Load Test Results
How to Get Automatic Analysis for Load Test ResultsHow to Get Automatic Analysis for Load Test Results
How to Get Automatic Analysis for Load Test Results
 
Performing Oracle Health Checks Using APEX
Performing Oracle Health Checks Using APEXPerforming Oracle Health Checks Using APEX
Performing Oracle Health Checks Using APEX
 
If The Singularity Arrives, Will It Be By Design Or Evolution?
If The Singularity Arrives, Will It Be By Design Or Evolution?If The Singularity Arrives, Will It Be By Design Or Evolution?
If The Singularity Arrives, Will It Be By Design Or Evolution?
 
My flings with data analysis
My flings with data analysisMy flings with data analysis
My flings with data analysis
 
Lecture 7: Troubleshooting Deep Neural Networks (Full Stack Deep Learning - S...
Lecture 7: Troubleshooting Deep Neural Networks (Full Stack Deep Learning - S...Lecture 7: Troubleshooting Deep Neural Networks (Full Stack Deep Learning - S...
Lecture 7: Troubleshooting Deep Neural Networks (Full Stack Deep Learning - S...
 
Preventing the Next Deployment Issue with Continuous Performance Testing and ...
Preventing the Next Deployment Issue with Continuous Performance Testing and ...Preventing the Next Deployment Issue with Continuous Performance Testing and ...
Preventing the Next Deployment Issue with Continuous Performance Testing and ...
 
Performance Analysis of Idle Programs
Performance Analysis of Idle ProgramsPerformance Analysis of Idle Programs
Performance Analysis of Idle Programs
 
Risk-Based Attack Surface Approximation: How Much Data is Enough? [ICSE - SEI...
Risk-Based Attack Surface Approximation: How Much Data is Enough? [ICSE - SEI...Risk-Based Attack Surface Approximation: How Much Data is Enough? [ICSE - SEI...
Risk-Based Attack Surface Approximation: How Much Data is Enough? [ICSE - SEI...
 
Open-source tools for generating and analyzing large materials data sets
Open-source tools for generating and analyzing large materials data setsOpen-source tools for generating and analyzing large materials data sets
Open-source tools for generating and analyzing large materials data sets
 
Troubleshooting Deep Neural Networks - Full Stack Deep Learning
Troubleshooting Deep Neural Networks - Full Stack Deep LearningTroubleshooting Deep Neural Networks - Full Stack Deep Learning
Troubleshooting Deep Neural Networks - Full Stack Deep Learning
 
Talk-Foutse-SrangeLoop.pdf
Talk-Foutse-SrangeLoop.pdfTalk-Foutse-SrangeLoop.pdf
Talk-Foutse-SrangeLoop.pdf
 
It Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
It Does What You Say, Not What You Mean: Lessons From A Decade of Program RepairIt Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
It Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
 
Reactome: Usability testing - is it useful?
Reactome: Usability testing - is it useful? Reactome: Usability testing - is it useful?
Reactome: Usability testing - is it useful?
 
Face Identification for Humanoid Robot
Face Identification for Humanoid RobotFace Identification for Humanoid Robot
Face Identification for Humanoid Robot
 
Neural Networks and Deep Learning
Neural Networks and Deep LearningNeural Networks and Deep Learning
Neural Networks and Deep Learning
 
LanceShivnathHadoopSummit2015
LanceShivnathHadoopSummit2015LanceShivnathHadoopSummit2015
LanceShivnathHadoopSummit2015
 
Semantical Cognitive Scheduling
Semantical Cognitive SchedulingSemantical Cognitive Scheduling
Semantical Cognitive Scheduling
 
Apache MXNet ODSC West 2018
Apache MXNet ODSC West 2018Apache MXNet ODSC West 2018
Apache MXNet ODSC West 2018
 
DefenseTalk_Trimmed
DefenseTalk_TrimmedDefenseTalk_Trimmed
DefenseTalk_Trimmed
 
Quick and dirty performance analysis
Quick and dirty performance analysisQuick and dirty performance analysis
Quick and dirty performance analysis
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Priority inversion

  • 2. MARS – PATH FINDER
  • 3. Description of the Problem occurred  Path Finder was getting reset every now and then  System appeared to be unstable  Crucial data was getting lost as system was getting reset  No clue what was the problem, as there was no test report suggested this behavior!!!  How to analyze? How to debug?? How to correct???
  • 4. Analysis Of the Problem  Information bus – High Priority Task  Data Gathering Task – Low Priority Task  Information Bus Task was getting reset continuously  Finally got zeroed-on to Priority Inversion Problem
  • 5. PROCESSES, TASKS, AND THREADS  An instance of Program in Execution  For simplicity’s sake let us use the term, tasks PROCESSES TASKS
  • 6. TASKS AND RESOURCES  A typical system contains a set of tasks and set of resources
  • 7. SCHEDULING – ART OF ASSIGNING RESOURCES TO TASKS  FIFO  Shortest Job First  Priority based scheduling  Round Robin  Pre-emptive and Non-PreEmptive ( Co-operative )  Longest Waiting First
  • 13. DESCRIPTION OF PRIORITY INVERSION  Consider 3 Tasks with Priority J<Q<K and a resource JOKER which is required by J and K but not by Q
  • 14.  Currently J is scheduled and it locks JOKER DESCRIPTION OF PRIORITY INVERSION
  • 15.  Now Q becomes Ready and Pre Empts J as it does not require JOKER DESCRIPTION OF PRIORITY INVERSION
  • 16.  Q got scheduled though K with higher priority is waiting. This is PRIORITY INVERSION. DESCRIPTION OF PRIORITY INVERSION
  • 17. Solution  Priority Inheritance = Current Highest Priority  Priority Ceiling = Statically scheduled
  • 18. Debugging and Correcting the problem  Problem was tried for reproduction on ground by collected Traces and Logs  At last, the problem got reproduced when everybody gave up and went home except one engineer who finally saw the reproduction  It turned out that VxWorks( the operating system inside Path Finder ) had implemented a solution ( with Priority Inheritance ) but that function was called with parameter false  A short patch overwriting the parameter was beamed to Mars and Program was “Corrected” in Mars
  • 19. LESSONS LEARNT  Never leave distant machine in Un-debuggable method. Some format of Remote debugging MUST be present  Exercise the options conservatively. When cost of using or not using “Priority Inheritance” is not extraordinarily large, use Priority Inheritance  Do not give up hope 
  • 20. Unsung Heroes  But who had found that such problem can occur? It was quiet three Academicians from Carnegie Mellon University  Lui Sha  John Lehoczky and  Raj Rajkumar  Standing Applause
  • 22. WATCHDOG – The Ultimate Savior  Basic Principle is – Never to hang  If required, Automatically Resetting is preferred  If it finds, that the system is “HUNG”, it will reset the system

Editor's Notes

  1. L. Sha, R. Rajkumar, and J. P. Lehoczky. Priority Inheritance Protocols: An Approach to Real-Time Synchronization. In IEEE Transactions on Computers, vol. 39, pp. 1175-1185, Sep. 1990.