If the resulting resource-allocation state is safe, the transaction is completed, and process Pi is allocated its resources.
However, if the new state is unsafe, then Pi must wait for Requesti, and the old resource-allocation state is restored.
allocated
resource-allocatio