Computer Science, asked by sameerahmed2599, 11 months ago

e) Which are the two operations that can be applied on semaphores?

Answers

Answered by Anonymous
0
 <marquee>☺☺Hi there☺☺</marquee>


Wait() and Signal() are basic operations of semaphore

Here is the explanation of both -:

Wait() : a process performs a wait operation to tell the semaphore that it wants exclusive access to the shared resource. If the semaphore is empty, then the semaphore enters the full state and allows the process to continue its execution immediately.If the semaphore is full, then the semaphore suspends the process (and remembers that the process is suspended).

Signal() : a process performs a signal operation to inform the semaphore that it is finished using the shared resource. If there are processes suspended on the semaphore, the semaphore wakes one of the up.If there are no processes suspended on the semaphore,the semaphore goes into the empty state.

Similar questions