337 views
1 votes
1 votes

when we do double "signal(S)" operation on a  Binary semaphore'S' provided initial value of S=0, will the value of 'S' be 2 or it remains 1? 

2 Answers

Best answer
3 votes
3 votes
Take an example,

Suppose we do 8P and 20V operations on a binary semaphore S with initial value 1.

Then, 1P operation makes the value of S = 0

Remaining 7P are cancelled by 7V operations and now 13V operations remain.

Then, 1V makes S = 1 and other 12V have no effect. The value is still 1.
selected by

Related questions

0 votes
0 votes
1 answer
1
Deepanshu asked Dec 23, 2018
375 views
i have a line in my notes IN Order to switch from User mode to Kernel mode during execution . we just have to change one Bit at hardware level.. I am not remember...
0 votes
0 votes
0 answers
3
air1ankit asked Dec 4, 2017
256 views
what is the work of " logical address " (which is generated by cpu) what is the perfect meaning of the logical address .and same doubt in physical address ..??please expl...
3 votes
3 votes
2 answers
4
Rajesh Raj asked Oct 29, 2016
774 views
what is page fault service time ? what are its factor and how it is related/not related with the memory access time??plss help with suitable example