title: implement mutex ensure bounded waiting
body: <p>this is an interview question i met which i don't know how to answer it.</p>
  
  <p>first of all what is a bounded waiting mutex, can you give me some examples of a mutex that ensure bounded waiting and doesn't ensure bounded waiting?</p>
  
  <p>secondly, i don't know how to implement it because it seems mutex is a build-in feature of the operating system.</p>
  
  <p>how would you answer this interview question? what kind of atomic operation i can use to implement mutex and how?</p>