What are the benefits of mutex over semaphore in linux system programming
0
votes
2
answers
1910
views
if binary semaphore can protect a resource atomically, then what is the benefit of mutex.
For example,
sem_init(&sem, 0, 1);
sem_wait(&sem);
critical session;
sem_post(&sem);
Please clarify any benefits of mutex over semaphore.
Asked by Raja Sekhar
(25 rep)
Sep 18, 2017, 07:28 PM
Last activity: Sep 19, 2017, 06:33 AM
Last activity: Sep 19, 2017, 06:33 AM