Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET


Best NIMCET Coaching
Aspire Study
Online Classes, Classroom Classes
and More.

Previous Year Question (PYQs)


Video solution of this question given below

Banker's Algorithm Solution

Step 1: Need Matrix

The Need Matrix is calculated as:

Need = Max - Allocation

ProcessR1R2R3
P1452
P2101
P3600
P4010

Step 2: Initial Available Resources

The Available resources at the start are:

  • R1 = 4
  • R2 = 4
  • R3 = 5

Step 3: Evaluate Each Sequence

Sequence (A): P2 → P4 → P1 → P3

  • P2: Need = [1, 0, 1], Available = [4, 4, 5]. Allocate resources. New Available = [7, 5, 7].
  • P4: Need = [0, 1, 0], Available = [7, 5, 7]. Allocate resources. New Available = [10, 7, 9].
  • P1: Need = [4, 5, 2], Available = [10, 7, 9]. Allocate resources. New Available = [14, 8, 11].
  • P3: Need = [6, 0, 0], Available = [14, 8, 11]. Allocate resources. New Available = [17, 12, 14].

Result: Sequence (A) is valid.

Sequence (B): P2 → P1 → P3 → P4

  • P2: Need = [1, 0, 1], Available = [4, 4, 5]. Allocate resources. New Available = [7, 5, 7].
  • P1: Need = [4, 5, 2], Available = [7, 5, 7]. Allocate resources. New Available = [11, 6, 9].
  • P3: Need = [6, 0, 0], Available = [11, 6, 9]. Allocate resources. New Available = [14, 10, 12].
  • P4: Need = [0, 1, 0], Available = [14, 10, 12]. Allocate resources. New Available = [17, 12, 14].

Result: Sequence (B) is valid.

Sequence (C): P4 → P2 → P3 → P1

  • P4: Need = [0, 1, 0], Available = [4, 4, 5]. Allocate resources. New Available = [7, 6, 7].
  • P2: Need = [1, 0, 1], Available = [7, 6, 7]. Allocate resources. New Available = [10, 7, 9].
  • P3: Need = [6, 0, 0], Available = [10, 7, 9]. Allocate resources. New Available = [14, 8, 11].
  • P1: Need = [4, 5, 2], Available = [14, 8, 11]. Allocate resources. New Available = [17, 12, 14].

Result: Sequence (C) is valid.

Sequence (D): P1 → P4 → P2 → P3

  • P1: Need = [4, 5, 2], Available = [4, 4, 5]. Cannot proceed as Need > Available.

Result: Sequence (D) is invalid.

Final Answer:

Safe Sequences: (A), (B), (C)

Invalid Sequence: (D)


The current allocation and Maximum requirement of different types of resources for four processes are given below:

Consider the following four statements.
(A) P2 → P4 → P1 → P3 is a safe sequence
(B) P4 → P2 → P1 → P3 is a safe sequence
(C) P4 → P2 → P3 → P1 is a safe sequence
(D) P1 → P4 → P2 → P3 is a safe sequence

Identify correct statements from the given options.





Practice With Us

Practice Makes A Man Perfect. Comment your solution and approach for this question.


Aspire Study Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Aspire Study Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.