操作系统概念课后答案 下载本文

内容发布更新时间 : 2024/10/28 11:34:06星期一 下面是文章的全部内容请认真阅读。

操作系统概念课后答案

【篇一:操作系统概念第七版答案(含编程代码)】

> chapter 1

1.1 in a multiprogramming and time-sharing environment, several users share the system simultaneously. this situation can result in various security problems. a. what are two such problems?

b. can we ensure the same degree of security in a time-shared machine as in a dedicated machine? explain your answer. answer:

a. stealing or copying one’s programs or data; using system resources (cpu, memory, disk space, peripherals) without proper accounting.

b. probably not, since any protection scheme devised by humans can inevitably be broken by a human, and the more complex the scheme, the more difficult it is to feel confident of its correct implementation.

1.2 the issue of resource utilization shows up in different forms in different types of operating systems. list what resources must be managed

carefully in the following settings: a. mainframe or

minicomputer systems b. workstations connected to serversc. handheld computers answer:

a. mainframes:memory and cpu resources, storage, network bandwidth.

b. workstations: memory and cpu resouces

c. handheld computers: power consumption, memory resources.

1.3 under what circumstances would a user be better off using a timesharing system rather than a pc or single-user workstation?

answer: when there are few other users, the task is large, and the hardware is fast, time-sharingmakes sense. the full power of the system can be brought to bear on the user’s problem. the problemcan be solved faster than on a personal computer. another case occurs when lots of other users need resources at the same time.

a personal computer is best when the job is small enough to be executed reasonably on it and when performance is sufficient to execute the program to the user’s satisfaction. 1.4 which of the functionalities listed below need to be supported by the operating system for the following two settings: (a) handheld devices and (b) real-time systems. a. batch programmingb. virtual memoryc. time sharing

answer: for real-time systems, the operating system needs to support virtual memory

and time sharing in a fair manner. for handheld systems,the operating system needs to provide virtual memory, but does not need to provide time-sharing. batch programming is not necessary in both settings.

1.5 describe the differences between symmetric and

asymmetric multiprocessing.what are three advantages and one disadvantage of multiprocessor systems?

answer: symmetric multiprocessing treats all processors as equals, and i/o can be processed on any cpu. asymmetric multiprocessing has one master cpu and the remainder cpus are slaves. the master distributes tasks among the slaves, and i/o is usually done by the master only.

multiprocessors can save money by not duplicating power supplies,housings, and peripherals. they can execute

programs more quickly and can have increased reliability. they are also more complex in both hardware and software than uniprocessor systems.

1.6 how do clustered systems differ from multiprocessor systems? what is required for two machines belonging to a cluster to cooperate to provide a highly available service? answer: clustered systems are typically constructed by

combining multiple computers into a single system to perform a computational task distributed across the cluster.

multiprocessor systems on the other hand could be a single physical entity comprising of multiple cpus. a clustered system is less tightly coupled than a multiprocessor

system.clustered systems communicate using messages, while processors in a multiprocessor system could communicate using shared memory.

in order for twomachines to provide a highly available service, the state on the two machines should be replicated and should

be consistently updated. when one of the machines fail, the other could then take-over the functionality of the failed machine.

1.7 distinguish between the client-server and peer-to-peer models of distributed systems.

answer: the client-server model firmly distinguishes the roles of the client and server. under this model, the client requests services that are provided by the server. the peer-to-peer model doesn’t have such strict roles. in fact, all nodes in the system are considered peers and thus may act as either clients or servers - or both. a node may request a service from

another peer, or the node may in fact provide such a service to other peers in the system.

for example, let’s consider a system of nodes that share

cooking recipes.under the client-server model, all recipes are stored with the server. if a client wishes to access a recipe, it must request the recipe from the specified server. using the peer-to-peer model, a peer node could ask other peer nodes for the specified recipe.

the node (or perhaps nodes) with the requested recipe could provide it to the requesting node. notice how each peer may act as both a client (i.e. it may request recipes) and as a server (it may provide recipes.)

1.8 consider a computing cluster consisting of twonodes running adatabase.describe two ways in which the cluster software can manage access to the data on the disk. discuss the benefits and disadvantages of each.

answer: consider the following two alternatives: asymmetric clustering and parallel clustering. with asymmetric clustering, one host runs the database application with the other host simply monitoring it. if the server fails, the monitoring host becomes the active server. this is appropriate for providing redundancy. however, it does not utilize the potential

processing power of both hosts. with parallel clustering, the database application can run in parallel on both hosts. the difficulty implementing parallel clusters is providing some form of distributed locking mechanism for files on the shared disk.