Glossary · Automation software engineering and architecture
Priority inheritance
Also known as: Priority inheritance protocol
German: Prioritätsvererbung
In real-time systems, priority inheritance is a protocol in which a task holding a resource that a higher-priority task is waiting for temporarily inherits that higher priority until it releases the resource, limiting priority inversion.
- Software engineering
In one sentence
Priority inheritance temporarily raises a resource-holding task to the priority of a waiting task, limiting priority inversion.
Example
A low-priority logging task holds the mutex of the diagnostic buffer; when the motion task blocks on it, the logging task runs at motion priority until it releases the mutex.
How it applies
- Engineering: Many RTOS mutexes support priority inheritance, sometimes only as an option. Engineers check that it is enabled for mutexes shared between tasks of different priorities.
- Verification: Priority inheritance bounds but does not remove blocking; the blocking time still belongs in the response-time analysis.
- Documentation: Software design documents should record which synchronization protocol is used, as this is evidence for timing claims in the architecture.
Priority inheritance vs. priority ceiling
With priority inheritance, a task's priority is raised only when a higher-priority task actually blocks. With the priority ceiling protocol, a task's priority is raised to a predefined ceiling as soon as it takes the resource, which also prevents certain deadlocks.