title: How to create semaphores in shared memory in C?
body: <p>My task is to create two different C files and then use the semaphores for process synchronization (I run both C files simultaneously).</p>
  
  <p>My main concern is: if I want to access the semaphores in both the processes (executables of the C files), I need to create the semaphores in shared memory.
  Also I need to create binary semaphores.</p>
  
  <p>As it is my first program, can someone suggest how to get started on this?</p>
  
  <p>I am able to create and use shared memory, used semaphores within the threads. I watched some lectures on <a href="https://www.youtube.com/watch?v=TYnNKdf7cZM&amp;list=PLypxmOPCOkHXbJhUgjRaV2pD9MJkIArhg&amp;index=45">YouTube</a> also but could not find a proper solution.</p>