Explore chapters and articles related to this topic
Inter-Thread Synchronization
Published in Yi Qiu, Puxiang Xiong, Tianlong Zhu, The Design and Implementation of the RT-Thread Operating System, 2020
Yi Qiu, Puxiang Xiong, Tianlong Zhu
In the RT-Thread operating system, mutex can solve the priority inversion problem and implement the priority inheritance algorithm. Priority inheritance solves the problems caused by priority inversion by raising the priority of thread C to the priority of thread A during the period when thread A is suspended trying to access the shared resource. This prevents C (indirectly preventing A) from being preempted by B, as shown in Figure 6.8. Priority inheritance refers to raising the priority of a low-priority thread that occupies a certain resource, making the priority level of the low-priority thread equal to the priority of the thread with the highest priority level among all threads waiting for the resource, and then executes. When this low-priority thread releases the resource, the priority level returns to the initial setting. Therefore, threads that inherit priority help prevent the system resources from being preempted by any intermediate-priority thread.
Introduction
Published in Joseph Y.-T. Leung, Handbook of SCHEDULING, 2004
Priority ceiling protocol is the basic priority inheritance protocol with an additional priority ceiling rule. Under the priority ceiling protocol, the priority ceiling of a semaphore S is defined as the maximum priority of all the jobs that may ever use this semaphore. That is, ceil(S)=maxiπi∣τimay lockS
Integration Testing
Published in Chris Hobbs, Embedded Software Development for Safety-Critical Systems, 2019
One mechanism for avoiding the priority inversion is known as priority inheritance. With this technique, the priority of the task holding the mutex is artificially raised to the highest of its natural priority and that of any task waiting for the mutex. In the example above, T1 would have been raised to T3’s priority in step sec(3). This would have meant that it would have continued to run, even after T2 came ready and the suspension of T3 by a lower priority task would not have occurred.
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
Wang et al. [7] have carried out a research based on the layered scheduling algorithm which is a refinement of priority inheritance and PCPs. The Layered Priority Inheritance Protocol and the Layered Priority Ceiling Protocol are proposed in a layered scheduling environment where priority inversion and the occurrence of deadlock are prevented.