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. |
Problem Consider three processes A, B, and C which have statements S1, S2 and 53 respectively....
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...