Deck 5: Process Management

Full screen (f)
exit full mode
Question
A race introduces the element of chance,which is a highly desirable attribute,in database management.
Use Space or
up arrow
down arrow
to flip the card.
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
One problem with the Banker's Algorithm is that because the algorithm assumes the worst case,vital resources can be unavailable in order to guard against unsafe states.
Question
If locks are not used to preserve data integrity,the updated records in a database may include only some of the data-and their contents depend on the order in which each process finishes its execution.
Question
In general,operating systems must either choose avoidance or recovery as a strategy for dealing with deadlocks.
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
Although the Banker's Algorithm has been used to avoid deadlocks in systems with a few resources,it isn't practical for most systems.
Question
When using the Banker's Algorithm,an operating system must be sure never to satisfy a request that moves it from a safe state to an unsafe one.
Question
A deadlock is preceded by the simultaneous occurrence of six conditions that the operating system (or other systems)could have recognized.
Question
According to the Banker's Algorithm,an unsafe state always leads to deadlock.
Question
In the dining philosophers problem,there are five philosophers and four forks.
Question
A livelock can be caused by two processes accessing different areas of the same disk.
Question
When using a directed graph to model a system,if there's a cycle in the graph,then there is a deadlock involving the processes and the resources shown in the cycle.
Question
Starvation is the result of a policy that liberally allocates resources.
Question
Deadlock does not usually affect the entire system.
Question
Deadlock was a serious problem for early batch systems.
Question
All recovery algorithms have one feature in common: they all require at least one victim,which,when removed from the deadlock,will free the system.
Question
Database locking should be done only at the level of the entire database.
Question
To recover from deadlock,a factor that is commonly considered when selecting a victim is the CPU time used by a job - jobs close to completion are usually left alone.
Question
Resource holding,where a job holds on to one resource while waiting for another one that's not yet available,can be sidestepped by forcing each job to request,at creation time,every resource it will need to run to completion.
Question
Failure to lock database records before updating them may result in a ____ between processes.

A) struggle
B) race
C) timeout
D) livelock
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) Phishing
B) Lagging
C) Spooling
D) Spoofing
Question
The Banker's Algorithm is an example of a(n)____ policy.

A) mutual exclusion
B) detection
C) avoidance
D) recovery
Question
Deadlock can occur on a 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
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
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)and 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
Assume that the events in the accompanying narrative take place.Which of the following statements is true?

A) There is no deadlock.
B) Event 4 caused deadlock.
C) Event 5 caused deadlock.
D) Event 6 caused deadlock.
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 DVD drives to copy files from one disc to another.Only two DVD-R drives are available and they're allocated on an "as requested" basis.Soon the following sequence transpires:
1)P1 requests drive 1 and gets it.
2)____
3)P1 requests drive 2 but is blocked.
4)P2 requests drive 1 but is blocked.

A) P1 requests drive 2.
B) P2 requests drive 2 and gets it.
C) P2 requests drive 1 but is blocked.
D) P1 releases drive 1.
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
In the "dining philosophers" problem,a philosopher can pick up a fork when ____.

A) there is one available
B) there are two available
C) no other philosopher is eating
D) it is his/her turn, going in numerical order from one philosopher to the next
Question
An algorithm designed to detect starvation by tracking how long each job has been waiting for resources is using the concept of ____.

A) deadlock
B) aging
C) preemption
D) round robin
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
____ developed the Banker's Algorithm.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney
Question
____ is when each process involved in an impasse is waiting for another to voluntarily release its resources so that at least one process will be able to continue.

A) Mutual exclusion
B) Resource holding
C) Circular wait
D) No preemption
Question
____ is the policy 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 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
____ published a visual tool to show how deadlock conditions can be modeled using directed graphs.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney
Question
In ____ systems,deadlocks can cause critical situations.

