操作系统精髓与设计原理第五版 课后题答案.doc
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《操作系统精髓与设计原理第五版 课后题答案.doc》由会员分享,可在线阅读,更多相关《操作系统精髓与设计原理第五版 课后题答案.doc(14页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、【精品文档】如有侵权,请联系网站删除,仅供学习与交流操作系统精髓与设计原理第五版 课后题答案.精品文档.Chapter 2Operating System OverviewReview Questions2.1Convenience: An operating system makes a computer more convenient to use. Efficiency: An operating system allows the computer system resources to be used in an efficient manner. Ability to evolve
2、: An operating system should be constructed in such a way as to permit the effective development, testing, and introduction of new system functions without interfering with service.2.5The execution context, or process state, is the internal data by which the operating system is able to supervise and
3、 control the process. This internal information is separated from the process, because the operating system has information not permitted to the process. The context includes all of the information that the operating system needs to manage the process and that the processor needs to execute the proc
4、ess properly. The context includes the contents of the various processor registers, such as the program counter and data registers. It also includes information of use to the operating system, such as the priority of the process and whether the process is waiting for the completion of a particular I
5、/O event.Problems2.1The answers are the same for (a) and (b). Assume that although processor operations cannot overlap, I/O operations can.1 Job:TAT=NTProcessor utilization=50%2 Jobs:TAT=NTProcessor utilization=100%4 Jobs:TAT=(2N 1)NTProcessor utilization=100%2.4A system call is used by an applicati
6、on program to invoke a function provided by the operating system. Typically, the system call results in transfer to a system program that runs in kernel mode.Chapter 3Process Description and ControlReview Questions3.5Swapping involves moving part or all of a process from main memory to disk. When no
7、ne of the processes in main memory is in the Ready state, the operating system swaps one of the blocked processes out onto disk into a suspend queue, so that another process may be brought into main memory to execute.3.10The user mode has restrictions on the instructions that can be executed and the
8、 memory areas that can be accessed. This is to protect the operating system from damage or alteration. In kernel mode, the operating system does not have these restrictions, so that it can perform its tasks.Problems3.1Creation and deletion of both user and system processes. The processes in the syst
9、em can execute concurrently for information sharing, computation speedup, modularity, and convenience. Concurrent execution requires a mechanism for process creation and deletion. The required resources are given to the process when it is created, or allocated to it while it is running. When the pro
10、cess terminates, the OS needs to reclaim any reusable resources.Suspension and resumption of processes. In process scheduling, the OS needs to change the processs state to waiting or ready state when it is waiting for some resources. When the required resources are available, OS needs to change its
11、state to running state to resume its execution.Provision of mechanism for process synchronization. Cooperating processes may share data. Concurrent access to shared data may result in data inconsistency. OS has to provide mechanisms for processes synchronization to ensure the orderly execution of co
12、operating processes, so that data consistency is maintained.Provision of mechanism for process communication. The processes executing under the OS may be either independent processes or cooperating processes. Cooperating processes must have the means to communicate with each other.Provision of mecha
13、nisms for deadlock handling. In a multiprogramming environment, several processes may compete for a finite number of resources. If a deadlock occurs, all waiting processes will never change their waiting state to running state again, resources are wasted and jobs will never be completed.3.3 Figure 9
14、.3 shows the result for a single blocked queue. The figure readily generalizes to multiple blocked queues.Chapter 4Process Description and ControlReview Questions4.2Less state information is involved.4.5Address space, file resources, execution privileges are examples.4.61. Thread switching does not
15、require kernel mode privileges because all of the thread management data structures are within the user address space of a single process. Therefore, the process does not switch to the kernel mode to do thread management. This saves the overhead of two mode switches (user to kernel; kernel back to u
16、ser). 2. Scheduling can be application specific. One application may benefit most from a simple round-robin scheduling algorithm, while another might benefit from a priority-based scheduling algorithm. The scheduling algorithm can be tailored to the application without disturbing the underlying OS s
17、cheduler. 3. ULTs can run on any operating system. No changes are required to the underlying kernel to support ULTs. The threads library is a set of application-level utilities shared by all applications.4.71. In a typical operating system, many system calls are blocking. Thus, when a ULT executes a
18、 system call, not only is that thread blocked, but also all of the threads within the process are blocked. 2. In a pure ULT strategy, a multithreaded application cannot take advantage of multiprocessing. A kernel assigns one process to only one processor at a time. Therefore, only a single thread wi
19、thin a process can execute at a time. Problems4.2 Because, with ULTs, the thread structure of a process is not visible to the operating system, which only schedules on the basis of processes.Chapter 5Concurrency: Mutual Exclusion and SynchronizationReview Questions5.1Communication among processes, s
20、haring of and competing for resources, synchronization of the activities of multiple processes, and allocation of processor time to processes.5.9A binary semaphore may only take on the values 0 and 1. A general semaphore may take on any integer value.Problems5.2ABCDE; ABDCE; ABDEC; ADBCE; ADBEC; ADE
21、BC;DEABC; DAEBC; DABEC; DABCE5.5 Consider the case in which turn equals 0 and P(1) sets blocked1 to true and then finds blocked0 set to false. P(0) will then set blocked0 to true, find turn = 0, and enter its critical section. P(1) will then assign 1 to turn and will also enter its critical section.
22、Chapter 6Concurrency: Deadlock and StarvationReview Questions6.2Mutual exclusion. Only one process may use a resource at a time. Hold and wait. A process may hold allocated resources while awaiting assignment of others. No preemption. No resource can be forcibly removed from a process holding it.6.3
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 操作系统精髓与设计原理第五版 课后题答案 操作系统 精髓 设计 原理 第五 课后 答案
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内