Hello,
I’m trying to understand semaphores in RTOS. From what I know, a task can be in three states ready, running, or blocked. I’ve also read that semaphores are used as a signaling mechanism to share resources.
But I’m still confused about one thing: why were semaphores originally developed? What specific problem were they meant to solve?
For example, suppose we have two tasks with the same priority, and both of them want to access the same resource (say a shared peripheral). I think Without some kind of control, both tasks might try to use it at the same time and cause conflicts. I’ve heard that semaphores help in this situation, but I don’t fully get it
I’m trying to understand semaphores in RTOS. From what I know, a task can be in three states ready, running, or blocked. I’ve also read that semaphores are used as a signaling mechanism to share resources.
But I’m still confused about one thing: why were semaphores originally developed? What specific problem were they meant to solve?
For example, suppose we have two tasks with the same priority, and both of them want to access the same resource (say a shared peripheral). I think Without some kind of control, both tasks might try to use it at the same time and cause conflicts. I’ve heard that semaphores help in this situation, but I don’t fully get it
