All Exams Test series for 1 year @ ₹349 only
Question

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.

Choose the correct answer from the code given below:

The correct answer is

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.

Was this answer helpful?

Important Questions from Critical Section - Teaching

  1. 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

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App