Question: What is true about the functions wait ( ) and post ( ) for condition semaphores? By calling wait ( ) we decrease the semaphore

What is true about the functions wait() and post() for condition semaphores?
By calling wait () we decrease the semaphore by one, and post() increases the semaphore by 1
The thread calling wait() goes to the ready state, while the thread calling signal() sends a signal to weak up anyone sleeping in the queue of the condition variable
The thread calling wait() needs to held the lock, while the thread calling signal automatically acquires the lock
When a thread wake up (from a wait(]) and start running automatically retake the lock, and a thread before calling signal () needs to already have the lock
What is true about the functions wait ( ) and

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!