Accenture technical round question.
Question: What is difference between binary semaphore and mutex?
- 2661 Views
- 1 Answers
Your Answer
Hi vishal
The differences between binary semaphore and mutex are very simple:
- Mutex is used exclusively for mutual exclusion. Both mutual exclusion and synchronization can be used by binary.
- A task that took mutex can only give mutex.
- From an ISR a mutex cannot be given.
- Recursive taking of mutual exclusion semaphores is possible. This means that a task that holds before finally releasing a semaphore, can take the semaphore more than once.
- Options for making the task which takes as DELETE_SAFE are provided by Mutex, which means the task deletion is not possible when holding the mutex.
-
- 23 Jun
- 0 Comment
Comment
Practice Mock Test
accenture