A) batch
B) interactive
C) real-time
D) general purpose
Question
Which of the following is the first step in reducing a directed graph to eliminate deadlock?

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
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
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/40
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: Process Management
1
A race introduces the element of chance,which is a highly desirable attribute,in database management.
False
2
Once starvation has been detected,an algorithm can be implemented in which the system blocks new jobs until the starving jobs have been satisfied.
True
3
One problem with the Banker's Algorithm is that because the algorithm assumes the worst case,vital resources can be unavailable in order to guard against unsafe states.
True
4
If locks are not used to preserve data integrity,the updated records in a database may include only some of the data-and their contents depend on the order in which each process finishes its execution.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
5
In general,operating systems must either choose avoidance or recovery as a strategy for dealing with deadlocks.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
6
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 40 flashcards in this deck.
Unlock Deck
k this deck
7
Although the Banker's Algorithm has been used to avoid deadlocks in systems with a few resources,it isn't practical for most systems.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
8
When using the Banker's Algorithm,an 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 40 flashcards in this deck.
Unlock Deck
k this deck
9
A deadlock is preceded by the simultaneous occurrence of six conditions that the operating system (or other systems)could have recognized.
Unlock Deck
Unlock for access to all 40 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 40 flashcards in this deck.
Unlock Deck
k this deck
11
In the dining philosophers problem,there are five philosophers and four forks.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
12
A livelock can be caused by two processes accessing different areas of the same disk.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
13
When using a directed graph to model a system,if there's a cycle in the graph,then there is a deadlock involving the processes and the resources shown in the cycle.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
14
Starvation is the result of a policy that liberally allocates resources.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
15
Deadlock does not usually affect the entire system.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
16
Deadlock was a serious problem for early batch systems.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
17
All recovery algorithms have one feature in common: they all require at least one victim,which,when removed from the deadlock,will free the system.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
18
Database locking should be done only at the level of the entire database.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
19
To recover from deadlock,a factor that is commonly considered when selecting a victim is the CPU time used by a job - jobs close to completion are usually left alone.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
20
Resource holding,where a job holds on to one resource while waiting for another one that's not yet available,can be sidestepped by forcing each job to request,at creation time,every resource it will need to run to completion.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
21
Failure to lock database records before updating them may result in a ____ between processes.

A) struggle
B) race
C) timeout
D) livelock
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
22
____ 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) Phishing
B) Lagging
C) Spooling
D) Spoofing
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
23
The Banker's Algorithm is an example of a(n)____ policy.

A) mutual exclusion
B) detection
C) avoidance
D) recovery
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
24
Deadlock can occur on a 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 40 flashcards in this deck.
Unlock Deck
k this deck
25
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 40 flashcards in this deck.
Unlock Deck
k this deck
26
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)and 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 40 flashcards in this deck.
Unlock Deck
k this deck
27
Assume that the events in the accompanying narrative take place.Which of the following statements is true?

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 40 flashcards in this deck.
Unlock Deck
k this deck
28
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 DVD drives to copy files from one disc to another.Only two DVD-R drives are available and they're allocated on an "as requested" basis.Soon the following sequence transpires:
1)P1 requests drive 1 and gets it.
2)____
3)P1 requests drive 2 but is blocked.
4)P2 requests drive 1 but is blocked.

A) P1 requests drive 2.
B) P2 requests drive 2 and gets it.
C) P2 requests drive 1 but is blocked.
D) P1 releases drive 1.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
29
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 40 flashcards in this deck.
Unlock Deck
k this deck
30
In the "dining philosophers" problem,a philosopher can pick up a fork when ____.

A) there is one available
B) there are two available
C) no other philosopher is eating
D) it is his/her turn, going in numerical order from one philosopher to the next
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
31
An algorithm designed to detect starvation by tracking how long each job has been waiting for resources is using the concept of ____.

A) deadlock
B) aging
C) preemption
D) round robin
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
32
____ 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 40 flashcards in this deck.
Unlock Deck
k this deck
33
____ developed the Banker's Algorithm.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
34
____ is when each process involved in an impasse is waiting for another to voluntarily release its resources so that at least one process will be able to continue.

A) Mutual exclusion
B) Resource holding
C) Circular wait
D) No preemption
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
35
____ is the policy 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 40 flashcards in this deck.
Unlock Deck
k this deck
36
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 40 flashcards in this deck.
Unlock Deck
k this deck
37
____ published a visual tool to show how deadlock conditions can be modeled using directed graphs.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
38
In ____ systems,deadlocks can cause critical situations.

A) batch
B) interactive
C) real-time
D) general purpose
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
39
Which of the following is the first step in reducing a directed graph to eliminate deadlock?

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 40 flashcards in this deck.
Unlock Deck
k this deck
40
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 40 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 40 flashcards in this deck.