answer_quiz6 - 408 Coding School

Quiz#6 (CS500 OSD, Spring, 2016)
Group number: ______________________
1. Student ID:__________ Name: __________ 2. Student ID:__________ Name: __________
3. Student ID:__________ Name: __________ 4. Student ID:__________ Name: __________
Q#1. Deadlock prevention and deadlock avoidance are essentially the same
approaches for handling deadlock.
A) True
B) False
Q#2. A cycle in a resource-allocation graph is a necessary and sufficient condition
for deadlock in the case that each resource has more than one instance
A) True
B) False
Q#3. Which of the following statements is true?
A) A safe state is a deadlocked state.
B) A safe state may lead to a deadlocked state.
C) An unsafe state is necessarily, and by definition, always a deadlocked state.
D) An unsafe state may lead to a deadlocked state.
Q#4. There are two methods for eliminating processes by aborting a process. The
first method is to abort all deadlocked processes. The second method is to abort one
process at a time until the deadlock cycle is eliminated.
The ________ method will need to run deadlock-detection algorithm.
The ________ method could terminate more processes than necessary to remove the
deadlock.
A) The first method, the second method.
B) The second method, the first method
Q#5 A safe state ensures that there is a sequence of processes to finish their
program execution. Deadlock is not possible while the system is in a safe state.
One technique for avoiding deadlock is to ensure that the system always stays in a
safe state.
A) True
B) False
Q#6: If a system goes from a safe state to an unsafe state, deadlock is possible.
A) True
B) False
1
Q#7: The circular-wait condition for a deadlock implies the hold-and-wait
condition.
A) True
B) False
Q#8. If a resource-allocation graph has a cycle, the system must be in a deadlocked
state.
A) True
B) False
Q#9. Protocols to prevent hold-and-wait conditions typically also prevent
starvation.
A) True
B) False
Q#10. The banker's algorithm is useful in a system with multiple instances of each
resource type.
A) True
B) False
Q#11. A system in an unsafe state will ultimately deadlock.
A) True
B) False
Q#12. Deadlock prevention and deadlock avoidance are essentially the same
approaches for handling deadlock.
A) True
B) False
2