Semaphore is a counter limiting the number of threads concurrently accessing a shared resource.This counter is always between 0 and the maximum value specified during the semaphore creation. When the counter is strictly greater than 0, a call to Wait returns immediately and decrements the counter...