Question: Bankers Algorithm for prevention Deadlock When a new process enters a system, it must declare the maximum number of instances of each resource type it

Bankers Algorithm for prevention Deadlock

When a new process enters a system, it must declare the maximum number of instances of each resource type it needed. This number may exceed the total number of resources in the system. When the user request a set of resources, the system must determine whether the allocation of each resources will leave the system in safe state. If it will the resources are allocation; otherwise the process must wait until some other process release the resources. System Calls provide a return value that signifies success or error. The C library, when a system call returns an error, writes a special error code into the global errno variable. The perror() translates the error code into human-readable format.

Tasks:

1. Search online about Banks Algorithm and discuss with your classmates about your understanding.

2.Discuss with your classmates about how to use Banks Algorithm to solve Dining Philosophers problem.

3.Based on Banks Algorithm, what is the safe state if our philosopher has k hands instead of two hands?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!