Cisco interview question

3 ways to implement semaphore