Answer and Explanation:
The values of the semaphore can always be 0 for a particular process A, because whenever process A checks the
value by using getValue(&sem), some process B can be using the semaphore, after process B releases and puts
the value to 1, some other process C can get that semaphore by seeing the value > 0 and decrements its value
to 0 again. Now If the process A comes again It will see the value to be 0 again and this can go on ....
process A will never get the semaphore.