JSP
November 30, 2023UGC NET CS 2018-DEC Paper-2
November 30, 2023Question 4848 – UGC NET CS 2018-DEC Paper-2
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:
Correct Answer: A
Question 3 Explanation:
In Readers-Writers problem, more than one Reader is allowed to read simultaneously but if a Writer is writing then no other writer or any reader can have simultaneous access to that shared object. So Writers are given exclusive access to shared objects.
1 only
Both 2 and 3
2 only
3 only