title: What are the differences among mutex, semaphore and read write locks
body: <p>Any real-time scenarios explaining on each would be appreciated.
  Is there any other way to handle synchronization apart from these in pthreads.
  How do mutex differ from recursive-mutexes(any real-time scenario)?</p>