There are two ways to consider this : using monitors
or using semaphores
Shared access to a database (such as bank balances, airline
seats etc)
Two classes of users :
Readers : never modify database
Writers : read and modify database
Can permit multiple readers, BUT only one writer.