-
Operating Systems,
5
th
ed.
Test Bank
Chapter 6
True / False
Questions:
(判断题)
1.
T / F
–
Deadlock can be defined as
the periodic blocking of a set of processes
that either compete for system
resources or communicate with each other.
< br>死锁是指一系列进程在相互竞争系统资源时发生的一种周期性
.
< br>阶段性的阻塞。
ANS:
F
(permanent blocking)
错误。(应该是永久性的阻塞)
2.
T / F
–
All
deadlocks involve conflicting needs for resources
by two or more
processes.
死锁都是由两个或两个以上进程对资源需求的冲突引起的。
ANS:
T
正确。
3.
T / F
–
A
reusable resource is one that can be safely used
by only one process at
a time and is
not depleted by that use.
可重复使用资源是指一次只能
被一个进程使用,并且不会因使用而被耗尽的资源。
ANS:
T
正确。
4.
T / F
–
A consumable resource is
one that can be safely used by only one
process at a time and is not depleted
by that use.
可消费资源是指一次只能被一个进程使用,并且不会因使用
而被耗尽的资源
ANS:
F
(one that can be created (produced) and destroyed
(consumed)
错误。可消费资源是指可以被创建和销毁的资源。
5.
T / F
–
Although deadlock can
potentially exist without it, the condition known
as
Circular Wait is required for
deadlock to actually take place.
虽然死锁可能
只是潜在性的存在,但循环等待必然导致死锁发生。
ANS:
T
正确。
6.
T / F
–
The strategy of deadlock
prevention is to design a system in such a way
that the possibility of deadlock is
minimized.
死锁预防是指在设计系统时将死锁可能性降到最小。
ANS:
F (possibility is
excluded)
错误。死锁预防是指将死锁可能性排除。
7.
T / F
–
The Deadlock Avoidance
approach to solving the deadlock problem
allows the three necessary conditions
for deadlocks to exist.
死锁避免,允许死锁的三个必要条
件存在,仍然可以解决死锁问题。
ANS:
T
正确。
8.
T / F
–
In the Resource Allocation
Denial approach to Deadlock Avoidance, a
safe state is defined as one in which
all potential process sequences do not
result in a deadlock.
Chapter 6
–
Concurrency: Deadlock and Starvation
第六章
并发性:
死锁与饥饿
1
Operating
Systems, 5
th
ed.
Test Bank
Chapter 6
资源拒绝分配解决死锁问题时,安全状态是指所有进程执行序列
可以避免死锁的状
态。
ANS:
F (in which at least one does not)
错误。只要存在一个进程执行序列可以避免死锁即可。
9.
T / F
–
Deadlock Detection
strategies do not limit resource access or
restrict
process actions.
死锁检测不限制资源分配,也不限制进程的行为。
ANS:
T
正确。死锁检测算法只
负责检测,如果检测到死锁则要执行恢复策略。
10.
T / F
–
One of
the most common approaches for recovery from
deadlocked
processes is to abort all
deadlocked processes.
最常用的死锁恢复方法就是取消所有死锁进程。
ANS:
T
正确。
11.
T / F
–
Although
each strategy that deals with deadlocks has its
advantages and
disadvantages, the best
solution to the problem is to choose one and stick
with it.
虽然各种死锁解决方法个有利弊,但最好的办法还是选择其中一个
并只用它。
ANS:
F
(integrated strategy - use different strategies in
different situations)
错误。不同的情况要选择不同的策略。
12.
T / F
–
The Dining
Philosopher’s Problem illustrates basic problems
in deadlock
and starvation.
哲学家
就餐问题举例说明了死锁与饥饿的基本问题。
ANS:
T
正确。
13.
T / F
–
A pipe
in is a circular buffer that allows two processes
to communicate on
the producer-consumer
model.
一个
UNIX
管道是
一个环形缓冲区,允许两个进程以生产者
---
消费者模式通信
。
ANS:
T
正确。
14.
T / F
–
One
thread synchronization primitive supported by is
the Mutual
Exclusion (mutex) lock.
Solaris
同步原语由互斥锁支持。
ANS:
T
正确。
15.
T / F
–
Each
synchronization object in a system can either be
in a signaled or
signaling state.
W2K
系统下,一个同步对象可以处于两种状态:信号状态和正在发信号
的状态。
ANS:
F
(signaled or unsignaled state)
错误。
W2K
系统下,一个同步对象可以处于两种状态:信号状态和等待信号状<
/p>
态。
Multiple Choice
Questions(
选择题
)
1.
The permanent blocking of a set of
processes that either compete for system
resources or communicate with each
other is called:
一组进程相互竞争系统资源导致永久阻塞的情况被称为:(
)
2
Operating Systems,
5
th
ed.
Test Bank
Chapter 6
2.
3.
4.
5.
6.
7.
a.
Starvation
饥饿
b.
Deadlock
死锁
c.
Prioritization
优先级
d.
All of the above
以上都是
ANS:
B
All deadlocks involve
conflicting needs for resources by:
死锁是由于(
)对资源的需求冲突引起的。
a.
One or more processes
一个或更多进程
b.
Two or more processes
两个或更多进程
c.
Three or more processes
三个或更多进程
d.
None of the above
都不是
ANS:
B
A resource that can be
created and destroyed is called a:
一个能被创建
和消耗
的资源
被称为(
)
a.
Reusable resource
可重复使用资源
b.
Producible resource
可生产资源
c.
Consumable
resource
可消费资源
d.
All of the above
以上都是
ANS:
C
An example of a consumable
resource is the following:
一个可消费资源的例子是
(
)
a.
Messages
消息
b.
Printers
打印机
c.
Main Memory
主存
d.
All of the above
以上都是
A condition
of policy that must be present for a deadlock to
be possible is:
下列是死锁的必要条件的是(
)
a.
Mutual exclusion
互斥
b.
Hold and wait
占有且等待
c.
No preemption
非抢占
d.
All of the above
以上都是
ANS:
D
A direct method of
deadlock prevention is to prevent the occurrence
of:
一个直接的死锁预防方法是避免(
)
a.
Mutual exclusion
互斥
b.
Hold and wait
占有且等待
c.
Circular wait
循环等待
d.
All of the above
以上都是
ANS:
C
One approach to deadlock
avoidance is called:
一个死锁避免方法是
(
)
a.
Process Termination
Denial
进程终止拒绝
3