Question: Suppose a processes is executing a monitor's procedure, using signals, and gets to the following code: cwait ( c ) / / Do Some Stuff

Suppose a processes is executing a monitor's procedure, using signals, and gets to the following code:
cwait(c)
// Do Some Stuff
csignal(c)
What can or will happen to the processes?
If this is not the first process to call cwait(c), then it will block until another process calls csignal(c). Then, after calling csignal(c) the process continues execution.
If this is not the first process to call cwait(c), then it will block until another process calls csignal(c). Then, after calling csignal(c), it might block again.
The process will block, and may continue after another processes calls csignal(c). Then, after calling csignal(c) the process continues execution.
The process will block, and may continue after another processes calls csignal(c). Then, after calling csignal(c), it might block again.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!