Answer:
Check the explantion
Step-by-step explanation:
a. There is a race condition on the variable number of processes.
b. A call to acquire() must be placed upon incoming each function and a call to release() instantly before exiting each function.
c. No, it wouldn’t help in anyway. The reason being that the race happens in the allocate process() function where the number of processes is first tested in the if statement, yet is updated afterwards, based upon the value of the test. it is possible that number of processes = 254 at the time of the test, yet as a result of the race condition, is set to 255 by another thread before it is incremented yet again.