1,550 views
1 votes
1 votes
A binary semaphore ensures mutual exclusion. Does a counting semaphore ensure mutual exclusion too?

Please justify your answers.

2 Answers

Best answer
3 votes
3 votes
Yup improper use of semaphore not ensure the mutual exclusion . only proper use of semaphore ensure mutual exclusion. ex: monitor.
selected by
1 votes
1 votes
Counting semaphore can be used to implement mutual exclusion by setting variable

'value' = 1    // value indicate number of processes allowed to enter CS

Related questions

3 votes
3 votes
3 answers
2
GateAspirant999 asked Feb 14, 2017
2,526 views
Below are four concurrent processes and three counting semaphores.What must be the initial values of the three semaphores, so that output “TGE” is obtained?
1 votes
1 votes
1 answer
3
Rahul_Rathod_ asked Dec 12, 2018
1,569 views
a) s1-wait(p) , s2-wait(q) , s3-wait(q) , s4-wait(p)b) s1-wait(p) , s2-wait(q) , s3-wait(p) , s4-wait(q)c) s1-wait(q) , s2-wait(p) , s3-wait(p) , s4-wait(q)d) none of...
0 votes
0 votes
0 answers
4