Reader/Writer problem
Data is shared among a number of processes.
Any number of reader processes could be accessing the shared data concurrently.
But when a writer process wants to access, only that process must be accessing the shared data. No reader should be present.
Solution 1 : Readers have priority; If a reader is in CS any number of readers could enter irrespective of any writer waiting to enter CS.
Solution 2: If a writer wants CS as soon as the CS is available writer enters it.