Question 21
EasyIf all processes behave as they declared, can a system that stays in a safe state deadlock?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
If all processes behave as they declared, can a system that stays in a safe state deadlock?
No
Only if there are more than two processes
Only on Mondays
Yes, always
Sign up free to see the answer and a step-by-step explanation.
What must each process tell the OS in advance for the Banker's algorithm to work?
The maximum number of each resource type it may need
Its exact running time
Its file names
Its user's password
Sign up free to see the answer and a step-by-step explanation.
Why is deadlock prevention often considered wasteful?
It deletes files
Its rules can leave resources idle and lower utilisation
It needs extra hardware
It makes deadlocks more frequent
Sign up free to see the answer and a step-by-step explanation.
Two processes each need 2 units of a resource to finish, and the system has 3 units. Can deadlock occur over this resource?
Yes, if both start together
No, at least one process can always get 2 units and finish
It cannot be decided
Yes, always
Sign up free to see the answer and a step-by-step explanation.
Which of these situations is NOT a deadlock?
A process waiting for the user to type on the keyboard
P1 waits for P2's lock while P2 waits for P1's lock
Three processes each waiting for a resource held by the next in a cycle
Two threads each holding one file and waiting for the other's file
Sign up free to see the answer and a step-by-step explanation.
How does starvation differ from deadlock?
Starvation happens only with memory
They are the same thing
In deadlock, processes wait for each other forever; in starvation, one process keeps being passed over while others progress
Deadlock affects only one process
Sign up free to see the answer and a step-by-step explanation.
Which of the following is NOT one of the four necessary Coffman conditions required for a deadlock to occur in an operating system?
Mutual Exclusion
Hold and Wait
Preemption Allowed
Circular Wait
Sign up free to see the answer and a step-by-step explanation.
Which of the following are necessary conditions for a deadlock? (Select all that apply.)
Mutual exclusion
Preemption
Hold and wait
Circular wait
Sign up free to see the answer and a step-by-step explanation.
Three processes each need at most 2 units of a resource. What is the minimum number of units that guarantees no deadlock?
Enter a number as the answer.
Sign up free to see the answer and a step-by-step explanation.
Five processes each need at most 3 units of the same resource. What is the minimum number of units that guarantees deadlock-free operation?
12
15
10
11
Sign up free to see the answer and a step-by-step explanation.