COS3721 NEW EXAM WITH COMPLETE SOLUTIONS
100% VERIFIED
1. A deadlocked state occurs whenever ____.
A) a process is waiting for I/O to a device that does not exist
B) the system has no available free resources
C) every process in a set is waiting for an event that can only be caused by another
process in the set
D) a process is unable to release its request for a resource after use - ANSWER C
2. One necessary condition for deadlock is ____, which states that at least one resource
must be held in a nonsharable mode.
A) hold and wait
B) mutual exclusion
C) circular wait
no preemption - ANSWER B
3. One necessary condition for deadlock is ______, which states that a process must be
holding one resource and waiting to acquire additional resources.
A) hold and wait
B) mutual exclusion
C) circular wait
D) no preemption - ANSWER A
4. One necessary condition for deadlock is _____________, which states that a resource
can be released only voluntarily by the process holding the resource. A) hold and wait
B) mutual exclusion
,C) circular wait
no preemption - ANSWER D
5. One necessary condition for deadlock is ____, which states that there is a chain of
waiting processes whereby P0 is waiting for a resource held by P1, P1 is waiting for a
resource held by P2, and Pn is waiting for a resource held by P0. A) hold and wait
B) mutual exclusion
C) circular wait
D) no preemption - ANSWER C
6. The witness software product is a ____.
A) mutual-exclusion lock-based lock-order verifier to protect critical sections
B) a modeler to develop resource allocation graphs
C) a driver that can be used to prevent mutual exclusion for nonsharable resources
Banker's algorithm implementation available for most operating systems - ANSWER A
7. In a system resource-allocation graph, ____.
A) a directed edge from a process to a resource is called an assignment edge
B) A directed edge from a resource to a process is called a request edge
C) A directed edge from a process to a resource is called a request edge
D) None of the above - ANSWER C
8. A cycle in a resource-allocation graph is ____.
A) a necessary and sufficient condition for deadlock in the case that each resource has
more than one instance
B) a necessary and sufficient condition for a deadlock in the case that each resource
has exactly one instance
C) a sufficient condition for a deadlock in the case that each resource has more than
once instance
is neither necessary nor sufficient for indicating deadlock in the case that each
,resource has exactly one instance - ANSWER B
To handle deadlocks, operating systems most often ___.
A) pretend that deadlocks never occur
B) utilize protocols to avoid or prevent deadlocks
C) detect and recover from deadlocks
D) None of the above - ANSWER A
10. Which of the following 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. - ANSWER D
11. Consider three processes, each competing for ten resources. The following table
has been recorded at time 0. The table below shows the process, the maximum number
of resources needed by the process, and the number of resources currently owned by
each process. Which of the following correctly characterizes this state?
Process Maximum Needs Currently Owned
P0 10 4
P1 3 1
P2 6 4
A) It is safe.
B) It is not safe.
C) The state cannot be determined.
D) It is an impossible state. - ANSWER B
12. Suppose there are 12 resources shared by three processes. At time 0, the following
information has been collected. The table below shows the process, the maximum
, number of resources required by the process, and the number of resources currently
belonging to each process. Which of the following correctly describes this state?
Process Maximum Needs Currently Owned
P0 10 4
P1 3 2
P2 7 4
A) It is safe.
B) It is not safe.
C) The state cannot be determined.
D) It is an impossible state. - ANSWER A
1. The ____ register of an I/O port can be written by the host to initiate a command or to
select the mode of a device.
A) status
B) control
C) data-in
D) transfer - ANSWER B
2. An interrupt priority scheme can be used to ____.
A) allow the most urgent work to be finished first
B) make it possible for high-priority interrupts to preempt the execution of a low priority
interrupt
C) delay servicing the low-priority interrupt without disabling all interrupts
D) All of the above - ANSWER D
3. DMA controllers ____.
A) do not require an extra, special purpose, processor
B) are a nonstandard part in current PCs
C) are capable of stealing memory access cycles from the primary CPU
100% VERIFIED
1. A deadlocked state occurs whenever ____.
A) a process is waiting for I/O to a device that does not exist
B) the system has no available free resources
C) every process in a set is waiting for an event that can only be caused by another
process in the set
D) a process is unable to release its request for a resource after use - ANSWER C
2. One necessary condition for deadlock is ____, which states that at least one resource
must be held in a nonsharable mode.
A) hold and wait
B) mutual exclusion
C) circular wait
no preemption - ANSWER B
3. One necessary condition for deadlock is ______, which states that a process must be
holding one resource and waiting to acquire additional resources.
A) hold and wait
B) mutual exclusion
C) circular wait
D) no preemption - ANSWER A
4. One necessary condition for deadlock is _____________, which states that a resource
can be released only voluntarily by the process holding the resource. A) hold and wait
B) mutual exclusion
,C) circular wait
no preemption - ANSWER D
5. One necessary condition for deadlock is ____, which states that there is a chain of
waiting processes whereby P0 is waiting for a resource held by P1, P1 is waiting for a
resource held by P2, and Pn is waiting for a resource held by P0. A) hold and wait
B) mutual exclusion
C) circular wait
D) no preemption - ANSWER C
6. The witness software product is a ____.
A) mutual-exclusion lock-based lock-order verifier to protect critical sections
B) a modeler to develop resource allocation graphs
C) a driver that can be used to prevent mutual exclusion for nonsharable resources
Banker's algorithm implementation available for most operating systems - ANSWER A
7. In a system resource-allocation graph, ____.
A) a directed edge from a process to a resource is called an assignment edge
B) A directed edge from a resource to a process is called a request edge
C) A directed edge from a process to a resource is called a request edge
D) None of the above - ANSWER C
8. A cycle in a resource-allocation graph is ____.
A) a necessary and sufficient condition for deadlock in the case that each resource has
more than one instance
B) a necessary and sufficient condition for a deadlock in the case that each resource
has exactly one instance
C) a sufficient condition for a deadlock in the case that each resource has more than
once instance
is neither necessary nor sufficient for indicating deadlock in the case that each
,resource has exactly one instance - ANSWER B
To handle deadlocks, operating systems most often ___.
A) pretend that deadlocks never occur
B) utilize protocols to avoid or prevent deadlocks
C) detect and recover from deadlocks
D) None of the above - ANSWER A
10. Which of the following 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. - ANSWER D
11. Consider three processes, each competing for ten resources. The following table
has been recorded at time 0. The table below shows the process, the maximum number
of resources needed by the process, and the number of resources currently owned by
each process. Which of the following correctly characterizes this state?
Process Maximum Needs Currently Owned
P0 10 4
P1 3 1
P2 6 4
A) It is safe.
B) It is not safe.
C) The state cannot be determined.
D) It is an impossible state. - ANSWER B
12. Suppose there are 12 resources shared by three processes. At time 0, the following
information has been collected. The table below shows the process, the maximum
, number of resources required by the process, and the number of resources currently
belonging to each process. Which of the following correctly describes this state?
Process Maximum Needs Currently Owned
P0 10 4
P1 3 2
P2 7 4
A) It is safe.
B) It is not safe.
C) The state cannot be determined.
D) It is an impossible state. - ANSWER A
1. The ____ register of an I/O port can be written by the host to initiate a command or to
select the mode of a device.
A) status
B) control
C) data-in
D) transfer - ANSWER B
2. An interrupt priority scheme can be used to ____.
A) allow the most urgent work to be finished first
B) make it possible for high-priority interrupts to preempt the execution of a low priority
interrupt
C) delay servicing the low-priority interrupt without disabling all interrupts
D) All of the above - ANSWER D
3. DMA controllers ____.
A) do not require an extra, special purpose, processor
B) are a nonstandard part in current PCs
C) are capable of stealing memory access cycles from the primary CPU