in Unknown Category edited by
762 views
0 votes
0 votes

Two atomic operations permissible on Semaphores are _________ and ________.

  1. wait, stop
  2. wait, hold
  3. hold, signal
  4. wait, signal
in Unknown Category edited by
by
762 views

1 comment

Option D is correct.
0
0

2 Answers

1 vote
1 vote
wait and signal operations are the two atomic operations performed on a semaphore.
0 votes
0 votes

Wait and signal are the atomic operation possible on semaphore….

Semaphores are integer variables that are used to solve the critical section problem by using two atomic operations, wait and signal that are used for process synchronization…..

Wait:

The wait operation decrements the value of its argument S if it is positive....

If S is negative or zero, then no operation is performed….

wait(S)

{

while (S<=0)

S--;

}

Signal:

The signal operation increments the value of its argument S….

 

signal(S)

 

{

S++;

}

So, (D) wait, signal ….

reshown by
Answer:

Related questions