Question: 1. What happens if signal() on a condition variable that has no threads in its waiting list? a) signal() has no effect b) signal() waits

1. What happens if signal() on a condition variable that has no threads in its waiting list?

a) signal() has no effect

b) signal() waits until a thread joins the waiting list

(c) signal() returns right away, but then the next thread that calls wait() does not have to wait.

2. What is a spurious wakeup? Is it

a) when a call to wait() returns even though no call to signal() has occurred

b) a wakeup that is spurred by a pthread_cond_broadcast() call

c) the situation in which multiple wait() calls return because of a single signal() call.

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 Databases Questions!