操作系统复习题.doc

上传人:wux****ua 文档编号:7915829 上传时间:2020-03-25 格式:DOC 页数:7 大小:45KB
返回 下载 相关 举报
操作系统复习题.doc_第1页
第1页 / 共7页
操作系统复习题.doc_第2页
第2页 / 共7页
操作系统复习题.doc_第3页
第3页 / 共7页
点击查看更多>>
资源描述
Chapter 6 Concurrency: Deadlock and Starvation第六章 并发性: 死锁与饥饿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.死锁是指一系列进程在相互竞争系统资源时发生的一种周期性.阶段性的阻塞。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.资源拒绝分配解决死锁问题时,安全状态是指所有进程执行序列可以避免死锁的状态。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 Philosophers 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系统下,一个同步对象可以处于两种状态:信号状态和等待信号状态。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:一组进程相互竞争系统资源导致永久阻塞的情况被称为:( )a. Starvation 饥饿b. Deadlock 死锁c. Prioritization 优先级d. All of the above 以上都是ANS:B2. 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:B3. 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:C4. An example of a consumable resource is the following: 一个可消费资源的例子是 ( )a. Messages 消息b. Printers 打印机c. Main Memory 主存d. All of the above 以上都是5. 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:D6. 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:C7. One approach to deadlock avoidance is called:一个死锁避免方法是 ( )a. Process Termination Denial 进程终止拒绝b. Resource Allocation Denial 资源分配拒绝c. Hold and wait 占有且等待d. None of the above 以上都是ANS:B8. In the Resource Allocation Denial approach to Deadlock Avoidance, a safe state is defined as one in which:在资源分配拒绝算法中,一个安全状态 指的是( )a. At least one potential process sequence does not result in a deadlock至少有一种进程执行序列 可以不导致 死锁。b. All potential process sequences do not result in a deadlock:所有的进程执行序列都不导致 死锁c. Several potential process sequences do not result in a deadlock:几个进程执行序列 可以不导致 死锁d. None of the above以上都不是。ANS:A9. A conservative strategy for dealing with deadlocks that involves limiting access to resources and imposing restrictions on processes is called:通过限制资源分配和限制进程行为的保守的解决死锁问题的方法被称为( )a. Deadlock Prevention 死锁预防b. Deadlock Avoidance 死锁避免c. Deadlock Detection 死锁检测d. None of the above 以上都不是ANS:A10. In deadlocked process recovery, selection criteria for choosing a particular process to abort or rollback includes designating the process with the: 在死锁恢复,选择取消或重复一个特定进程时,应该考虑和指明进程的( )a. Most estimated time remaining 最长剩余执行时间b. Lowest priority 最低优先级c. Least total resources allocated so far 目前占有资源最少d. All of the above 以上都是ANS:D11. One approach to an integrated strategy for dealing with deadlocks involves the implementation of: 一个综合的死锁解决办法是应用( )a. Resource classes 资源分类b. Process rollbacks 进程重新执行c. Virtual memory 实际内存d. None of the above 以上都不是ANS:A12. The Dining Philosophers Problem is a standard test case for evaluating approaches to implementing: 哲学家就餐问题是对于( )的一个评估准则a. Deadlock 死锁b. Starvation 饥饿c. Synchronization 同步d. All of the above 以上都是ANS:C13. A software mechanism that informs a process of the occurrences of a synchronous events in are called: UNIX中用于通知一个进程一个同步事件已发生的 软件机制是( )a. Pipes 管道b. Messages 消息c. Signals 信号量d. All of the above 以上都是ANS:C14. Thread synchronization primitives supported by include: Solaris中线程同步依靠( )a. Mutual exclusion (mutex) locks 互斥锁b. Semaphores 信号c. Condition variables 条件变量d. All of the above 以上都是ANS:D15. The family of synchronization objects implemented by include: W2K系统中 同步对象的执行依靠 ( )的支持a. Mutex objects 互斥对象b. Semaphore objects 信号对象c. Event objects 事件对象d. All of the above 以上都是ANS:DFill-In-The-Blank Questions:( 填空题)1. The permanent blocking of a set of processes that either compete for system resources or communicate with each other is called _. 一组进程相互竞争系统资源导致永久阻塞的情况叫做( )。ANS:deadlock 死锁2. All deadlocks involve conflicting needs for resources by _ or more processes.死锁由( )个或更多进程的资源冲突引起。ANS:two3. A resource that can be created (produced) and destroyed (consumed) is called a _ resource.一个能被创建 和消耗 的资源 被称为( )资源。ANS:consumable 可消费4. An example of a reusable resource is a _.一个可消费资源的例子是 ( )ANS:processor/memory/semaphores/files/etc. 进程/内存/信号/文件 等等5. The _ policy condition, which says a process may hold allocated resources while awaiting assignment of others, must be present for a deadlock to be possible.( )状态 指的是 一个进程占有一分配资源并且等待其他进程的数据,它是死锁的必然条件。ANS:hold and wait占有且等待6. A(n) _ method of deadlock prevention is to prevent the occurrence of one of the three necessary conditions for deadlock. 一个( )的死锁预防方法是预防导致死锁的三个必然条件中的一个。ANS:indirect 间接7. In Deadlock Avoidance, the Resource Allocation Denial strategy is also referred to as the _.在死锁避免的方法中,资源拒绝分配算法也可称为( )。 ANS: bankers algorithm银行家算法8. A(n) _ state is one in which every potential sequence of allocation of resources to processes results in a deadlock.在( )状态下所有可能的进程执行序列都会导致死锁。ANS: unsafe 非安全9. In Deadlock Detection, the O/S periodically performs an algorithm that allows it to detect the _ condition.在死锁检测中,操作系统周期性的执行扫描算法检测( )条件。ANS: circular wait 循环等待10. Once a deadlock has been detected, some strategy is needed for _.一个死锁被检测到后,需要( )算法。ANS: recovery 恢复11. One approach to an integrated strategy for dealing with deadlocks involves the implementation of _.一个综合的死锁解决算法需要用到( )。ANS: resource classes 资源分类 12. The Dining Philosophers Problem illustrates basic problems in _ and _.哲学家就餐问题是( )和( )的基本例子。ANS: deadlock, starvation 死锁 饥饿13. The type of pipe that can be shared by unrelated processes is called a(n) _ pipe.可以被不相关的进程共享的UNIX管道称为( )管道。ANS: named 命名14. The thread synchronization primitive that is used to wait until a particular condition is true is called a _.用于等待一个特定时间的发生的Solaris线程同步原语叫做( )。ANS: condition variable 条件变量15. In a system, the mutex object is used to enforce mutually exclusive access to a _.W2K系统中,互斥对象用于( )的互斥分配。ANS: resource 资源张园超
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 考试试卷


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!