Loading
-
271.
-
272.
-
273.
Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:
/* P1 */
while (true) {
wants1 = true;
while (wants2==true);
/* Critical
Section */
wants1=false;
}
/* Remainder section *//* P2 */
while (true) {
wants2 = true;
while (wants1==true);
/* Critical
Section */
Wants2=false;
}
/* Remainder section */
Which one of the following statements is TRUE about the above construct?
[2 marks]
(A) It does not ensure mutual exclusion.
(B) It does not ensure bounded waiting.
(C) It requires that processes enter the critical section in strict alternation.
(D) It does not prevent deadlocks, but ensures mutual exclusion.
asked in Computer Science And Engineering, 2007
View Comments [0 Reply]
-
274.
-
275.
-
276.
An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes:
Process Execution time Arrival time P1 20 0 P2 25 15 P3 10 30 P4 15 45
(A) 5
(B) 15
(C) 40
(D) 55
asked in Computer Science And Engineering, 2007
View Comments [0 Reply]