a. (True/False) The signal() call of pthread condition variables require two par
ID: 3707796 • Letter: A
Question
a. (True/False) The signal() call of pthread condition variables require two parameters: one for the condition variable object and one for a mutex object. What is the b. Part of what happens when a thread calls wait() is that the thread is put on a waiting list and the mutex object provided in the call is released. state of the mutex object when wait() returns? a) it is in the locked state, or b) it is in the unlocked state c. 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. d. 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, or c) the situation in which multiple wait() calls return because of a single signal() cal.Explanation / Answer
Answer a) False
The signal() call of pthread condition variables requires only one parameter that is condition variable object.
Answer b) a) it is in the locked state.
Answer c) a) signal() has no effect
The signal() function has no effect if condition varuable has no thread in its waiting list.
Answer d) c) the situation in which multiple wait() calls return because of a single signal() call.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.