Question
suppose there are three types of users (A, B, and C) who perform the data sharing in the database. The synchronous mutual exclusion requirements for
suppose there are three types of users (A, B, and C) who perform the data sharing in the database. The synchronous mutual exclusion requirements for reading and writing are as follows:
When Class A users read data as readers, the other two types of users are not allowed to access the database, but multiple Class A users are allowed to access the database concurrently;
Similarly, when Class B users read data as readers, the other two types of users are not allowed to access the database, but multiple Class B users are allowed to access the database concurrently;
When one class C user modifies the database as a writer, the other two types of users are not allowed to access the database.
Use the semaphore mechanism to describe the behavior of A, B, and C. also write the algorithm for both readers and writers.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started