Deck 5: Process Management

Full screen (f)
exit full mode
Question
Resource holding, where a job holds on to one resource while waiting for another one that's not yet available, could be sidestepped by forcing each job to request, at creation time, every resource it will need to run to completion.
Use Space or
up arrow
down arrow
to flip the card.
Question
It is easy to design a foolproof deadlock prevention policy.
Question
Locking can be done only at the level of the entire database.
Question
Deadlock was a serious problem for early batch systems.
Question
Most systems have transformed the printer into a sharable device by installing a high-speed device, a disk, between it and the CPU.
Question
Mutual exclusion should be eliminated from a computer system to avoid deadlock.
Question
Deadlocks are most serious in real-time systems.
Question
In many cases, there exists at least one allocation of resources sequence that will allow jobs to continue without becoming deadlocked.
Question
When modeling deadlock, if there's a cycle in the graph, then there is a deadlock involving the processes and the resources in the cycle.
Question
According to the Banker's Algorithm an unsafe state always leads to deadlock.
Question
Deadlock is a system-wide tangle of resource requests that begins when two or more jobs are put on hold, each waiting for a vital resource to become available.
Question
A race introduces the element of chance, an element that is desirable in database management.
Question
In a directed graph used to model deadlock, processes are represented using squares.
Question
A deadlock is preceded by five simultaneous conditions that are not necessary for the operating system to run smoothly.
Question
If locks are not used to preserve their integrity, the updated records in a database might include only some of the data-and their contents would depend on the order in which each process finishes its execution.
Question
The operating system must be sure never to satisfy a request that moves it from a safe state to an unsafe one.
Question
Although the Banker's Algorithm has been used to avoid deadlocks in systems with a few resources, it isn't always practical for most systems.
Question
Deadlock does not usually affect the entire system.
Question
A livelock is caused by two processes accessing different areas of the same disk.
Question
One problem with the Banker's Algorithm is that resources aren't well utilized because the algorithm assumes the worst case and, as a result, keeps vital resources unavailable to guard against unsafe states.
Question
Interactive systems generally improve the use of resources through ____ resource sharing, but this resource sharing capability also increases the possibility of deadlocks.

A) interspersed
B) group
C) dynamic
D) static
Question
Deadlock occurs on a modern printer when ____.

A) The network connection for the printer overflows with too many requests to use the printer.
B) Too many users attempt to access the printer at the same time.
C) The buffer fills up with too many print jobs and the printer cannot decide which one to print.
D) The printer needs all of a job's output before it will begin printing, but the spooling system fills the available disk space with only partially completed output.
Question
____ is when each process involved in the impasse is waiting for another to voluntarily release the resource so that at least one will be able to continue on.

A) Mutual exclusion
B) Resource holding
C) Circular wait
D) No preemption
Question
For ____ systems, deadlocks quickly become critical situations.

A) batch
B) interactive
C) real-time
D) general purpose
Question
A network that's congested or has filled a large percentage of its I/O buffer space can become deadlocked if it doesn't have ____ to control the flow of messages through the network.

A) procedures
B) protocols
C) policies
D) rules
Question
Starvation is the result of the liberal allocation of resources.
Question
Fill in the missing event that causes deadlock in a database. There are two processes (P1 and P2), each of which needs to update two records (R1 and R2) and the following sequence leads to a deadlock: 1. P1 accesses R1 and locks it.
2) P2 accesses R2 and locks it.
3) ____
4) P2 requests R1, which is locked by P1.

A) P2 releases R2.
B) P1 requests R1 again.
C) P1 requests R2, which is locked by P2.
D) P2 releases R1.
Question
____ is when, in modern printing systems, a disk accepts output from several users and acts as a temporary storage area for all output until the printer is ready to accept it.

A) Buffering
B) Lagging
C) Spooling
D) Spoofing
Question
In the dining philosophers problem there are five philosophers and four forks.
Question
Failure to lock database records before updating them may result in a ____ between processes.

