Finished implementation. Clients write to shared memory and to file, correctly use semaphore to access the file.