Dining philosophers problem algorithm using thread and mutex