A) struggle
B) race
C) deadlock
D) livelock
Question
Consider the case of a home construction company with two application programs, purchasing (P1) and sales (P2), which are active at the same time. They each need to access two files, inventory (F1) and suppliers (F2), to update daily transactions. The following series of events will cause a deadlock. Fill in the missing event in the sequence.
1) Purchasing (P1) accesses the supplier file (F2).
2) Sales (P2) accesses the inventory file (F1).
3) Purchasing (P1) doesn't release the supplier file (F2) but requests the inventory file (F1), but P1 is blocked because F1 is being held by P2.
4) Meanwhile, ____

A) sales (P2) doesn't release the inventory file (F1) but requests the supplier file (F2)
B) sales (P2) does release the inventory file (F1) and then requests the supplier file (F2)
C) purchasing (P1) does release the supplier file (F2) which is then requested by sales (P2)
D) purchasing (P1) exits
Question
Fill in the missing event that causes livelock. At an insurance company the system performs many daily transactions. One day the following series of events ties up the system:
1) Process P1 wishes to show a payment so it issues a command to read the balance, which is stored in cylinder 20 of a disk pack.
2) ____
3) P2 gains control of the I/O channel and issues a command to write someone else's payment to a record stored in cylinder 310. If the command is not "locked out," P2 will be put on hold while the control unit moves the arm to cylinder 310.
4) Because P2 is "on hold," the channel is free to be captured again by P1, which reconfirms its command to "read from cylinder 20."
5) Since the last command from P2 had forced the arm mechanism to cylinder 310, the disk control unit begins to reposition the arm to cylinder 20 to satisfy P1. The I/O channel would be released because P1 is once again put on hold, so it could be captured by P2, which issues a WRITE command only to discover that the arm mechanism needs to be repositioned.

A) While the control unit is moving the arm to cylinder 20, P1 is put on hold and the I/O channel is free to process the next I/O request.
B) P1 discovers that another process has locked the portion of the disk it needs to access.
C) P2 is put on hold while the control unit moves the arm to satisfy P1's request
D) P1 is unable to find the information it needs, so requests a different READ operation for a different cylinder.
Question
____ is the act of allowing only one process to have access to a dedicated resource.

A) No preemption
B) Circular wait
C) Resource holding
D) Mutual exclusion
Question
Fill in the missing step in the following deadlock situation. Two users from the local board of education are each running a program (P1 and P2), and both programs will eventually need two tape drives to copy files from one tape to another. Only two tape drives are available and they're allocated on an "as requested" basis. Soon the following sequence transpires: 1. P1 requests tape drive 1 and gets it.
2) ____
3) P1 requests tape drive 2 but is blocked.
4) P2 requests tape drive 1 but is blocked.

A) P1 requests tape drive 2.
B) P2 requests tape drive 2 and gets it.
C) P2 requests tape drive 1 but is blocked.
D) P1 releases tape drive 1.
Question
____ showed how the four conditions can be modeled using directed graphs.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney
Question
____ allows a resource to be held by a process as long as it is needed.

A) No preemption
B) Circular wait
C) Resource holding
D) Mutual exclusion
Question
When recovering from deadlock, jobs close to completion are usually left alone.
Question
Once starvation has been detected, an algorithm can be implemented in which the system blocks new jobs until the starving jobs have been satisfied.
Question
____ occurs when two processes do not release control of resources they are using.

A) No preemption
B) Circular wait
C) Resource holding
D) Mutual exclusion
Question
There are several recovery algorithms, but they all have one feature in common: they all require at least one victim, an expendable job, which, when removed from the deadlock, will free the system.
Question
The first step in reducing a directed graph to eliminate deadlock is ____.

A) Remove the process that is holding on to the most resources.
B) Find a process that's waiting only for resource classes that aren't fully allocated
C) Find a process that is currently using a resource and not waiting for one.
D) Find the oldest process and remove it from the graph.
Question
Assume the following events and actions take place. The following statement,____ is true.Event Action 1 P1 requests and is allocated R1.
2 P2 requests and is allocated R2.
3 P3 requests and is allocated R3.
4 P1 requests R2.
5 P2 requests R3.
6 P3 requests R1.

