Skip to Content
Hands-On RTOS with Microcontrollers
book

Hands-On RTOS with Microcontrollers

by Brian Amos
May 2020
Intermediate to advanced
496 pages
13h 54m
English
Packt Publishing
Content preview from Hands-On RTOS with Microcontrollers

Mutexes minimize priority inversion

Earlier, we had said that, in FreeRTOS, mutexes were binary semaphores with one important additional feature. That important feature is priority inheritance  mutexes have the ability to temporarily change the priority of a task to avoid causing major delays in the system. This plays out when the scheduler finds that a high priority task is attempting to acquire a mutex already held by a lower priority task. In this specific case, the scheduler will temporarily increase the priority of the lower task until it releases the mutex. At this point, the priority of the lower task will be set back to what it was prior to the priority inheritance. Let's take a look at the exact same example from the preceding diagram ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RTOS with Microcontrollers - Second Edition

Hands-On RTOS with Microcontrollers - Second Edition

Jim Yuill, Penn Linder

Publisher Resources

ISBN: 9781838826734Supplemental Content