Explore chapters and articles related to this topic
Real-Time Operating Systems
Published in Leanna Rierson, Developing Safety-Critical Software, 2017
Priority inversion is a type of deadlock that occurs when a high priority task is forced to wait for the release of a shared resource owned by a lower priority task. “The period of time that a task has a lock on a shared resource is called the task’s critical section or critical region” [21]. A famous example of priority inversion is the Mars Pathfinder mission. A few days into the mission, the Pathfinder started to have persistent resets, causing loss of the system for long periods of time. Testing and analysis revealed that the problem was caused by priority inversion. A low priority software task on the Pathfinder shared a resource with a high priority task. The low priority task blocked the shared resource after it was preempted by some medium priority tasks. “When another high priority task discovered the previous high priority task had not completed, it initiated a system reset” [5]. A global default setting in the RTOS allowed the priority inversion.
Vehicle Functional Domains and Their Requirements
Published in Nicolas Navet, Françoise Simonot-Lion, Automotive Embedded Systems Handbook, 2017
Françoise Simonot-Lion, Yvon Trinquet
OSEK/VDX OS provides services on objects like tasks (“basic tasks,” without blocking point, and “extended tasks,” that can include blocking points), events, resources, and alarms. It proposes a fixed priority (FP) scheduling policy that is applied to tasks that can be preemptive or non-preemptive, and combined with a reduced version of the priority ceiling protocol (PCP) [28,29] in order to avoid priority inversion or deadlock due to exclusive resource access. Intertask synchronization is achieved through private events and alarms. The implementation of an OSEK/VDX specification has to be compliant to one of the four conformance classes—BCC1, BCC2, ECCI, ECC2—that are specified according to the supported tasks (basic only or basic and extended), the number of tasks on each priority level (only one or possibly several), and the constraints of the reactivation counter (only one or possibly several). BCC1 defines a restricted implementation that aims to minimize the size of the corresponding memory footprint, the size of the data structures, and the complexity of the management algorithms. ECC2 specifies the implementation of all the services. The MODISTARC project (Methods and tools for the validation of OSEK/VDX based DISTributed ARChitectures) [30] provided the relevant test methods and tools to assess the compliance of OSEK/VDX implementations.
Task Interactions and Blocking
Published in Ivan Cibrario Bertolotti, Gabriele Manduchi, Real-Time Embedded Systems, 2017
Ivan Cibrario Bertolotti, Gabriele Manduchi
This happens even in very simple cases, for example, when several tasks access a shared resource by means of a critical region protected by a mutual exclusion semaphore. Once a lower-priority task enters its critical region, the semaphore mechanism will block any higher-priority task wanting to enter its own critical region protected by the same semaphore and force it to wait until the former exits. This phenomenon is called priority inversion and, if not adequately addressed, can have adverse effects on the schedulability of the system, to the point of making the response time of some tasks completely unpredictable because the priority inversion region may last for an unbounded amount of time. Accordingly, such as a situation is usually called unbounded priority inversion.
Stack-Based Dynamic Resource Access Control Protocol for Real-Time Systems
Published in IETE Journal of Research, 2022
Rumpa Hazra, Shouvik Dey, Ananya Kanjilal, Swapan Bhattacharya
In real-time systems, uncontrolled priority inversion may cause the missing of the deadlines which is absolutely undesirable for hard real-time systems. An alternative protocol, the Immediate Priority Ceiling [5] of the priority inheritance is proposed and implemented for real-time drivers.