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
Simplified priority inheritance explanation #88
Conversation
Add explanation of mutex priority inheritance behavior along with important differences a user should be aware of.
ch08.md
Outdated
@@ -713,7 +716,7 @@ FreeRTOS mutexes and binary semaphores are very similar—the difference | |||
being that mutexes include a basic 'priority inheritance' mechanism, | |||
whereas binary semaphores do not. Priority inheritance is a scheme that | |||
minimizes the negative effects of priority inversion. It does not 'fix' | |||
priority inversion, but merely lessens its impact by ensuring that the | |||
priority inversion, but merely lessens its impact by ensuring that the∏ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra character get introduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix this
ch08.md
Outdated
@@ -737,6 +740,23 @@ As just seen, priority inheritance functionality effects the priority of | |||
tasks that are using the mutex. For that reason, mutexes must not be | |||
used from interrupt service routines. | |||
|
|||
The priority inheritance scheme implemented by FreeRTOS is described as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
"FreeRTOS implements a basic priority inheritance mechanism which was designed with optimizing both space and execution cycles in mind."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update this in the next commit
ch08.md
Outdated
at a time. | ||
|
||
Specific behaviors of the priority inheritance mechanism to keep in mind: | ||
* A task can have an already inherited priority raised further if it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
"A task can have an already"
to
"A task can have its already"
ch08.md
Outdated
at a time. | ||
|
||
Specific behaviors of the priority inheritance mechanism to keep in mind: | ||
* A task can have an already inherited priority raised further if it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest breaking this up into multiple bullet points to make it clear that priority is only disinherited after all mutexes are released. It does not depend on if the second mutex was acquired before or after priority is increased through inheritance.
Description of changes:
Add explanation of mutex priority inheritance
behavior along with important differences a
user should be aware of.
Issue #, if available:
FreeRTOS/FreeRTOS#1168
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.