Added code for week 16: shared mem, semaphore simplification