

MCQOPTIONS
Saved Bookmarks
1. |
The program follows to use a shared binary semaphore T :Process A int Y; A1: Y = X*2; A2: X = Y; signal(T); Process Bint Z;B1: wait(T);B2: Z = X+1;X = Z;T is set to 0 before either process begins execution and, as before, X is set to 5.Now, how many different values of X are possible after both processes finish executing ? |
A. | one |
B. | two |
C. | three |
D. | four |
Answer» B. two | |