Test: Deadlock- 1 - Computer Science Engineering (CSE) MCQ


Test Description

14 Questions MCQ Test GATE Computer Science Engineering(CSE) 2025 Mock Test Series - Test: Deadlock- 1

Test: Deadlock- 1 for Computer Science Engineering (CSE) 2024 is part of GATE Computer Science Engineering(CSE) 2025 Mock Test Series preparation. The Test: Deadlock- 1 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Deadlock- 1 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Deadlock- 1 below.
Solutions of Test: Deadlock- 1 questions in English are available as part of our GATE Computer Science Engineering(CSE) 2025 Mock Test Series for Computer Science Engineering (CSE) & Test: Deadlock- 1 solutions in Hindi for GATE Computer Science Engineering(CSE) 2025 Mock Test Series course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Deadlock- 1 | 14 questions in 45 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study GATE Computer Science Engineering(CSE) 2025 Mock Test Series for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Deadlock- 1 - Question 1

An operating system contains 3 user processes each requiring 2 units of resource R. The minimum number of units of R such that no deadlock will ever occur is

Detailed Solution for Test: Deadlock- 1 - Question 1

Dead lock occurs when each of the 3 user processes hold one resource and make simultaneous demand for another. If there are 4 resources one of the 3 user processes will get the fourth instance of the resource and release one or both of the resource it is currently holding after using.

Test: Deadlock- 1 - Question 2

With a single resource, deadlock occurs

Detailed Solution for Test: Deadlock- 1 - Question 2

Deadlock will never occur for a single resource.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Deadlock- 1 - Question 3

A computer system has 6 tape drives, with 'n' processes competing for them. Each process may need 3 tape drives. The maximum value of ‘n’ for which the system is guaranteed to be deadlock free is

Detailed Solution for Test: Deadlock- 1 - Question 3

2 process can never lead to deadlock as the peak time demand of 6 (3 + 3) tape drives can be satisfied. But 3 processes can lead to a deadlock if each hold 2 drives and then demand one more.

Test: Deadlock- 1 - Question 4

Consider a system having 'm' resources of the same type. These resources are shared by 3 processes A, B, C, which have peak time demands of 3, 4, 6 respectively. The minimum value of ‘m’ that ensures that deadlock will never occur is

Detailed Solution for Test: Deadlock- 1 - Question 4

Data:

Maximum resource requirement of Process A = 3

Maximum resource requirement of Process B = 4

Maximum resource requirement of Process C = 6

Concepts:

Deadlock can occur If any process gets available resource < demanded resource

Max resource for process A to be in deadlock = needed - 1 = 3 - 1 = 2

Max resource for process B to be in deadlock = needed - 1 = 4 - 1 = 3

Max resource for process C to be in deadlock = needed - 1 = 6 - 1 = 5

If one resource is added, any of the n processes can take it a finish its execution leaving behind the allocated resource and hence the system will be deadlock free.

Calculation:

The minimum value of m that ensures that deadlock will never occur = (2 + 3 + 5) + 1 = 11

∴ m = 11

Test: Deadlock- 1 - Question 5

A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock

Detailed Solution for Test: Deadlock- 1 - Question 5

At least one process will be holding 2 resources in case of a simultaneous demand from, all the processes. That process will release the 2 resources, thereby avoiding any possible deadlock.

Test: Deadlock- 1 - Question 6

'm' processes share 'n' resources of the same type. The maximum need of each process does not exceed 'n' and the sum all their maximum needs is always less than m + n. In this set up deadlock

Detailed Solution for Test: Deadlock- 1 - Question 6

Assume m = 5 and n = 10
That means, 5 processes are sharing 10 resources and worst case will be if everyone is demanding equal number of cases.
So, for deadlock to be there every process must be holding 2 resources and seeking 1 more resource. This will make total demand to 15, which is nothing but 10 + 5 (m + n).
However, as given maximum demand is always less than (m + n), so we can say there will never be a deadlock.

