結果 : b construct the deadlock avoidance algorithm with an example