title: How many semaphore set to create?
body: <p>I understand the semaphore are used to synchronize process for access to a shared memory.</p>
  
  <p>Basically I do not understand how many semaphore set to create?</p>
  
  <p>Suppose, I have only one segment of shared memory, and two process will access that. Then, only one semaphore is created.</p>
  
  <p>But what if I have three or more process that will access to same shared memory, then do it need more semaphore sets?</p>
  
  <p>What is the condition on which number of semaphore set creation depends on?</p>
  
  <p>Thanks in advance.</p>