Question: Suppose a semaphore is initialized to 0 , and a process calls sem _ wait on it . What will happen to the semaphore and

Suppose a semaphore is initialized to 0, and a process calls sem_wait on it. What will happen to the semaphore and the process?
the semaphore will have value -1, and the process will block
the semaphore will have value -1, and the process will not block
the semaphore will have value 0, and the process will block
the semaphore will have value 0, and the process will not block

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!