Semaphore variable is different from ordinary variable by _______

Showing Answers 1 - 1 of 1 Answers

sachin chakote

  • Jul 22nd, 2005
 

A semaphore is a special varible that takes only whole positive numbers and upon which only two operations are allowed: wait and signal. They are used to ensure that a single executing process has exclusive access to a resource.  
The operation are  
 
p(SV) for wait 
V(SV) for signal SV- Semaphore variable. 
 
The definition of these two operation are very easy 
p(SV) If SV is greater than zero then decreament SV if becomes zero suspend the execution of the process. 
V(SV) if some other process has been suspended waiting for SV then make if resume execution if no process is suspended waiting for sv then increment it. 
 
 
 
 
 
 
 

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions