У нас вы можете посмотреть бесплатно Introduction to RTOS Part 7 - Semaphore | Digi-Key Electronics или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
A semaphore is a signaling mechanism used to synchronise two or more threads. Similar to a mutex, it can be used to protect shared resources. In this video, we show you how to use semaphores with FreeRTOS on an ESP32 to pass data between tasks. The starting code for the challenge can be found here: https://github.com/ShawnHymel/introdu... The solution to the challenge in the video can be found here: https://www.digikey.com/en/maker/proj... Code for this video series (including demonstrations, challenges, and solutions) can be found here: https://github.com/ShawnHymel/introdu... A semaphore is similar to a mutex in that it is a locking mechanism used to tell tasks to wait if some resource is not available for use. However, semaphores are more than a simple lock: they can count to more than 1 and can therefore allow multiple threads to enter a critical section of code. In practice, however, we often do not want to let multiple threads manipulate shared data, and we would still need to protect that data (or shared resource) with something like a mutex. So, we use semaphores as a signaling mechanism to tell other threads when it is safe to access a resource or read new data. A buffer or linked list can be written to by a number of “producer” threads. Each time one of these producer threads adds data to this resource, it increments a semaphore, which is just a counting variable that can be accessed atomically. When a “consumer” thread wishes to read data from the resource, it decrements the semaphore count. If the semaphore is 0, that means no new data is available, so consumer threads must wait (e.g. enter the blocked state). Semaphores work similarly to mutex, but are generally used in different circumstances. We provide examples of these use cases in the video as well as issue a challenge to use semaphores on your own. Product Links: https://www.digikey.com/en/products/d... Related Videos: Introduction to RTOS Part 1 - What is a Real-Time Operating System (RTOS)? - • Introduction to RTOS Part 1 - What is... Introduction to RTOS Part 2 - Getting Started with FreeRTOS - • Introduction to RTOS Part 2 - Getting... Introduction to RTOS Part 3 - Task Scheduling - • Introduction to RTOS Part 3 - Task Sc... Introduction to RTOS Part 4 - Memory Management - • Introduction to RTOS Part 4 - Memory ... Introduction to RTOS Part 5 - Queue - • Introduction to RTOS Part 5 - Queue |... Introduction to RTOS Part 6 - Mutex - • Introduction to RTOS Part 6 - Mutex |... Introduction to RTOS Part 7 - • Introduction to RTOS Part 7 - Semapho... Introduction to RTOS Part 8 - • Introduction to RTOS Part 8 - Softwar... Introduction to RTOS Part 9 - • Introduction to RTOS Part 9 - Hardwar... Introduction to RTOS Part 10 - • Introduction to RTOS Part 10 - Deadlo... Introduction to RTOS Part 11 - • Introduction to RTOS Part 11 - Priori... Introduction to RTOS Part 12 - • Introduction to RTOS Part 12 - Multic... Related Project Links: https://www.digikey.com/en/maker/proj... Related Articles: https://www.digikey.com/en/maker/vide... 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 / digikey.electronics And follow us on Twitter / digikey