Question

Answer the following questions about readers and writers Is it possible for multiple readers to access...

Answer the following questions about readers and writers

  1. Is it possible for multiple readers to access the same file simulataneously?
  2. Is it possible for multiple writers to access the same file simulataneously?
  3. Is it possible for multiple writers to access different files simulataneously?
  4. Why is it important to implement mutual exclusion in a reader/writer system?
  5. Is it possible for starvation to occur in a reader/writer system?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answers:

A. Yes, the multiple readers from different processes can access the same file at the same time

B. Yes, Multiple writer can access the same file at the same time, but they won't be able to write the data at the same time. To do this the writer will have to take exclusive writing lock on the file. The other writer needs to wait to write the data.

C. Yes, multiple writers can access different files at the same time. Because the files are independent so concurrency control won't be an issue in this case

D. While using reader writer concept, it is important to check for the concurrency otherwise the data may not be consistence. To do this mutual exclusion is used,so that the changes made by different process to a file is consistent and the integrity of data is maintained.

E. Yes, starvation can occur in a reader/writer problem. Suppose a reader is holding the lock for the file and writer is then schedule to execute. But if we service the read request before the write request and there is always a read request to be serviced, then the write request will never be executed and starvation will occur

Add a comment
Know the answer?
Add Answer to:
Answer the following questions about readers and writers Is it possible for multiple readers to access...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT