Ace
Learns
Theme
light_mode
dark_mode
light_mode
Light
dark_mode
Dark
monitor
Auto
Open main menu
menu_open
×
Home
History
Geography
Astronomy
Physics
Chemistry
Biology
Agriculture
Sports
Computer Science
Articles
Contact Us
MCQ Categories
Articles
Home
Contact Us
Home
»
Computer Science
»
Operating System
»
Deadlock in Operating System
Operating System
unfold_more
double_arrow
Deadlock in Operating System
double_arrow
Inter-Process Communication
double_arrow
Process
double_arrow
Process Schedulers
double_arrow
Synchronization in Operating System
double_arrow
Threads in Operating System
quiz
Deadlock in Operating System
1.
How does a deadlock occur in an operating system?
A)
When a process is terminated abruptly.
B)
When a process enters a waiting state due to a resource held by another waiting process.
C)
When a process completes its execution successfully.
D)
When a process requests a resource that is currently available.
Answer
keyboard_arrow_down
keyboard_arrow_up
B) When a process enters a waiting state due to a resource held by another waiting process.
Explanation
2.
Which set of conditions, known as the Coffman conditions, are necessary for a deadlock to occur in a system?
A)
Mutual exclusion, hold and wait, no preemption, circular wait
B)
Preemptive scheduling, resource allocation, circular wait
C)
Resource sharing, multiple threads, mutual exclusion
D)
Shared memory, context switching, hold and wait
Answer
keyboard_arrow_down
keyboard_arrow_up
A) Mutual exclusion, hold and wait, no preemption, circular wait
Explanation
3.
Which aspect of deadlock management is directly addressed by the Banker’s Algorithm?
A)
Detection
B)
Avoidance
C)
Prevention
D)
Recovery
Answer
keyboard_arrow_down
keyboard_arrow_up
B) Avoidance
Explanation
4.
What does the mutual exclusion condition imply in the context of deadlock?
A)
Multiple threads can modify a shared resource at the same time
B)
Only one thread can access a critical section at a time
C)
Threads must wait in line based on priority before accessing any resource.
D)
Two threads can write to a shared resource simultaneously
Answer
keyboard_arrow_down
keyboard_arrow_up
B) Only one thread can access a critical section at a time
Explanation
5.
What data structures are used in the Banker’s Algorithm?
A)
Available, Maximum, Allocation, Need
B)
Wait-for Graph, Ready Queue, Priority Queue
C)
Page Table, Frame Table, Disk Queue
D)
Free List, Swap Space, Ready Queue
Answer
keyboard_arrow_down
keyboard_arrow_up
A) Available, Maximum, Allocation, Need
Explanation
6.
In a resource allocation graph, a deadlock exists if and only if:
A)
The graph has no cycles.
B)
The graph is a tree.
C)
The graph has at least one cycle.
D)
The graph is bipartite.
Answer
keyboard_arrow_down
keyboard_arrow_up
A) The graph has no cycles.
Explanation
7.
Which of the following is NOT a method for deadlock recovery?
A)
Resource preemption
B)
Process termination
C)
Process rollback
D)
Priority inversion
Answer
keyboard_arrow_down
keyboard_arrow_up
D) Priority inversion
Explanation
8.
What is the condition called when a system cannot allocate resources to processes in such a way that all processes can be completed without leading to a deadlock?
A)
Safe state
B)
Unsafe state
C)
Deadlock state
D)
Blocking state
Answer
keyboard_arrow_down
keyboard_arrow_up
B) Unsafe state
Explanation
9.
Which method uses a predefined sequence to acquire locks, preventing circular wait conditions?
A)
Wait-For-Graph algorithms
B)
Lock reference-counting
C)
Lock hierarchies
D)
Heuristic algorithms
Answer
keyboard_arrow_down
keyboard_arrow_up
C) Lock hierarchies
Explanation
10.
Why do phantom deadlocks occur in distributed systems?
A)
Due to inaccurate detection algorithms
B)
Due to delayed or outdated information in the system
C)
Because of network failures
D)
Due to software bugs
Answer
keyboard_arrow_down
keyboard_arrow_up
B) Due to delayed or outdated information in the system
Explanation
Quick Links
Computer Science
chevron_right
Computer Networks
chevron_right
Programming in C
chevron_right
Computer Organization
chevron_right
Cloud Computing
Astronomy
chevron_right
Galaxies
chevron_right
High-Energy Astrophysics
chevron_right
Space Exploration
chevron_right
The Universe
Sports
chevron_right
Football
chevron_right
Cricket
chevron_right
Asian Games
chevron_right
Olympics
Biology
chevron_right
Organs of the Human Body
chevron_right
The Human Body System
chevron_right
Cell Biology
chevron_right
Essential Nutrients