This program is essential implementing the reader/writer problem with semaphores.