in Others
354 views
0 votes
0 votes
Find initial values of binary semaphores X and Y. P and V operation for counting semaphore b is defined as:

P(b): b--; wait if b<0;

V(b): b++; wakeup any waiting process in b if b<=0;

Pa (wait) and Va (signal) are implemented as:

P(b): Pa(Y); b--;

if(b<0)  { Va(Y); Pa(X); }

else Va(Y);

V(b): Pa(Y);

b++;

if(b<=0) { Va(Y); Va(X); }
in Others
by
354 views

Please log in or register to answer this question.

Related questions