Question 31
P1() { C = B – 1; B = 2*C; } P2() { D = 2 * B; B = D - 1; }The number of distinct values that B can possibly take after the execution is
Question 32
Question 33
if T(Pr) < T(Ph) then kill Pr else waitWhich one of the following is TRUE?
Question 34
for(i = 1; i < = n; i++) fork ();The number of new processes created is
Question 35
Question 36
Process 0 Process 1 Entry: loop while (turn == 1); Entry: loop while (turn == 0); (critical section) (critical section) Exit: turn = 1; Exit turn = 0;The shared variable turn is initialized to zero. Which one of the following is TRUE?
Question 37
Question 38
Question 39
semaphore S = 1, Q = 0;
integer x;
producer: consumer:
while (true) do while (true) do
P(S); P(Q);
x = produce (); consume (x);
V(Q); V(S);
done done
Which of the following is TRUE about the program above?Question 40
An operating system implements a policy that requires a process to release all resources before making a request for another resource. Select the TRUE statement from the following:
There are 115 questions to complete.