Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Enhhanced mutex priority inheritance algorithm #261

Open
rhajdaj opened this issue Feb 11, 2021 · 0 comments
Open

[Feature Request] Enhhanced mutex priority inheritance algorithm #261

rhajdaj opened this issue Feb 11, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@rhajdaj
Copy link

rhajdaj commented Feb 11, 2021

Is your feature request related to a problem? Please describe.
See this thread for a good, detailed explanation of the desired enhancement (esp, the initial entry by mastupristi):
https://forums.freertos.org/t/priority-inheritance-proposal/11175
See attached image.

Describe the solution you'd like
An enhanced version of the priority inversion algorithm that disinherits the promoted task when the mutex that caused the inheritance is given back (as opposed to the last mutex held by the task is given back).

Describe alternatives you've considered

  1. A mutex semaphore, in which case the developer must be sure that no other mutexes are taken while the outer mutex is held. This takes additional effort (esp with third party software) by developers who want to be "lazy" with regard to mutex use.
  2. A binary semaphore, which is subject to priority inversion.
    We're currently using option 2, but would prefer to use a mutex to protect against priority inversion.

Additional context
For Xilinx users, this issue is particularly problematic because many Xilinx drivers use "busy waits" for I/O out of the box. Because of this, if a task that calls "busy CPU" driver functions is disinherited later than it could be, this will mean 100% starvation for all tasks below or equal to the inherited priority until the loop finishes, which can be a long time for large I/O operations.
priority_inheritance

@rhajdaj rhajdaj added the enhancement New feature or request label Feb 11, 2021
laroche pushed a commit to laroche/FreeRTOS-Kernel that referenced this issue Apr 18, 2024
* Update Tracelyzer version numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant