Question 41
MediumIn a resource-allocation graph where every resource has exactly one instance, what does a cycle mean?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
In a resource-allocation graph where every resource has exactly one instance, what does a cycle mean?
No deadlock exists
A deadlock might exist
The graph is invalid
A deadlock exists
Sign up free to see the answer and a step-by-step explanation.
Which strategy breaks the 'hold and wait' condition?
Resources are numbered
A process must request all its resources at once before it starts
Resources can be pre-empted
Printers are spooled
Sign up free to see the answer and a step-by-step explanation.
What is the main drawback of requiring processes to request all their resources at the start?
Resources are held long before they are used, lowering utilisation, and starvation is possible
It causes more deadlocks
It makes programs shorter
It needs a special disk
Sign up free to see the answer and a step-by-step explanation.
Which recovery method chooses a process, rolls it back to a checkpoint and gives its resources to others?
Ignoring the deadlock
Resource pre-emption with rollback
Killing all processes
Increasing RAM
Sign up free to see the answer and a step-by-step explanation.
Why is choosing the same victim repeatedly a problem in deadlock recovery?
It speeds up the system too much
It makes deadlock impossible
That process may starve
It causes a power failure
Sign up free to see the answer and a step-by-step explanation.
Three processes each hold one resource and wait for the next process's resource in a cycle. How many processes must be terminated, at minimum, to break the deadlock?
0
1
3
2
Sign up free to see the answer and a step-by-step explanation.
When is a system said to be in an unsafe state?
When all processes are waiting for I/O
When no sequence exists in which every process can obtain its maximum need and finish
When no resources are in use
When a deadlock has definitely occurred
Sign up free to see the answer and a step-by-step explanation.
A system has 3 identical printers. Two processes each hold 1 printer and each needs 2 printers in total. Is the system deadlocked?
Yes
Only if a third process arrives
It cannot be decided
No: the free printer lets one process finish and release both of its printers
Sign up free to see the answer and a step-by-step explanation.
Which of these is a deadlock-avoidance (not prevention) technique?
Ordering resources numerically
Requesting all resources at once
The Banker's algorithm
Spooling the printer
Sign up free to see the answer and a step-by-step explanation.
What does a wait-for graph contain?
Only processes, with an edge Pi → Pj when Pi waits for a resource held by Pj
Both processes and resources
CPU time slices
Only resources
Sign up free to see the answer and a step-by-step explanation.