Thanks,
Regarding mutex vs binary smaphore.
A mutex is like a binary semaphore with the following differences:
1. A mutex has an owner
4. A mutex is used in mutual exclusion while a binary semaphore can be used for signaling events as well
is semaphore do not have owner. but suppose if we have declared muxtex for variable access in two tasks(i.e task1 and task2). now task1 gain access to muxtes variable. no other task can released the mutex variable till control does not get out of common variable. but this can be performed by binary semaphore.
then how can say that mutex has owner while binary semaphore can not.
second thing, binary semaphore is too used for mutual exclusion and what abt signaling events.
2. A mutex solves priority inversion using priority inheritance or priority cieling protocol
3. A mutex can be locked recursively
how can mutex be locked recursively? while at a time mutex only holed single value like 0 or 1(like binary semaphore).
Signal vs Event.
Signals can be seen as a mean of software interrupts. Whenever a signal occurs, a handler runs. It is a mean of IPC.
Events are similar to the signals but with exception that u have to wait for the event urself. The simplest way is to implement it using a binary semaphore.
is it means that event can be just like polling mechanism.
Thanks, kindly help me abt these doubts.