Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Which of the following is NOT true of deadloc... Start Learning for Free
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
  • a)
    In deadlock prevention, the request for resources is always granted if the resulting state is safe
  • b)
    In deadlock avoidance, the request for resources is always granted if the result state is safe
  • c)
    Deadlock avoidance is less restrictive than deadlock prevention
  • d)
    Deadlock avoidance requires knowledge of resource requirements a priori
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
Which of the following is NOT true of deadlock prevention and deadlock...
Deadlock Prevention: Deadlocks can be prevented by preventing at least one of the four required conditions:
1. Mutual Exclusion – not required for sharable resources; must hold for non-sharable resources.
2. Hold and Wait – must guarantee that whenever a process requests a resource, it does not hold any other resources. Require process to request and be allocated all its sources before it begins execution, or allow process to request resources only when the process has none. Low resource utilization; starvation possible. Restrain the ways request can be made.
3. No Pre-emption – If a process that is holding some resources requests another resource that cannot be immediately allocated to it, and then all resources currently being held are released. Pre-empted resources are added to the list of resources for which the process is waiting. Process will be restarted only when it can regain its old resources, as well as the new ones that it is requesting.
4. Circular Wait – impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration. Deadlock Avoidance: When a scheduler sees that starting a process or granting resource requests may lead to future deadlocks, then that process is just not started or the request is not granted. The deadlock-avoidance algorithm dynamically examines the resource-allocation state to ensure that there can never be a circular-wait condition. Resource-allocation state is defined by the number of available and allocated resources, and the maximum demands of the processes.
Choice of the question:
(A) In deadlock prevention, the request for resources is always granted if the resulting state is safe. false, Deadlock prevention scheme handles deadlock by making sure that one of the four necessary conditions don't occur. In deadlock prevention, the request for a resource may not be granted even if the resulting state is safe.
(B) In deadlock avoidance, the request for resources is always granted if the result state is safe. true, As in Deadlock avoidance, if resultant state is safe than request for resource is granted as being in a safe state, it can hold other resources now.
(C) Deadlock avoidance is less restrictive than deadlock prevention. true, As in Deadlock prevention, request for a resource may not be granted even if the resulting state is safe. but in deadlock avoidance, request for a resource is granted if the resulting state is safe.
(D) Deadlock avoidance requires knowledge of resource requirements a priori true, deadlock avoidance checks any chance of deadlock means even if the system is in safe state, it checks that after allocating requested resource, the system is not in deadlocked state. So deadlock avoidance requires knowledge of resource requirements a priori.
View all questions of this test
Most Upvoted Answer
Which of the following is NOT true of deadlock prevention and deadlock...
Deadlock prevention and deadlock avoidance are two different approaches to handle the problem of deadlocks in a system. Deadlocks occur when two or more processes are blocked and waiting for each other to release resources that they need to proceed. Both prevention and avoidance schemes aim to prevent deadlocks from occurring, but they differ in their methods.

A) In deadlock prevention, the request for resources is always granted if the resulting state is safe.

This statement is not true. In deadlock prevention, the request for resources is granted only if it does not lead to an unsafe state. The system maintains a resource allocation graph and checks for the presence of cycles in it. If a cycle exists, it indicates that a deadlock may occur and the request for resources is denied. Deadlock prevention schemes work by ensuring that the system never enters into a state where deadlock is possible.

B) In deadlock avoidance, the request for resources is always granted if the result state is safe.

This statement is also not true. In deadlock avoidance, the request for resources is granted only if it does not lead to a future unsafe state. The system uses algorithms such as Banker's algorithm or the resource allocation graph to predict the effect of granting a request for resources. If the request leads to a safe state, it is granted, otherwise, the process is blocked. Deadlock avoidance schemes work by allowing the system to enter into a state where deadlock is possible but preventing it by making appropriate decisions.

C) Deadlock avoidance is less restrictive than deadlock prevention.

This statement is true. Deadlock avoidance is less restrictive than deadlock prevention because it allows the system to enter into a state where deadlock is possible, whereas prevention schemes do not. Avoidance schemes make decisions based on the current state of the system and the predicted effect of granting a request for resources. Prevention schemes, on the other hand, work by ensuring that the system never enters into a state where deadlock is possible.

D) Deadlock avoidance requires knowledge of resource requirements a priori.

This statement is true. Deadlock avoidance schemes require knowledge of resource requirements in advance. The system needs to know the maximum resource requirements of each process to predict the effect of granting a request. This information is used to check if granting a request will lead to a safe state or not. If the required information is not available, deadlock avoidance schemes cannot be used.

In conclusion, statement A is the incorrect statement as in deadlock prevention, the request for resources is granted only if it does not lead to an unsafe state.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer?
Question Description
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer?.
Solutions for Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?a)In deadlock prevention, the request for resources is always granted if the resulting state is safeb)In deadlock avoidance, the request for resources is always granted if the result state is safec)Deadlock avoidance is less restrictive than deadlock preventiond)Deadlock avoidance requires knowledge of resource requirements a prioriCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev