instead of busy waiting on client when there is no space, we use semaphore