copied semaphores into monitors
Monitor sync implemented