All Exams Test series for 1 year @ ₹349 only
Question

A system has four processes and five allocatable resources. The current allocation and maximum needs are as follows :

AllocatedMaximumAvailable
Process A1 0 2 1 11 1 2 1 30 0 \(x\) 1 1
Process B2 0 1 1 02 2 2 1 0
Process C1 1 0 1 02 1 3 1 0
Process D1 1 1 1 01 1 2 2 1

The smallest value of \(x\) for which the above system in safe state is __________.

This question was previously asked in
UGC NET 2015 Paper 1 Question Paper (27-Dec-2015)
The correct answer is

No value of \(x\) makes the system safe

Need = Maximum - Allocated: A = 0 1 0 0 2, B = 0 2 1 0 0, C = 1 0 3 0 0, D = 0 0 1 1 1.

Look at the fifth resource: total units \(= 1 + 0 + 0 + 0 + 1 = 2\) (allocated plus available), but process A declares a maximum of 3 units.

Even after B, C and D finish (possible when \(x \geq 2\), in the order D, C, B), the free fifth resource is only 1 while A still needs 2.

So A can never be guaranteed to finish, and no safe sequence exists for any value of \(x\).

Check: with \(x = 2\) the free vector after D, C, B is 4 2 4 4 1, which still cannot cover A's need of 0 1 0 0 2.

Hence, No value of \(x\) makes the system safe.

Was this answer helpful?

Similar Questions

  1. An operating system has 13 tape drives. There are three processes P1, P2 & P3. Maximum requirement of P1 is 11 tape drives, P2 is 5 tape drives and P3 is 8 tape drives. Currently, P1 is allocated 6 tape drives, P2 is allocated 3 tape drives and P3 is allocated 2 tape drives. Which of the following sequences represent a safe state ?

  2. Consider a system with twelve magnetic tape drives and three processes \(P_{1}\), \(P_{2}\) and \(P_{3}\). Process \(P_{1}\) requires maximum ten tape drives, process \(P_{2}\) may need as many as four tape drives and \(P_{3}\) may need upto nine tape drives. Suppose that at time \(t_{1}\), process \(P_{1}\) is holding five tape drives, process \(P_{2}\) is holding two tape drives and process \(P_{3}\) is holding three tape drives. At time \(t_{1}\), system is in :

  3. Consider a system with five processes \(P_{0}\) through \(P_{4}\) and three resource types \(R_{1}\), \(R_{2}\) and \(R_{3}\). Resource type \(R_{1}\) has 10 instances, \(R_{2}\) has 5 instances and \(R_{3}\) has 7 instances. Suppose that at time \(T_{0}\), the following snapshot of the system has been taken :

    Allocation

    \(R_{1}\)\(R_{2}\)\(R_{3}\)
    \(P_{0}\)010
    \(P_{1}\)200
    \(P_{2}\)302
    \(P_{3}\)211
    \(P_{4}\)022

    Max

    \(R_{1}\)\(R_{2}\)\(R_{3}\)
    753
    322
    902
    222
    433

    Available

    \(R_{1}\)\(R_{2}\)\(R_{3}\)
    332

    Assume that now the process \(P_{1}\) requests one additional instance of type \(R_{1}\) and two instances of resource type \(R_{3}\). The state resulting after this allocation will be

  4. Which data structure does the Banker’s Algorithm use to maintain the state of available, maximum and allocated resources ?

  5. What is the significance of the Banker’s algorithm in terms of resource management ?

  6. Which of the following is NOT a requirement for Banker’s algorithm to grant a resource request ?

  7. What is the primary goal of the Banker’s Algorithm ?

  8. What information is used to determine if a resource request can be granted ?


Important Questions from Deadlock Handling - Teaching

  1. Suppose a system has 12 magnetic tape drives and at time t 0, three processes are allotted tape drives out of their as given below:

    Maximum Needs

    Current Needs

    p 0

    10

    5

    p 1

    4

    2

    p 2

    9

    2

    At time t 0, the system is in safe state. Which of the following is safe sequence so that deadlock is avoided?

    NOTE:

    Current Need is currently allocated resource to a process

  2. An operating system has 13 tape drives. There are three processes P1, P2 & P3. Maximum requirement of P1 is 11 tape drives, P2 is 5 tape drives and P3 is 8 tape drives. Currently, P1 is allocated 6 tape drives, P2 is allocated 3 tape drives and P3 is allocated 2 tape drives. Which of the following sequences represent a safe state ?

  3. Consider a system with twelve magnetic tape drives and three processes \(P_{1}\), \(P_{2}\) and \(P_{3}\). Process \(P_{1}\) requires maximum ten tape drives, process \(P_{2}\) may need as many as four tape drives and \(P_{3}\) may need upto nine tape drives. Suppose that at time \(t_{1}\), process \(P_{1}\) is holding five tape drives, process \(P_{2}\) is holding two tape drives and process \(P_{3}\) is holding three tape drives. At time \(t_{1}\), system is in :

  4. Consider a system with five processes \(P_{0}\) through \(P_{4}\) and three resource types \(R_{1}\), \(R_{2}\) and \(R_{3}\). Resource type \(R_{1}\) has 10 instances, \(R_{2}\) has 5 instances and \(R_{3}\) has 7 instances. Suppose that at time \(T_{0}\), the following snapshot of the system has been taken :

    Allocation

    \(R_{1}\)\(R_{2}\)\(R_{3}\)
    \(P_{0}\)010
    \(P_{1}\)200
    \(P_{2}\)302
    \(P_{3}\)211
    \(P_{4}\)022

    Max

    \(R_{1}\)\(R_{2}\)\(R_{3}\)
    753
    322
    902
    222
    433

    Available

    \(R_{1}\)\(R_{2}\)\(R_{3}\)
    332

    Assume that now the process \(P_{1}\) requests one additional instance of type \(R_{1}\) and two instances of resource type \(R_{3}\). The state resulting after this allocation will be

  5. Which data structure does the Banker’s Algorithm use to maintain the state of available, maximum and allocated resources ?

Need Expert Advice?
Upcoming Exams
CTET
December 12, 2026
Test Series
UGC NET img
Teaching
UGC NET (Paper 2) 2026 Mock Test Series
796 Tests 2 Tests Free
4.4(39)
English
More Questions from UGC NET

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App