Recent questions tagged semaphore

1 votes
2 answers
124
A counting semaphore S is created with initial value as 3.Suppose 5 processes are calling P, what will be the final value of S?A. 8B. 0C. -2D. -1
2 votes
1 answer
126
Assume that you have a semaphore associated with each item on a doubly linked list. Using No other synchronization primitive, What is the fewest number of semaphore that ...
6 votes
4 answers
127
1 votes
1 answer
128
3 votes
1 answer
129
4 votes
2 answers
131
8 votes
3 answers
132
At a particular time of computation the value of a counting semaphore is 7. Then 20 $P$ operations and $x$ $V$ operations were completed on this semaphore. If the new val...
12 votes
1 answer
133
0 votes
4 answers
136
Up(Semaphore S) { if (Suspended list() is empty) S.value=1; else { Select a process from the suspended list and WakeUp() } }
4 votes
4 answers
137
A Binary semaphore variable mutex is initialized to '1' and the various binary semaphore operations like 9P(), 14V(), 6P(), 8V(), 3P(), 2V() are performed, then what is t...
1 votes
2 answers
139
A binary semaphore ensures mutual exclusion. Does a counting semaphore ensure mutual exclusion too?Please justify your answers.
2 votes
1 answer
141
14 votes
11 answers
142
Semaphores are used to solve the problem ofRace ConditionProcess SynchronizationMutual ExclusionNone of the aboveI and IIII and IIIAll of the aboveNone of the above
2 votes
5 answers
145
what is true about binary semaphore?1)Binary semaphore has drawback called busy wait or spin lock.2)Binary semaphore is applicable only for two processes3)Binary semaphor...
1 votes
1 answer
148