simple scheduler for OS homework