Wednesday, November 3, 2010

Chapter 5 OSC

Attempt 1

1.

Once starvation has been detected, an algorithm can be implemented in which the system blocks new jobs until the starving jobs have been satisfied.

A) True
B) False


Correct Answer(s):

True




2.

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 turn, going in numerical order from one philosopher to the next

Correct Answer(s):

B

3.

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.


Correct Answer(s):

A




4.

In the dining philosophers problem there are five philosophers and four forks.

A) True
B) False

Correct Answer(s):

False

5.

____ 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

Correct Answer(s):

A

6.

According to the Banker’s Algorithm an unsafe state always leads to deadlock.

A) True
B) False


Correct Answer(s):

False




7.

____ 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


Correct Answer(s):

C




8.

____ 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


Correct Answer(s):

C




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.

A) True
B) False

Correct Answer(s):

True

10.

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

Correct Answer(s):

A

11.

For ____ systems, deadlocks quickly become critical situations.

A) batch
B) interactive
C) real-time
D) general purpose


Correct Answer(s):

C




12.

Failure to lock database records before updating them may result in a ____ between processes.

A) struggle
B) race
C) timeout
D) livelock


Correct Answer(s):

B




Attempt 2


1.

A deadlock is preceded by six simultaneous conditions that the operating system could have recognized.

A) True
B) False

Points Earned:

0.0/1.0


Correct Answer(s):

False

2.

____ developed the Banker’s Algorithm.

A) Havender
B) Holt
C) Dijkstra
D) Lane & Mooney

Points Earned:

1.0/1.0


Correct Answer(s):

C

3.

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.

Points Earned:

0.0/1.0


Correct Answer(s):

A

4.

Deadlock does not usually affect the entire system.

A) True
B) False

Points Earned:

1.0/1.0


Correct Answer(s):

False

5.

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

Points Earned:

1.0/1.0


Correct Answer(s):

B

6.

____ 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

Points Earned:

1.0/1.0


Correct Answer(s):

C

7.

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.

A) True
B) False

Points Earned:

0.0/1.0


Correct Answer(s):

True

8.

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.

A) True
B) False

Points Earned:

0.0/1.0


Correct Answer(s):

True

9.

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.

A) True
B) False

Points Earned:

0.0/1.0


Correct Answer(s):

True

10.

Deadlocks are most serious in real-time systems.

A) True
B) False

Points Earned:

1.0/1.0


Correct Answer(s):

True

11.

Once starvation has been detected, an algorithm can be implemented in which the system blocks new jobs until the starving jobs have been satisfied.

A) True
B) False

Points Earned:

1.0/1.0


Correct Answer(s):

True

12.

____ 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

Points Earned:

0.0/1.0


Correct Answer(s):

A

Attempt 3


1.

____ 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

Points Earned:

0.0/1.0


Correct Answer(s):

D

2.

____ 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

Points Earned:

0.0/1.0


Correct Answer(s):

A

3.

According to the Banker’s Algorithm an unsafe state always leads to deadlock.

A) True
B) False

Points Earned:

1.0/1.0


Correct Answer(s):

False

4.

If locks are not used to preserve data 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.

A) True
B) False

Points Earned:

1.0/1.0


Correct Answer(s):

True

5.

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

Points Earned:

1.0/1.0


Correct Answer(s):

C

6.

In the dining philosophers problem there are five philosophers and four forks.

A) True
B) False

Points Earned:

1.0/1.0


Correct Answer(s):

False

7.

Starvation is the result of the liberal allocation of resources.

A) True
B) False

Points Earned:

1.0/1.0


Correct Answer(s):

False

8.

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.

A) True
B) False

Points Earned:

1.0/1.0


Correct Answer(s):

True

9.

____ 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

Points Earned:

1.0/1.0


Correct Answer(s):

C

10.

Deadlock was a serious problem for early batch systems.

A) True
B) False

Points Earned:

0.0/1.0


Correct Answer(s):

False

11.

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

Points Earned:

1.0/1.0


Correct Answer(s):

B

12.

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.

Points Earned:

1.0/1.0


Correct Answer(s):

B

4 comments:

  1. your asshole why do u keep the wrong answer there, it is confusing, i got bad grade

    ReplyDelete
  2. CyberMeda maybe if you actually read over instead of trying to get a quick answer you wouldn't had gotten a bad grade -_-

    ReplyDelete
  3. Your blog is extremely helpful. However, I know there is more questions for that book, do you have them?

    ReplyDelete
  4. go to this website instead. It has quizzes 1-13 http://techhomeworkhelp.blogspot.com/2012/08/cis-1700-int-1700-chapter-quizzes.html

    ReplyDelete