A) There is no deadlock.
B) Event 4 caused deadlock.
C) Event 5 caused deadlock.
D) Event 6 caused deadlock.
Question
In the "dining philosophers" problem, a philosopher can pick up a fork when____.

A) When there is one available
B) When there are two available
C) When no other philosopher is eating
D) When it is his turn, going in numerical order from one philosopher to the next
Question
____ developed the Banker's Algorithm.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney
Question
In a directed graph used to model deadlock, ____ represents deadlock.

A) a solid arrow
B) a dashed arrow
C) a cycle
D) any path
Question
____ is necessary in any computer system because some resources such as memory, CPU, and dedicated devices must be exclusively allocated to one user at a time.

A) Mutual exclusion
B) Resource holding
C) No preemption
D) Circular wait
Question
The first and simplest recovery method, and the most drastic, is to ____.

A) select a nondeadlocked job, preempt the resources it's holding, and allocate them to a deadlocked process so it can resume execution, thus breaking the deadlock
B) identify which jobs are involved in the deadlock and terminate them one at a time, checking to see if the deadlock is eliminated after each removal
C) terminate only the jobs involved in the deadlock and ask their users to resubmit them
D) terminate every job that's active in the system and restart them from the beginning
Question
Assume the following events and actions take place. The following statement, ____ is true.Event Action 1 P1 requests and is allocated the printer R1.
2 P1 releases the printer R1.
3 P2 requests and is allocated the disk drive R2.
4 P2 releases the disk R2.
5 P3 requests and is allocated the plotter R3.
6 P3 releases the plotter R3.

A) There is no deadlock.
B) Event 4 caused deadlock.
C) Event 5 caused deadlock.
D) Event 6 caused deadlock.
Question
The scheme of ____ removes the possibility of a circular wait and therefore guarantees the removal of deadlocks.

A) hierarchical ordering
B) preemption
C) saving and restoring job state
D) requesting all resources before job run
Question
An algorithm designed to detect starvation by tracking how long each job has been waiting for resources is the same concept as ____.

A) deadlock
B) aging
C) preemption
D) round robin
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: Process Management
1
Resource holding, where a job holds on to one resource while waiting for another one that's not yet available, could be sidestepped by forcing each job to request, at creation time, every resource it will need to run to completion.
True
2
It is easy to design a foolproof deadlock prevention policy.
False
3
Locking can be done only at the level of the entire database.
False
4
Deadlock was a serious problem for early batch systems.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Most systems have transformed the printer into a sharable device by installing a high-speed device, a disk, between it and the CPU.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
Mutual exclusion should be eliminated from a computer system to avoid deadlock.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Deadlocks are most serious in real-time systems.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
In many cases, there exists at least one allocation of resources sequence that will allow jobs to continue without becoming deadlocked.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
When modeling deadlock, if there's a cycle in the graph, then there is a deadlock involving the processes and the resources in the cycle.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
According to the Banker's Algorithm an unsafe state always leads to deadlock.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Deadlock is a system-wide tangle of resource requests that begins when two or more jobs are put on hold, each waiting for a vital resource to become available.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
A race introduces the element of chance, an element that is desirable in database management.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
In a directed graph used to model deadlock, processes are represented using squares.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
A deadlock is preceded by five simultaneous conditions that are not necessary for the operating system to run smoothly.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
If locks are not used to preserve their integrity, the updated records in a database might include only some of the data-and their contents would depend on the order in which each process finishes its execution.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
The operating system must be sure never to satisfy a request that moves it from a safe state to an unsafe one.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
Although the Banker's Algorithm has been used to avoid deadlocks in systems with a few resources, it isn't always practical for most systems.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
Deadlock does not usually affect the entire system.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
A livelock is caused by two processes accessing different areas of the same disk.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
One problem with the Banker's Algorithm is that resources aren't well utilized because the algorithm assumes the worst case and, as a result, keeps vital resources unavailable to guard against unsafe states.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Interactive systems generally improve the use of resources through ____ resource sharing, but this resource sharing capability also increases the possibility of deadlocks.

