CS FundamentalsHardGATE CS (PYQ pattern)

Banker's algorithm, a single resource type, 6 processes P0..P5. Allocation: 1, 2, 2, 5, 3, 4. Maximum: 9, 3, 3, 7, 7, 9. Available = 1. How many different safe sequences does this state have?

  1. A. 92
  2. B. 84
  3. C. 75
  4. D. 168

Correct answer: B. 84

Need = [8, 1, 1, 2, 4, 5]. Depth-first enumeration of every order in which each process's Need fits the current Work gives 84 safe sequences.

More Operating Systems questions

Exams that ask this topic