project 2 for operating systems readers/writers problem