Ref : https://stackoverflow.com/questions/15117155/show-how-counting-semaphores-can-be-implemented-using-only-binary-semaphores-and
64.3k questions
77.9k answers
244k comments
80.0k users