Question

3.6. Assuming the same code as in question 3.5, describe, in detail, a solution that uses only semaphores. Would this solution work free of deadlocks and starvation? [4]

question 3.5 code below:

Algorithm 1: Execution function of a single philoso- pher Data: philosopherK; Result: ; // the philosopher ID // no return va

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

no this is not work free from dead lock and starvation.when philospher is thinking then he not able to eat.so until he release the right fork the other person cant pick his left fork.so by this reason the other person has to wait for long time.

for left the fork once philospher realease his right fork then that person can be able to pick the left fork in that concondition dead lock and starvation wont occur.

but here because of starvation the deadlock is occuring.

Add a comment
Know the answer?
Add Answer to:
3.6. Assuming the same code as in question 3.5, describe, in detail, a solution that uses...
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
  • Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around...

    Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...

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