How does the conditional variable prevent the threads from continuously waiting for the thread?
This problem may have one or more correct answers
(a)The solution makes threads to check a condition and if that condition is true, then the threads go to sleep.
(b)When the threads go to sleep, they execute the wait() operation. wait() operation adds it to the wait queue until this thread is notified that the condition is false.
(c)When the thread using the lock releases it, then it notifies all the threads in the waiting queue.
(d)The next thread to acquire the lock should be the last one to enter the waiting queue.
Answers
Answered by
0
pls mark me as brainlist
(b)When the threads go to sleep, they execute the wait() operation. wait() operation adds it to the wait queue until this thread is notified that the condition is false.
Similar questions