Suppose a system in which there are two types of processes, type A and type B processes. All processes of type A execute the same code, and all processes of type B execute the same code. The code for each process type is shown below.
|A Processes||B Processes|
| P(X)|| P(Y)|
| V(Y)|| P(Y)|
| || V(X)|
| || V(Y)|
Here, X and Y are general semaphores. X is initialized to 2, and Y is initialized to 0. Suppose three processes of type A and two processes of type B are brought into execution simultaneously.
Consider the following statements
: It is possible for processes to finish in the order of AABAB.
: It is possible for processes to finish in the order AABBA.
Which of the above statement(s) is/are CORRECT ?
Both S1 and S2
Neither S1 or S2