A semaphore puts a thread to sleep:

A. if it increments the semaphore's value above 0.

B. until another thread issues a notify on the semaphore.

C. if it tries to decrement the semaphore's value below 0.

Respuesta :

Answer:

B. until another thread issues a notify on the semaphore.

Explanation:

A semaphore is a variable that is shared between threads and is not negative. It also acts as a calling mechanism that uses two atomic operations wait and signal for synchronization of processes.

A thread that is waiting for a process can be signaled by another thread.

A semaphore puts a thread to sleep until another thread issues a notify on the semaphore.

The wait operation will get a semaphore or otherwise wait if the busy S semaphore is available.

The signal operation will release a semaphore or wake a process if there is a thread waiting for S.

ACCESS MORE