Operating System (3140702) MCQs

MCQs of Deadlock

Showing 1 to 10 out of 50 Questions
1.
An edge from process Pi to Pj in a wait for graph indicates that ____________
(a) Pi is waiting for Pj to release a resource that Pi needs
(b) Pj is waiting for Pi to release a resource that Pj needs
(c) Pi is waiting for Pj to leave the system
(d) Pj is waiting for Pi to leave the system
Answer:

Option (a)

2.
If the wait for graph contains a cycle ____________
(a) then a deadlock does not exist
(b) then a deadlock exists
(c) then the system is in a safe state
(d) either deadlock exists or system is in a safe state
Answer:

Option (b)

3.
If deadlocks occur frequently, the detection algorithm must be invoked ________
(a) rarely
(b) frequently
(c) rarely & frequently
(d) None of the mentioned
Answer:

Option (b)

4.
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?
(a) 2
(b) 3
(c) 4
(d) 1
Answer:

Option (a)

5.
A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock ____________
(a) can never occur
(b) may occur
(c) has to occur
(d) None of the mentioned
Answer:

Option (a)

6.
Which of the following condition is required for a deadlock to be possible?
(a) Hold and wait
(b) No resource can be forcibly removed from a process holding it
(c) Mutual exclusion
(d) All of the mentioned
Answer:

Option (d)

7.
A system is in the safe state if ____________
(a) the system can allocate resources to each process in some order and still avoid a deadlock
(b) the system can allocate resources to each process in the order of their request and still avoid a deadlock
(c) Both A and B
(d) None of the mentioned
Answer:

Option (a)

8.
The circular wait condition can be prevented by ____________
(a) using thread
(b) using pipes
(c) defining a linear ordering of resource types
(d) All of the mentioned
Answer:

Option (c)

9.
Which one of the following is the deadlock avoidance algorithm?
(a) Round-robin algorithm
(b) Ostrich algorithm
(c) Banker’s algorithm
(d) Elevator algorithm
Answer:

Option (c)

10.
What is the drawback of banker’s algorithm?
(a) In advance processes rarely know how much resource they will need
(b) The number of processes changes as time progresses
(c) Resource once available can disappear
(d) All of the mentioned
Answer:

Option (d)

Showing 1 to 10 out of 50 Questions