Page 1 of 1

Consider the current value of the semaphore is -2 and one thread is waiting. If we increment the value, it will not unbl

Posted: Sat May 14, 2022 8:36 pm
by answerhappygod
Consider the current value of the semaphore is -2 and one thread
is waiting. If we increment the value, it will not unblock the
waiting thread.
When signal is called on a condition variable that has threads
in its waiting list, one of the threads in the waiting list is
removed and made "ready". Which thread?
Which of the following are true?
A) a semaphore can be implemented with a lock and
a condition variable
B) a condition variable can be implemented with a
semaphore
C) a lock can be implemented with a semaphore