Introduction to RTOS Part 11 - Priority Inversion | Digi-Key Electronics

Introduction to RTOS Part 11 - Priority Inversion | Digi-Key Electronics

Exploring Globalization and Personal Connections

The Intersection of Globalization and Personal Experience

  • Discussion begins with a reference to the impact of globalization, highlighting how it intertwines with personal experiences and societal conditions.
  • Mention of "Amazing ended" as an example of globalization, suggesting that technology has transformed our daily interactions and perceptions.
  • The speaker reflects on dreams and aspirations, indicating a sense of distance from these ideals due to external pressures or realities.

Reflections on Relationships and Communication

  • A metaphorical comparison is made between relationships and sports cars, emphasizing the need for effective communication in maintaining connections.
  • The importance of being present in relationships is discussed; using technology should not replace genuine human interaction.

Challenges in Modern Life

  • The speaker addresses the challenges faced when trying to balance personal desires with societal expectations, particularly regarding travel and exploration.
  • There’s a contemplation on love and connection amidst distractions, stressing the significance of prioritizing meaningful relationships over superficial engagements.

Navigating Information Overload

  • Acknowledgment of information overload in modern society; individuals often struggle to discern valuable insights from excessive data.
  • Emphasis on the necessity for clarity in communication—both written and verbal—to foster understanding among diverse audiences.

Cultural References and Their Impact

  • Cultural references are used to illustrate points about identity; they serve as touchstones for shared experiences but can also create barriers if misunderstood.
  • Reflection on how cultural narratives shape individual perspectives, influencing both personal choices and broader societal trends.

Epic Quest and Personal Reflections

Overview of Themes and Concepts

  • Discussion on the significance of personal experiences in shaping one's understanding of history, particularly through metaphors like "One Touch Idol" and references to American history.
  • Exploration of confidence in various contexts, including tests and personal challenges, emphasizing the importance of resilience and adaptability.
  • Mention of collaboration among diverse groups, highlighting how different perspectives contribute to problem-solving in both personal and professional settings.
  • Introduction to technology's role in enhancing communication and connection, with a focus on apps that facilitate engagement during significant life events like weddings.
  • Reflection on the balance between public transportation costs and personal relationships, suggesting that love can transcend financial concerns.

Insights into Personal Growth

  • The impact of social interactions on self-perception; discussing how external validation influences individual confidence levels.
  • Emphasis on the necessity for physical activity as part of a balanced lifestyle; linking mental well-being with physical health practices.
Video description

Priority inversion is a nasty concurrency bug that occurs when a low priority thread prevents a high priority thread from running. In a sense, the priority structure has been “inverted,” as the low priority thread gets to run first. The code for the challenge, which starts with unbounded priority inversion, can be found here: https://github.com/ShawnHymel/introduction-to-rtos/blob/main/11-priority-inversion/esp32-freertos-11-demo-priority-inversion/esp32-freertos-11-demo-priority-inversion.ino The solution to the challenge can be found here: https://www.digikey.com/en/maker/projects/introduction-to-rtos-solution-to-part-11-priority-inversion/abf4b8f7cd4a4c70bece35678d178321 Code for this video series (including demonstrations, challenges, and solutions) can be found here: https://github.com/ShawnHymel/introduction-to-rtos Bounded priority inversion happens in the simple case where a high priority task takes a lock (e.g. mutex or semaphore) and prevents a high priority task from running, as the high priority task is blocked waiting for the same lock. We consider this “bounded” because the blocking is bounded by the length of time the low priority task is executing inside the critical section (prior to returning the lock). Preventing bounded priority inversion requires careful thinking about how the threads interact and either limiting or avoiding critical sections. One possible solution is to create a task (or thread) that manages a shared resource. All other threads must use queues (or other synchronization techniques) to send and receive data from this task. Unbounded priority inversion occurs when a medium priority task preempts a low priority task that’s holding a lock needed by a high priority task. It’s “unbounded” because the amount of time that the high priority task is blocked is dependent on the time the medium task runs without yielding to the low priority task (which needs to release the lock). We can prevent unbounded priority inversion through the use of the priority ceiling protocol or priority inheritance, which we cover in the video. Both techniques require that the priorities of tasks can be dynamically changed at runtime. Note that both techniques do not prevent bounded priority inversion. Product Links: https://www.digikey.com/en/products/detail/adafruit-industries-llc/3405/7244967 Related Videos: Introduction to RTOS Part 1 - What is a Real-Time Operating System (RTOS)? - https://youtu.be/F321087yYy4​ Introduction to RTOS Part 2 - Getting Started with FreeRTOS - https://youtu.be/JIr7Xm_riRs​ Introduction to RTOS Part 3 - Task Scheduling - https://youtu.be/95yUbClyf3E​ Introduction to RTOS Part 4 - Memory Management - https://youtu.be/Qske3yZRW5I​ Introduction to RTOS Part 5 - Queue - https://youtu.be/pHJ3lxOoWeI​ Introduction to RTOS Part 6 - Mutex - https://youtu.be/I55auRpbiTs​ Introduction to RTOS Part 7 - https://youtu.be/5JcMtbA9QEE​ Introduction to RTOS Part 8 - https://youtu.be/b1f1Iex0Tso Introduction to RTOS Part 9 - https://youtu.be/qsflCf6ahXU Introduction to RTOS Part 10 - https://youtu.be/hRsWi4HIENc Introduction to RTOS Part 11 - https://youtu.be/C2xKhxROmhA Introduction to RTOS Part 12 - https://youtu.be/LPSHUcH5aQc Related Project Links: https://www.digikey.com/en/maker/projects/introduction-to-rtos-solution-to-part-11-priority-inversion/abf4b8f7cd4a4c70bece35678d178321 Related Articles: https://www.digikey.com/en/maker/videos/shawn-hymel/getting-started-with-stm32-and-nucleo-part-3-how-to-run-multiple-threads-with-cmsis-rtos-interface Learn more: Maker.io - https://www.digikey.com/en/maker Digi-Key’s Blog – TheCircuit https://www.digikey.com/en/blog Connect with Digi-Key on Facebook https://www.facebook.com/digikey.electronics/ And follow us on Twitter https://twitter.com/digikey