A) interspersed
B) group
C) dynamic
D) static
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Deadlock occurs on a modern printer when ____.

A) The network connection for the printer overflows with too many requests to use the printer.
B) Too many users attempt to access the printer at the same time.
C) The buffer fills up with too many print jobs and the printer cannot decide which one to print.
D) The printer needs all of a job's output before it will begin printing, but the spooling system fills the available disk space with only partially completed output.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
____ is when each process involved in the impasse is waiting for another to voluntarily release the resource so that at least one will be able to continue on.

A) Mutual exclusion
B) Resource holding
C) Circular wait
D) No preemption
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
For ____ systems, deadlocks quickly become critical situations.

A) batch
B) interactive
C) real-time
D) general purpose
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
A network that's congested or has filled a large percentage of its I/O buffer space can become deadlocked if it doesn't have ____ to control the flow of messages through the network.

A) procedures
B) protocols
C) policies
D) rules
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
Starvation is the result of the liberal allocation of resources.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Fill in the missing event that causes deadlock in a database. There are two processes (P1 and P2), each of which needs to update two records (R1 and R2) and the following sequence leads to a deadlock: 1. P1 accesses R1 and locks it.
2) P2 accesses R2 and locks it.
3) ____
4) P2 requests R1, which is locked by P1.

A) P2 releases R2.
B) P1 requests R1 again.
C) P1 requests R2, which is locked by P2.
D) P2 releases R1.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
____ is when, in modern printing systems, a disk accepts output from several users and acts as a temporary storage area for all output until the printer is ready to accept it.

A) Buffering
B) Lagging
C) Spooling
D) Spoofing
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
In the dining philosophers problem there are five philosophers and four forks.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
Failure to lock database records before updating them may result in a ____ between processes.

A) struggle
B) race
C) deadlock
D) livelock
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Consider the case of a home construction company with two application programs, purchasing (P1) and sales (P2), which are active at the same time. They each need to access two files, inventory (F1) and suppliers (F2), to update daily transactions. The following series of events will cause a deadlock. Fill in the missing event in the sequence.
1) Purchasing (P1) accesses the supplier file (F2).
2) Sales (P2) accesses the inventory file (F1).
3) Purchasing (P1) doesn't release the supplier file (F2) but requests the inventory file (F1), but P1 is blocked because F1 is being held by P2.
4) Meanwhile, ____

A) sales (P2) doesn't release the inventory file (F1) but requests the supplier file (F2)
B) sales (P2) does release the inventory file (F1) and then requests the supplier file (F2)
C) purchasing (P1) does release the supplier file (F2) which is then requested by sales (P2)
D) purchasing (P1) exits
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
Fill in the missing event that causes livelock. At an insurance company the system performs many daily transactions. One day the following series of events ties up the system:
1) Process P1 wishes to show a payment so it issues a command to read the balance, which is stored in cylinder 20 of a disk pack.
2) ____
3) P2 gains control of the I/O channel and issues a command to write someone else's payment to a record stored in cylinder 310. If the command is not "locked out," P2 will be put on hold while the control unit moves the arm to cylinder 310.
4) Because P2 is "on hold," the channel is free to be captured again by P1, which reconfirms its command to "read from cylinder 20."
5) Since the last command from P2 had forced the arm mechanism to cylinder 310, the disk control unit begins to reposition the arm to cylinder 20 to satisfy P1. The I/O channel would be released because P1 is once again put on hold, so it could be captured by P2, which issues a WRITE command only to discover that the arm mechanism needs to be repositioned.

A) While the control unit is moving the arm to cylinder 20, P1 is put on hold and the I/O channel is free to process the next I/O request.
B) P1 discovers that another process has locked the portion of the disk it needs to access.
C) P2 is put on hold while the control unit moves the arm to satisfy P1's request
D) P1 is unable to find the information it needs, so requests a different READ operation for a different cylinder.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
____ is the act of allowing only one process to have access to a dedicated resource.

