A system has 5 processes [P0 – P4] and 3 resource types (A, B, C). The current…

2025

A system has 5 processes [P0 – P4] and 3 resource types (A, B, C). The current allocation and maximum need matrices are :

Allocation = [[0, 1, 0], [2, 0, 0], [3, 0, 2], [2, 1, 1], [0, 0, 2]]

Max = [[7, 5, 3], [3, 2, 2], [9, 0, 2], [2, 2, 2], [4, 3, 3]]

Available = [3, 3, 2]

Which of the following sequence is not a safe sequence according to the Banker’s algorithm ?

  1. A.

    P1 → P3 → P4 → P0 → P2

  2. B.

    P3 → P1 → P4 → P0 → P2

  3. C.

    P4 → P3 → P1 → P0 → P2

  4. D.

    P1 → P4 → P3 → P2 → P0

Attempted by 23 students.

Show answer & explanation

Correct answer: C

First, compute the Need matrix by subtracting Allocation from Max for each process.

P4 requires [4, 3, 1], but Available resources are only [3, 3, 2]. P4 needs more Resource A than available.

Since P4 cannot execute first, any sequence starting with it is unsafe. Option C matches this condition.

Explore the full course: Mppsc Assistant Professor