《操作系统操作精髓与设计原理习题解答》由会员分享,可在线阅读,更多相关《操作系统操作精髓与设计原理习题解答(84页珍藏版)》请在金锄头文库上搜索。
1、SOLUTIONS MANUALOPERATING SYSTEMS: INTERNALS AND DESIGN PRINCIPLES FIFTH EDITIONWILLIAM STALLINGSCopyright 2004: William Stallings课后答案网 w w w .k h d a w .c o m-2- 2004 by William StallingsAll rights reserved. No part of this document may be reproduced, in any form or by any means, or posted on the I
2、nternet, without permission in writing from the author.课后答案网 w w w .k h d a w .c o m-3-NOTICEThis manual contains solutions to all of the review questions and homework problems in Operating Systems, Fifth Edition. If you spot an error in a solution or in the wording of a problem, I would greatly app
3、reciate it if you would forward the information via email to me at . An errata sheet for this manual, if needed, is available at ftp:/ w w w .k h d a w .c o m-4-TABLE OF CONTENTSChapter 1:Computer System Overview.5 Chapter 2:Operating System Overview.11 Chapter 3:Process Description and Control.14 C
4、hapter 4:Threads, SMP, and Microkernels.18 Chapter 5:Concurrency: Mutual Exclusion and Synchronization.21 Chapter 6:Concurrency: Deadlock and Starvation.30 Chapter 7:Memory Management.38 Chapter 8:Virtual Memory.43 Chapter 9:Uniprocessor Scheduling.51 Chapter 10:Multiprocessor and Real-Time Scheduli
5、ng.62 Chapter 11:I/O Management and Disk Scheduling.65 Chapter 12:File Management.71 Chapter 13:Networking.74 Chapter 14:Distributed Processing, Client/Server, and Clusters.76 Chapter 15:Distributed Process Management.79 Chapter 16:Security.82课后答案网 w w w .k h d a w .c o m-5-A A ANSWERS TO NSWERS TO
6、NSWERS TO QQ QUESTIONSUESTIONSUESTIONS1.1 A main memory, which stores both data and instructions: an arithmetic and logic unit (ALU) capable of operating on binary data; a control unit, which interprets the instructions in memory and causes them to be executed; and input and output (I/O) equipment o
7、perated by the control unit.1.2 User-visible registers: Enable the machine- or assembly-language programmer to minimize main memory references by optimizing register use. For high-level languages, an optimizing compiler will attempt to make intelligent choices of which variables to assign to registe
8、rs and which to main memory locations. Some high- level languages, such as C, allow the programmer to suggest to the compiler which variables should be held in registers. Control and status registers: Used by the processor to control the operation of the processor and by privileged, operating system
9、 routines to control the execution of programs.1.3 These actions fall into four categories: Processor-memory: Data may be transferred from processor to memory or from memory to processor. Processor-I/O: Data may be transferred to or from a peripheral device by transferring between the processor and
10、an I/O module. Data processing: The processor may perform some arithmetic or logic operation on data. Control: An instruction may specify that the sequence of execution be altered.1.4 An interrupt is a mechanism by which other modules (I/O, memory) may interrupt the normal sequencing of the processo
11、r.1.5 Two approaches can be taken to dealing with multiple interrupts. The first is to disable interrupts while an interrupt is being processed. A second approach is to define priorities for interrupts and to allow an interrupt of higher priority to cause a lower-priority interrupt handler to be int
12、errupted.1.6 The three key characteristics of memory are cost, capacity, and access time.1.7 Cache memory is a memory that is smaller and faster than main memory and that is interposed between the processor and main memory. The cache acts as a buffer for recently used memory locations.1.8 Programmed
13、 I/O: The processor issues an I/O command, on behalf of a process, to an I/O module; that process then busy-waits for the operation to be completed before proceeding. Interrupt-driven I/O: The processor issues an I/O command on behalf of a process, continues to execute subsequent instructions, and is interrupt