Which of the following statements is incorrect?

2022

Which of the following statements is incorrect?

  1. A.

    Counting semaphore can be used to control access to a finite number of instances of a resource.

  2. B.

    Reader–writers problem typically arises when several concurrent processes share the database.

  3. C.

    Banker’s algorithm prevents deadlock.

  4. D.

    A computer system is in a safe state only if there exists a safe sequence.

Attempted by 257 students.

Show answer & explanation

Correct answer: C

Answer: The statement “Banker’s algorithm prevents deadlock” is incorrect.

Why:

Banker’s algorithm is a deadlock avoidance algorithm. It does not eliminate the possibility of deadlock by changing system rules; instead, it simulates granting resource requests and grants a request only if doing so keeps the system in a safe state.

A safe state means that a safe sequence exists—an ordering of processes such that each process can obtain the resources it needs, run to completion, and release resources for the subsequent processes.

Deadlock prevention and deadlock avoidance are different: prevention removes or limits necessary conditions for deadlock, while avoidance, such as Banker’s algorithm, dynamically decides whether to grant requests in order to keep the system safe.

Conclusion: The claim that Banker’s algorithm prevents deadlock is incorrect; it avoids deadlock by ensuring that the system remains in a safe state.

Explore the full course: Up Lt Grade Assistant Teacher 2025