A) No preemption
B) Circular wait
C) Resource holding
D) Mutual exclusion
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Fill in the missing step in the following deadlock situation. Two users from the local board of education are each running a program (P1 and P2), and both programs will eventually need two tape drives to copy files from one tape to another. Only two tape drives are available and they're allocated on an "as requested" basis. Soon the following sequence transpires: 1. P1 requests tape drive 1 and gets it.
2) ____
3) P1 requests tape drive 2 but is blocked.
4) P2 requests tape drive 1 but is blocked.

A) P1 requests tape drive 2.
B) P2 requests tape drive 2 and gets it.
C) P2 requests tape drive 1 but is blocked.
D) P1 releases tape drive 1.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
____ showed how the four conditions can be modeled using directed graphs.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
____ allows a resource to be held by a process as long as it is needed.

A) No preemption
B) Circular wait
C) Resource holding
D) Mutual exclusion
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
When recovering from deadlock, jobs close to completion are usually left alone.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Once starvation has been detected, an algorithm can be implemented in which the system blocks new jobs until the starving jobs have been satisfied.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
____ occurs when two processes do not release control of resources they are using.

A) No preemption
B) Circular wait
C) Resource holding
D) Mutual exclusion
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
There are several recovery algorithms, but they all have one feature in common: they all require at least one victim, an expendable job, which, when removed from the deadlock, will free the system.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
The first step in reducing a directed graph to eliminate deadlock is ____.

A) Remove the process that is holding on to the most resources.
B) Find a process that's waiting only for resource classes that aren't fully allocated
C) Find a process that is currently using a resource and not waiting for one.
D) Find the oldest process and remove it from the graph.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
Assume the following events and actions take place. The following statement,____ is true.Event Action 1 P1 requests and is allocated R1.
2 P2 requests and is allocated R2.
3 P3 requests and is allocated R3.
4 P1 requests R2.
5 P2 requests R3.
6 P3 requests R1.

A) There is no deadlock.
B) Event 4 caused deadlock.
C) Event 5 caused deadlock.
D) Event 6 caused deadlock.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
In the "dining philosophers" problem, a philosopher can pick up a fork when____.

A) When there is one available
B) When there are two available
C) When no other philosopher is eating
D) When it is his turn, going in numerical order from one philosopher to the next
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
____ developed the Banker's Algorithm.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
In a directed graph used to model deadlock, ____ represents deadlock.

A) a solid arrow
B) a dashed arrow
C) a cycle
D) any path
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
____ is necessary in any computer system because some resources such as memory, CPU, and dedicated devices must be exclusively allocated to one user at a time.

A) Mutual exclusion
B) Resource holding
C) No preemption
D) Circular wait
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
The first and simplest recovery method, and the most drastic, is to ____.

A) select a nondeadlocked job, preempt the resources it's holding, and allocate them to a deadlocked process so it can resume execution, thus breaking the deadlock
B) identify which jobs are involved in the deadlock and terminate them one at a time, checking to see if the deadlock is eliminated after each removal
C) terminate only the jobs involved in the deadlock and ask their users to resubmit them
D) terminate every job that's active in the system and restart them from the beginning
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
Assume the following events and actions take place. The following statement, ____ is true.Event Action 1 P1 requests and is allocated the printer R1.
2 P1 releases the printer R1.
3 P2 requests and is allocated the disk drive R2.
4 P2 releases the disk R2.
5 P3 requests and is allocated the plotter R3.
6 P3 releases the plotter R3.

A) There is no deadlock.
B) Event 4 caused deadlock.
C) Event 5 caused deadlock.
D) Event 6 caused deadlock.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
The scheme of ____ removes the possibility of a circular wait and therefore guarantees the removal of deadlocks.

A) hierarchical ordering
B) preemption
C) saving and restoring job state
D) requesting all resources before job run
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
An algorithm designed to detect starvation by tracking how long each job has been waiting for resources is the same concept as ____.

A) deadlock
B) aging
C) preemption
D) round robin
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.