for Process Pi = request vector for process Pi. If  Request_i[j] = k, then process Pi wants k instances of Request_i resource type Rj. STEP 1: If Request(i) Need(i), go to step 2. Otherwise, raise  condition, since process has exceeded its maximum claim. STEP 2: If Request(i) Available, go to step 3. Otherwise, Pi  must wait since resources are not available. STEP 3: Pretend to allocate requested resources to Pi by  modifying the as follows: Available := Available - Request (i); (i) (i) (i); Allocation := Allocation + Request If safe resources are allocated to Pi. If unsafe Pi must wait and the old resource-allocation state  is restored.  Need (i) := Need 31 - Request (i);
for Process Pi  Request_i = request vector for process Pi. If Request_i[j] = k, then process Pi wants k instances of resource type Rj.   STEP 1: If Request(i) Need(i), go to step 2. Otherwise, raise condition, since process has exceeded its maximum claim. STEP 2: If Request(i) Available, go to step 3. Otherwise, Pi must wait since resources are not available.  STEP 3: Pretend to allocate requested resources to Pi by modifying the as follows: Available := Available - Request (i); Allocation (i) := Allocation (i) + Request (i);   Need (i) := Need - Request (i); If safe resources are allocated to Pi. If unsafe Pi must wait and the old resource-allocation state is restored. 31
dead%20lock.docx