Test: Deadlock- 1 - Question 7

Consider the resource allocation graph in figure

​This system is in a deadlock state. This remark is

Detailed Solution for Test: Deadlock- 1 - Question 7

The system is not in deadlock state, if the following sequence of fulfillment of request of the processes is made.
P2→ Po→ P1→ P3

Test: Deadlock- 1 - Question 8

Consider:
P = { P1, P2,P3}
R = {R1, R2, R3, R4}
One instance of resource type R1 two instances of resource type R2, one instances of resource type R3 and three instances of resource type R4. The situation is P1 is holding one instance of R2 and waiting for an instance R1, P2 is holding an instance of R1 one instance of R2 and waiting for an instance of R3 and P3 is holding an instance of R3.

Detailed Solution for Test: Deadlock- 1 - Question 8


Dead lock can not occure since first P3 will complete then P2 then P1 will complete.

Test: Deadlock- 1 - Question 9

Match List-I with List-II select the correct answer using the codes given below the lists:
List-I
A. Inconsistency
B. Deadlock resolution
C. Deadlock avoidance
D. Transit
List-II
1. Requires the recognition of unsafe states.
2. A message received by Pj from Pi that is not shown as sent by Pi 
3. A message sent by Pi to Pj (mij) that does not belong to the set of messages received by Pj
4. Always requires the abortion of one of more executing processes.

Detailed Solution for Test: Deadlock- 1 - Question 9

Inconsistency: message received by Pj from Pi that is not shown as sent by Pi. Deadlock resolution: always require the abortion of one or more processes. Deadlock avoidance: requires the recognition of unsafe state.
Transit: message sent by Pi to Pj that does not belong to the set of messages received by Pj.

Test: Deadlock- 1 - Question 10

Consider the following system state:

Total resources are 11. The system will be in a safe state if

Detailed Solution for Test: Deadlock- 1 - Question 10


If three additional resources are allocated P3 then its need becomes zero. And the system will get seven resources back from P3. These resources can be allocated to either P1 or P2 to become the system in safe state.

Test: Deadlock- 1 - Question 11

The time complexity of Banker’s algorithm to avoid deadlock having n processes and m resources is

Detailed Solution for Test: Deadlock- 1 - Question 11

The time complexity of the banker’s algorithm as a function of number n of processes and m of resources is O(n2xm).

Test: Deadlock- 1 - Question 12

Consider a sytem with five processes P0 through P4 and three resource types A, B, C. Resource type A has 10 instances, resource type B has 5 instances, and resource type C has 7 instances. Suppose that, at time to, the following snapshot of the system has been taken:

Which of the following is the safe sequence for the above system?

Detailed Solution for Test: Deadlock- 1 - Question 12


<P1, P3, P4, P2, P0> is the safe sequence.

Test: Deadlock- 1 - Question 13

Consider a system with three resources, tape drive, printer and disk drive. Each one of them are assigned a unique number:
R1 = F(Printer) = 12
R2 = F (Tape Drive) = 1
R3 = F(Disk Drive) = 4
Which of the following access patterns necessarily avoids deadlock?

Detailed Solution for Test: Deadlock- 1 - Question 13

To avoid deadlock, we must request the devices in ascending order of enumeration. This ensures that circular wait does not hold. The correct sequence is 1, 4, 12, i.e. R2, R3, R1.

Test: Deadlock- 1 - Question 14

​Which of the following is true?

Detailed Solution for Test: Deadlock- 1 - Question 14

In (a) the processes P1, P2 and P3 are in deadlock state. P2 waiting on P3. Which is held by P3. P1 is waiting on ft, which is held by P2. While P3 in waiting on R2 which is held by P1 and P2
In (b) we can observe that P4 can release instance o f R2, which can be allocated to either P1 or P3, breaking the cycle. Deadlock does not occur in (b).

55 docs|215 tests
Information about Test: Deadlock- 1 Page
In this test you can find the Exam questions for Test: Deadlock- 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Deadlock- 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)