Question

Problem Consider three processes A, B, and C which have statements S1, S2 and 53 respectively. These statements should execut

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

SEM X1 = 0

SEM X2 = 0

A B C

S1

SIGNAL(X1)

S2

SIGNAL(X2)

WAIT(X1)

WAIT(X2)

S3

Explanation:

When X1 and X2 are 0, S3 cannot be

executed. Initially, X1 and X2 are 0. Hence, it will never run until signal(X1) and signal(X2) are executed after S1 and S2.

So, first S1/S2 will execute, when they both call signal(X1) and signal(X2) then semaphores X1 and X2 will become 1, and then only C will be able to proceed.

Add a comment
Know the answer?
Add Answer to:
Problem Consider three processes A, B, and C which have statements S1, S2 and 53 respectively....
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
  • In Lab 5, you completed the MyRectangle class, which is a simple representation of a rectangle....

    In Lab 5, you completed the MyRectangle class, which is a simple representation of a rectangle. Review Lab 5 before completing this lab and retrieve the MyRectangle class that you completed for this lab, since you will need it again in this lab. Before starting this lab, edit your MyRectangle class in the following way: • change the declaration of your instance variables from private to protected This will enable access of these variables by your MySquare subclass. Here is...

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