Possible implementation of acquire() and release(). Taken from Bell, John T. "Process Synchronization." University of Illinois, Chicago.
Using the Mutex method. Taken from Bell, John T. "Process Synchronization." University of Illinois, Chicago.