To overcome difficulties in Readers-Writers problem, which of the following statement/s is/are true? 1) Writers are given exclusive access to shared objects 2) Readers are given exclusive access to shared objects 3) Both readers and writers are given exclusive access to shared objects.
1 only
Only statement 1 is true. A writer needs exclusive access: no other writer or reader may access the shared object while it writes. Multiple readers may read concurrently when no writer is active.
Suppose P, Q and R are co-operating processes satisfying Mutual Exclusion condition. Then if the process Q is executing in its critical section then