SCIA 360 Chapter 5

Description

Test 1 Chapters 1-5
Tyler Rock
Flashcards by Tyler Rock, updated more than 1 year ago
Tyler Rock
Created by Tyler Rock almost 6 years ago
994
0

Resource summary

Question Answer
In ____ systems, deadlocks can cause critical situations. a. batch b. interactive c. real-time d. general purpose c. real-time
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 a. sales (P2) doesn’t release the inventory file (F1) but requests the supplier file (F2)
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. c. P1 requests R2, which is locked by P2.
Failure to lock database records before updating them may result in a ____ between processes. a. struggle b. race c. timeout d. livelock b. race
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. b. P2 requests drive 2 and gets it.
In printing systems using ____, 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 c. spooling
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 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
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. CORRECT 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.
____ 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 D. Mutual exclusion
____ 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 c. Circular wait
____ published a visual tool to show how deadlock conditions can be modeled using directed graphs. a. Havender b. Holt c. Dijkstra d. Lane & Mooney b. Holt
The Printer Event 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. 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. a. There is no deadlock.
____ 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 a. Mutual exclusion
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 a. hierarchical ordering
____ developed the Banker’s Algorithm. a. Havender b. Holt c. Dijkstra d. Lane & Mooney c. Dijkstra
The Banker’s Algorithm is an example of a(n) ____ policy. a. mutual exclusion b. detection c. avoidance d. recovery c. avoidance
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. c.Find a process that is currently using a resource and not waiting for one.
The first and simplest recovery method, and the most drastic, is to ____. a. select a non deadlocked 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 d. terminate every job that’s active in the system and restart them from the beginning
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 b. there are two available
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 b. aging
Show full summary Hide full summary

Similar

Disaster- Test 1 Disaster Medicine- PMU- 3rd Year
Med Student
SCIA 360 Chapter 3
Tyler Rock
SCIA 360 Chapter 4
Tyler Rock
SCIA 360 Chapter 1
Tyler Rock
SCIA 360 Chapter 2
Tyler Rock
Health Assessment Exam 1
Harry Westbrooks
Testing Site
CDismang
SCIA 370 Chapter 1
Tyler Rock
I Phone
ucmasaecs
Art of the Baroque
Jennifer Born
Native Plants for Wildlife MSU Quiz 1
Wes Smalley