17 questions
1 vote
0 answers
20 views
OSEK, shared resource and priority inversion
I'm encountering an issue with 3 tasks running on SimulIDE. 2 of them share the same resource. A has priority higher than C (they 2 share the resource), but as soon as C requests the resource, it ...
45 votes
5 answers
56k views
After switching to Xcode 14 beta I got this error: QOS_CLASS_USER_INITIATED waiting on a lower QoS thread running at QOS_CLASS_DEFAULT
My app is working well and I didn't get this error on Xcode 13.4, Is it Xcode 14 beta bug or I'm doing some bad threading?! Thread running at QOS_CLASS_USER_INITIATED waiting on a lower QoS thread ...
0 votes
0 answers
268 views
Is there a way to implement inheritance priority mutex in win32?
I've read the documentation about priority inversion in win32. It seems that the operating system's scheduler handles this case by boosting a waiting thread's priority randomly. Does that mean that ...
2 votes
2 answers
741 views
FreeRTOS mutex priority inheritance problem if changing priority of task
Here is the scenario I am not sure will be the problem. Foo() { TakeMutex() //some critical code GiveMutex() } Task A priority 5 Task B priority 1 TaskB{ Foo() } TaskA{ Foo() } now in some ...
0 votes
1 answer
91 views
Can this lead to an issue similar to priority inversion
My project has a practice of reducing the priority of the thread while writing to a file and changing it back after the write operation is complete. This is done because the file write operation could ...
4 votes
1 answer
1k views
Does SCHED_IDLE actually preclude execution on non-idle core?
I'm trying to implement an unprivileged test case for unbounded priority inversion in the absence of priority inheritance mutexes, using SCHED_IDLE. The test works with SCHED_FIFO and different ...
0 votes
1 answer
263 views
Keil RTX priority inheritance with os_mut_wait and short timeout?
Priority Inheritance is a feature of Keil RTX (and others) to prevent priority inversion. If a high priority task is trying to obtain the mutex already obtained by a low level task, priority ...
0 votes
2 answers
2k views
Interruption of process in critical section
In Priority based scheduling, I came across the problem of Priority inversion which is a higher priority process is forced to wait for the lower priority task. One possible scenario is, consider ...
0 votes
1 answer
2k views
About deadlock in Linux and Windows
Assume you have two processes, P1 and P2. P1 has a high priority, P2 has a low priority. P1 and P2 have one shared semaphore (i.e., they both carry out waits and posts on the same semaphore). The ...
2 votes
1 answer
2k views
ARM Cortex-M4 Interrupt priorities
I'm using an ARM Cortex-M4 MCU. If I have an interrupt handler for a GPIO at priority 2 and an SPI driver at priority 3 (i.e., lower priority than the GPIO's), and I call a (blocking) SPI read from ...
6 votes
4 answers
315 views
Releasing multiple locks without causing priority inversion
Short version: How do I release multiple locks from a single thread, without being preempted halfway through? I have a program which is designed to run on an N-core machine. It consists of one main ...
3 votes
1 answer
3k views
How does priority ceiling protocol works
In the below scenario how the priority of the task t1 will change when the locks are released, assuming Sem_Take() and Sem_Give() are lock and release method. I understand that using priority ceiling ...
7 votes
1 answer
1k views
Can priority inversion occur in Android
Priority inversion is a problem which can occur during scheduling of threads/processes, due to priorities associated with them. Priority inversion is a problematic scenario in scheduling in which a ...
0 votes
1 answer
64 views
Does happen-before relationship impact priority inversion?
I am wondering does happen-before relationship such as volatile variable or finally block to release a lock have something to do priority inversion? I understand that these impose a happen-before ...
1 vote
1 answer
573 views
POSIX mutex protocol - what exactly does this spec mean?
In this documentation of POSIX mutex protocols - http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_getprotocol.html# - we can read following section: While a thread is ...