PRACTICE • LEARN • GROW
Module 5 Final Quiz: Deadlocks MCQs
Solve topic-wise placement questions and improve your skills.
Module 5 Final Quiz: Deadlocks Progress
0 of 10 completed
0%
Topic Track
You are viewing MCQs in preview mode. Log in to select options, submit answers, and track your progress.
Log In to Answer
1
Which of the following is NOT one of Coffman's four necessary conditions for deadlock?
A.
Mutual Exclusion
B.
Hold and Wait
C.
Preemptive Resource Allocation
D.
Circular Wait
Explanation & Key
Correct Answer:
2
In a Resource Allocation Graph (RAG), if each resource type has EXACTLY ONE instance, what does the presence of a cycle imply?
A.
A deadlock might occur in the future, but is not guaranteed
B.
A deadlock definitively exists (a cycle is both necessary and sufficient)
C.
The system is in a safe state
D.
Starvation will occur, but not deadlock
Explanation & Key
Correct Answer:
3
How does Havender's protocol prevent the Circular Wait condition in deadlock prevention?
A.
By allowing processes to hold only one resource at a time
B.
By imposing a strict linear ordering on all resource types and requiring processes to request resources in strictly increasing order of enumeration
C.
By preempting resources after 10 milliseconds
D.
By allocating resources only at process boot time
Explanation & Key
Correct Answer:
4
In Dijkstra's Banker's Algorithm, what defines a 'Safe State'?
A.
A state where all resources are currently free in the system
B.
A state for which there exists a safe sequence of processes such that each process can satisfy its maximum remaining needs with current available resources plus resources held by prior processes
C.
A state with no concurrent threads
D.
A state where the CPU utilization is below 50%
Explanation & Key
Correct Answer:
5
What is the relationship between an Unsafe State and a Deadlocked State?
A.
They are completely identical concepts
B.
All deadlocked states are unsafe, but not all unsafe states are deadlocked (an unsafe state merely carries the potential to enter deadlock)
C.
An unsafe state is safer than a safe state
D.
A safe state is a subset of a deadlocked state
Explanation & Key
Correct Answer:
6
In the Banker's Algorithm, what formula computes the Need matrix?
A.
Need = Allocation - Max
B.
Need = Max - Allocation
C.
Need = Available + Allocation
D.
Need = Max - Available
Explanation & Key
Correct Answer:
7
What algorithm is used to detect deadlocks in systems where resources have multiple instances?
A.
Dijkstra's shortest path algorithm
B.
A deadlock detection algorithm similar to Banker's safety check that tests if currently outstanding requests can be satisfied without needing maximum claim declarations
C.
Peterson's algorithm
D.
Kruskal's minimum spanning tree algorithm
Explanation & Key
Correct Answer:
8
What is the Ostrich Algorithm in operating systems?
A.
A complex graph algorithm that hunts cycles
B.
Ignoring the deadlock problem entirely on the assumption that deadlocks occur so rarely that the cost of prevention/avoidance outweighs the benefit (adopted by Windows and Linux)
C.
Burying process code in swap memory
D.
Terminating the newest process first
Explanation & Key
Correct Answer:
9
When breaking a deadlock via process termination, which victim selection strategy minimizes recovery cost?
A.
Terminating the process with the largest PID
B.
Evaluating factors such as process priority, CPU time consumed so far, resources held, and whether the process is interactive or batch
C.
Terminating all system processes simultaneously
D.
Terminating the kernel init process
Explanation & Key
Correct Answer:
10
What must be considered when implementing resource preemption to recover from a deadlock?
A.
Selecting a victim, rolling back the process state to a safe checkpoint, and preventing process starvation via an aging counter
B.
Overclocking the CPU
C.
Flushing the L1 cache
D.
Increasing the swap partition size
Explanation & Key
Correct Answer:
Question Palette
Answered
Current
Not Attempted
Wrong