Q.
Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes.
Process P1 :
while(true)
{
w1 = true;
while(w2 == true);
Critical section
w1 = false;
}
Remainder Section
Process P2 :
while(true)
{
w2 = true;
while(w1 == true);
Critical section
w2 = false;
}
Remainder SectionHere, w1 and w2 have shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct?
Similar Questions
1. When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called?
2. If a process is executing in its critical section, then no other processes can be executing in their critical section. This condition is called?
3. Which one of the following is a synchronization tool?
4.
A semaphore is a shared integer variable __________
5. Mutual exclusion can be provided by the __________
6. When high priority task is indirectly preempted by medium priority task effectively inverting the relative priority of the two tasks, the scenario is called __________
7. Process synchronization can be done on __________
8. A monitor is a module that encapsulates __________
9. To enable a process to wait within the monitor __________
10. Concurrent access to shared data may result in ____________
OPERATING SYSTEM TOPICS