5 a Explain how to improve the solution to the Readerswriter
5. (a) Explain how to improve the solution to the Readers-writers problem. (b) Why is this not a deadlock problem?
Solution
Clearly the solution gives readers preference over writers; once one reader is accessing the DB , all readers are allowed to read the DB without performing the P or V operations on sWriters .
We cannot say that its not a deadlock problem andmight be we can get a deadlock and solution is Reader-writer deadlock using n+1 semaphore as given below :
//psuedo code
