1、分布式操作系统第二版答案SYSTEMSPRINCIPLES AND PARADIGMSSECOND EDITIONPROBLEM SOLUTIONSANDREW S. TANENBAUMMAARTEN VAN STEENVrije UniversiteitAmsterdam, The NetherlandsPRENTICE HALLUPPER SADDLE RIVER, NJ 07458SOLUTIONS TO CHAPTER 1 PROBLEMS1. Q: An alternative de.nition for a distributed system is that of a colle
2、ction ofindependent computers providing the view of being a single system, that is, itis completely hidden from users that there even multiple computers. Give anexample where this view would come in very handy.A: What immediately comes to mind is parallel computing. If one coulddesign programs that
3、run without any serious modi.cations on distributed systemsthat appear to be the same as nondistributed systems, life would be somuch easier. Achieving a single-system view is by now considered virtuallyimpossible when performance is in play.2. Q: What is the role of middleware in a distributed syst
4、em?A: To enhance the distribution transparency that is missing in network operatingsystems. In other words, middleware aims at improving the single-systemview that a distributed system should have.3. Q: Many networked systems are organized in terms of a back of.ce and afront of.ce. How does organiza
5、tions match with the coherent view we demandfor a distributed system?A: A mistake easily made is to assume that a distributed system as operatingin an organization, should be spread across the entire organization. In practice,we see distributed systems being installed along the way that an organizat
6、ionis split up. In this sense, we could have a distributed system supporting backof.ce procedures and processes, as well as a separate front-of.ce system. Ofcourse, the two may be coupled, but there is no reason for letting this couplingbe fully transparent.4. Q: Explain what is meant by (distributi
7、on) transparency, and give examples ofdifferent types of transparency.A: Distribution transparency is the phenomenon by which distribution aspectsin a system are hidden from users and applications. Examples include accesstransparency, location transparency, migration transparency, relocation transpa
8、rency,replication transparency, concurrency transparency, failure transparency,and persistence transparency.5. Q: Why is it sometimes so hard to hide the occurrence and recovery from failuresin a distributed system?A: It is generally impossible to detect whether a server is actually down, orthat it
9、is simply slow in responding. Consequently, a system may have toreport that a service is not available, although, in fact, the server is just slow.2 PROBLEM SOLUTIONS FOR CHAPTER 16. Q: Why is it not always a good idea to aim at implementing the highest degreeof transparency possible?A: Aiming at th
10、e highest degree of transparency may lead to a considerableloss of performance that users are not willing to accept.7. Q: What is an open distributed system and what bene.ts does openness provide?A: An open distributed system offers services according to clearly de.nedrules. An open system is capabl
11、e of easily interoperating with other open systemsbut also allows applications to be easily ported between different implementationsof the same system.8. Q: Describe precisely what is meant by a scalable system.A: A system is scalable with respect to either its number of components, geographicalsize
12、, or number and size of administrative domains, if it can grow inone or more of these dimensions without an unacceptable loss of performance.9. Q: Scalability can be achieved by applying different techniques. What arethese techniques?A: Scaling can be achieved through distribution, replication, and
13、caching.10. Q: Explain what is meant by a virtual organization and give a hint on howsuch organizations could be implemented.A: A virtual organization (VO) de.nes a group of users/applications that haveaccess to a speci.ed group of resources, which may be distributed across manydifferent computers,
14、owned by many different organizations. In effect, a VOde.nes who has access to what. This also suggests that the resources shouldkeep an account of foreign users along with their access rights. This can oftenbe done using standard access control mechanisms (like the rwx bits in UNIX),although foreig
15、n users may need to have a special account. The latter complicatesmatters considerably.11. Q: When a transaction is aborted, we have said that the world is restored to itsprevious state, as though the transaction had never happened. We lied. Give anexample where resetting the world is impossible.A:
16、Any situation in which physical I/O has occurred cannot be reset. Forexample, if the process has printed some output, the ink cannot be removedfrom the paper. Also, in a system that controls any kind of industrial process, itis usually impossible to undo work that has been done.12. Q: Executing nest
17、ed transactions requires some form of coordination. Explainwhat a coordinator should actually do.A: A coordinator need simply ensure that if one of the nested transactionsaborts, that all other subtransactions abort as well. Likewise, it shouldPROBLEM SOLUTIONS FOR CHAPTER 1 3coordinate that all of
18、them commit when each of them can. To this end, anested transaction should wait to commit until it is told to do so by the coordinator.13. Q: We argued that distribution transparancy may not be in place for pervasicesystems. This statement is not true for all types of transparencies. Give anexample.
19、A: Think of migration transparency. In mnay pervasive systems, componentsare mobile and will need to re-establish connections when moving from oneaccess point to another. Preferably, such handovers should be completelytransparent to the user. Likewise, it can be argued that many other types oftransp
20、arencies should be supported as well. However, what should not be hiddenis a user is possibly accessing resources that are directly coupled to theusers current environment.14. Q: We already gave some examples of distributed pervasive systems: homesystems, electronic health-care systems, and sensor n
21、etworks. Extend this listwith more examples.A: There are quite a few other examples of pervasive systems. Think of largescalewireless mesh networks in cities or neighborhoods that provide servicessuch as Internet access, but also form the basis for other services like a newssystem. There are systems
22、 for habitat monitoring (as in wildlife resorts), electronicjails by which offenders are continuously monitored, large-scale integratedsports systems, of.ce systems deploying active badges to know aboutthe whereabouts of their employees, and so on.15. Q: Sketch a design for a home system consisting
23、of a separate media serverthat will allow for the attachment of a wireless client. The latter is connectedto (analog) audio/video equipment and transforms the digital media streams toanalog output. The server runs on a separate machine, possibly connected tothe Internet, but has no keyboard and/or m
24、onitor connected.SOLUTIONS TO CHAPTER 2 PROBLEMS1. Q: If a client and a server are placed far apart, we may see network latencydominating overall performance. How can we tackle this problem?A: It really depends on how the client is organized. It may be possible todivide the client-side code into sma
25、ller parts that can run separately. In thatcase, when one part is waiting for the server to respond, we can scheduleanother part. Alternatively, we may be able to rearrange the client so that it cando other work after having sent a request to the server. This last solution effectivelyreplaces the sy
26、nchronous client-server communication with asynchronousone-way communication.4 PROBLEM SOLUTIONS FOR CHAPTER 22. Q: What is a three-tiered client-server architecture?A: A three-tiered client-server architecture consists of three logical layers,where each layer is, in principle, implemented at a sepa
27、rate machine. Thehighest layer consists of a client user interface, the middle layer contains theactual application, and the lowest layer implements the data that are beingused.3. Q: What is the difference between a vertical distribution and a horizontal distribution?A: Vertical distribution refers
28、to the distribution of the different layers in amultitiered architectures across multiple machines. In principle, each layer isimplemented on a different machine. Horizontal distribution deals with thedistribution of a single layer across multiple machines, such as distributing asingle database.4. Q
29、: Consider a chain of processes P1, P2, ., Pn implementing a multitieredclient-server architecture. Process Pi is client of process Pi+1, and Pi willreturn a reply to Pi-1 only after receiving a reply from Pi+1. What are the mainproblems with this organization when taking a look at the request-reply
30、 performanceat process P1?A: Performance can be expected to be bad for large n. The problem is thateach communication between two successive layers is, in principle, betweentwo different machines. Consequently, the performance between P1 and P2may also be determined by n - 2 request-reply interactio
31、ns between the otherlayers. Another problem is that if one machine in the chain performs badly oris even temporarily unreachable, then this will immediately degrade the performanceat the highest level.5. Q: In a structured overlay network, messages are routed according to thetopology of the overlay.
32、 What is an important disadvantage of this approach?A: The problem is that we are dealing only with logical paths. It may verywell be the case that two nodes A and B which are neighbors in the overlaynetwork are physically placed far apart. As a consequence, the logically shortpath between A and B may require routing a message along a very long pathin the underlying physical network.6
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1