Question

Operating system Why we need mutual exclusion, and how it is implemented?

Operating system

Why we need mutual exclusion, and how it is implemented?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Mutual exclusion is a property of concurrency control that prevent simultaneous access to the shared resources.it is required to prevent the execution of one thread from entering its critical section while another concurrent thread of execution enter its own critical section. Mutual exclusion can be implemented by using peterson algorithm. Two ideas of algorithm are

  1. Willingness to acquire lock
  2. Turn to acquire lock

In this the first thread acquire a lock and set flag =1 by self then give other thread a chance to aquire lock. Uf the thread desire to aquire lock then it get lock and pass it to the chance to the next.

Add a comment
Know the answer?
Add Answer to:
Operating system Why we need mutual exclusion, and how it is implemented?
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