• retagged by
935 views
1 1 vote
Let S be the binary semaphore variable initialized to zero. If no blocked processes exist in the system then consider the execution of the following signal (V), wait (P) operation. The number of blocked processes at the end are _________.

                                         4 P, 6 V, 9 P, 13 V, 14 P

2 Answers

1 1 vote
is 13 the answer?

4P means 1 process in cs and 3 blocked

6V unblocks all the blocked process

9P = 8 blocked, 1 in cs

13 V similarly unblocks,

finally 14P means 1 block in cs and rest 13 blocked??
• edited by
Position:
Show:

Related questions

3 3 votes
1 answers 1 answer
1.0k
1.0k views
LRU asked Oct 17, 2021
1,023 views
Let S be a binary semaphore variable. Let S = 0 initially. Assume that no blocked processes exist in the system. The following signal (V), wait (P) operations are perform...
2 2 votes
2 2 answers
147
147 views
GO Classes asked Jul 29
147 views
Two semaphores are initialized as:$S = 1$$T = 0$Two processes execute repeatedly:Process P$\texttt{wait(S);}$$\texttt{print("A");}$$\texttt{signal(T);}$Process Q$\texttt{...
2 2 votes
0 0 answers
572
572 views
RUPALI_SHAHAPURE asked Nov 15, 2024
572 views
Consider a counting semaphore s1 initialized to two. The binary semaphore s2 is initialized to one. There are three processes executing the following code segment concurr...