Cigarette Smokers problem with Unix System V IPV semaphores and shared memory