set up the framework for semaphore use