Question 31
MediumWhat is true of an unsafe state?
- A.
It means no process is running
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
What is true of an unsafe state?
It means no process is running
It is always a deadlock
It can never lead to deadlock
It may lead to deadlock, but is not necessarily a deadlock
Sign up free to see the answer and a step-by-step explanation.
For single-instance resources, which graph is checked for cycles to detect deadlock?
The process tree
The page table
The wait-for graph
The call graph
Sign up free to see the answer and a step-by-step explanation.
Requiring a process to request all its resources before it starts prevents which condition?
No preemption
Mutual exclusion
Circular wait
Hold and wait
Sign up free to see the answer and a step-by-step explanation.
Which of these is a way to recover from a deadlock that has already happened?
Use the Banker's algorithm
Abort one or more of the deadlocked processes
Add more CPU cores
Increase the time quantum
Sign up free to see the answer and a step-by-step explanation.
How does a livelock differ from a deadlock?
The processes keep changing state but still make no progress
The processes are all blocked and asleep
Only one process is involved
It happens only with semaphores
Sign up free to see the answer and a step-by-step explanation.
Five processes share resources A, B and C. Allocation: P0 (0,1,0), P1 (2,0,0), P2 (3,0,2), P3 (2,1,1), P4 (0,0,2). Maximum need: P0 (5,3,3), P1 (3,2,2), P2 (4,0,2), P3 (2,2,2), P4 (3,3,3). Available: (2,3,2). What is P0's remaining need?
(5, 3, 3)
(5, 2, 3)
(0, 1, 0)
(5, 4, 3)
Sign up free to see the answer and a step-by-step explanation.
Five processes share resources A, B and C. Allocation: P0 (0,1,0), P1 (2,0,0), P2 (3,0,2), P3 (2,1,1), P4 (0,0,2). Maximum need: P0 (5,3,3), P1 (3,2,2), P2 (4,0,2), P3 (2,2,2), P4 (3,3,3). Available: (2,3,2). Which of these is a safe sequence?
P1, P3, P2, P4, P0
P4, P3, P2, P1, P0
P0, P2, P1, P3, P4
P0, P1, P2, P3, P4
Sign up free to see the answer and a step-by-step explanation.
Five processes share resources A, B and C. Allocation: P0 (0,1,0), P1 (2,0,0), P2 (3,0,2), P3 (2,1,1), P4 (0,0,2). Maximum need: P0 (5,3,3), P1 (3,2,2), P2 (4,0,2), P3 (2,2,2), P4 (3,3,3). Available: (2,3,2). Which process can NOT be allowed to run first, because its need exceeds what is available?
P0
P2
P3
P1
Sign up free to see the answer and a step-by-step explanation.
Requesting resources only in increasing order of their assigned numbers prevents which deadlock condition?
Mutual exclusion
Hold and wait
Circular wait
No preemption
Sign up free to see the answer and a step-by-step explanation.
A deadlock-detection algorithm runs very rarely. What is the drawback?
Deadlocked processes may stay stuck for a long time before being found
It prevents all deadlocks
It uses too much CPU
It makes the system unsafe
Sign up free to see the answer and a step-by-step explanation.