QUESTION

Text
Image


3. Deadlock Avoidance. (a) Show that the request $R e q_{0}$ on the left side can be granted with respect to the resource allocation state with deadlock avoidance. Give a possible safe sequence after the pretended allocation and indicate the number of possible safe sequences. (b) After the request by $P_{0}$ is satisfied, another process $P_{\boldsymbol{x}}$ apologizes that it makes a mistake in underreporting its maximum need in one of the resource types by one. Due to noise in the network communication, only the last two bits of the identity of $x$ is correctly received by the operating system, and the type of the resource under-reported is corrupted. However, the operating system can still mange to conclude that the corrected resource allocation state upon adjusting for this under-reporting remains safe. Determine the possible identities of $x$. Explain how you arrive at your answer. (c) After a while, $P_{\boldsymbol{x}}$ comes back and reports to the operating system that its original report on maximum need was correct and that the mistake of under-reporting is a false alarm. Back comes another distinct process $P_{y}(y \neq x)$ apologizing that it under-reports its maximum need in one of the resource types $Y$ by one. Knowing $Y$, the operating system is happy to conclude that the corrected resource allocation state upon adjusting for this under-reporting remains safe. Determine the possible identities of Y. Explain how you arrive at your answer. \begin{tabular}{|c|c|c|c|c|c|c|c|c|} \cline { 2 - 9 } & \multicolumn{4}{|c|}{ Allocation } & \multicolumn{4}{c|}{ Request } \\ \cline { 2 - 10 } & $A$ & $B$ & $C$ & $D$ & $A$ & $B$ & $C$ & $D$ \\ \cline { 2 - 9 }$P_{0}$ & 2 & 0 & 1 & 1 & 1 & 0 & 1 & 1 \\ \cline { 2 - 9 }$P_{1}$ & 1 & 2 & 1 & 0 & 1 & 0 & 0 & 1 \\ $P_{2}$ & 1 & 0 & 0 & 2 & 0 & 1 & 2 & 3 \\ $P_{3}$ & 0 & 1 & 0 & 0 & 2 & 3 & 2 & 2 \\ $P_{4}$ & 1 & 0 & 1 & 1 & 1 & 2 & 3 & 4 \\ $P_{5}$ & 2 & 0 & 1 & 1 & 2 & 4 & 3 & 2 \\ Avail & 1 & 1 & 0 & 1 & & & \\ \cline { 2 - 8 } & & & & & & & \end{tabular}

Public Answer

XCIXZD The First Answerer