Instituto de Ciências Matemáticas e de Computação. Departamento de Sistemas de Computação. SSC0150- Sistemas Distribuídos 1º Semestre de PDF

Instituto de Ciências Matemáticas e de Computação Departamento de Sistemas de Computação SSC0150- Sistemas Distribuídos 1º Semestre de ª Lista de Exercícios Livro Texto: Distributed Systems Concepts

Please download to get full document.

View again

of 5
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Self Improvement

Publish on:

Views: 60 | Pages: 5

Extension: PDF | Download: 0

Instituto de Ciências Matemáticas e de Computação Departamento de Sistemas de Computação SSC0150- Sistemas Distribuídos 1º Semestre de ª Lista de Exercícios Livro Texto: Distributed Systems Concepts and Design, Colouris, G.; Dollimore, J.; Kindberg, T.; Blair, G.; Fifth Edition, Addison Wesley, Give five types of hardware resource and five types of data or software resource that can usefully be shared. Give examples of their sharing as it occurs in practice in distributed systems. 2. A user arrives at a railway station that they has never visited before, carrying a PDA that is capable of wireless networking. Suggest how the user could be provided with information about the local services and amenities at that station, without entering the station s name or attributes. What technical challenges must be overcome? 3. Compare and contrast cloud computing with more traditional client-server computing? What is novel about cloud computing as a concept? 4. A service is implemented by several servers. Explain why resources might be transferred between them. Would it be satisfactory for clients to multicast all requests to the group of servers as a way of achieving mobility transparency for clients? 5. The host computers used in peer-to-peer systems are often simply desktop computers in users offices or homes. What are the implications of this for the availability and security of any shared data objects that they hold and to what extent can any weaknesses be overcome through the use of replication? 6. List the types of local resource that are vulnerable to an attack by an untrusted program that is downloaded from a remote site and run in a local computer. 7. Give examples of applications where the use of mobile code is beneficial. 8. Consider a simple server that carries out client requests without accessing other servers. Explain why it is generally not possible to set a limit on the time taken by such a server to respond to a client request. What would need to be done to make the server able to execute requests within a bounded time? Is this a practical option? 9. For each of the factors that contribute to the time taken to transmit a message between two processes over a communication channel, state what measures would be needed to set a bound on its contribution to the total time. Why are these measures not provided in current general-purpose distributed systems? 10. The Network Time Protocol service can be used to synchronize computer clocks. Explain why, even with this service, no guaranteed bound is given for the difference between two clocks. 11. Consider two communication services for use in asynchronous distributed systems. In service A, messages may be lost, duplicated or delayed and checksums apply only to headers. In service B, messages may be lost, delayed or delivered too fast for the recipient to handle them, but those that are delivered arrive with the correct contents. Describe the classes of failure exhibited by each service. Classify their failures according to their effects on the properties of validity and integrity. Can service B be described as a reliable communication service? 12. A client sends a 200 byte request message to a service, which produces a response containing 5000 bytes. Estimate the total time required to complete the request in each of the following cases, with the performance assumptions listed below: i) using connectionless (datagram) communication (for example, UDP); ii) using connection-oriented communication (for example, TCP); iii) when the server process is in the same machine as the client. [Latency per packet (local or remote, incurred on both send and receive): 5 ms Connection setup time (TCP only): 5 ms Data transfer rate: 10 Mbps MTU: 1000 bytes Server request processing time: 2 ms Assume that the network is lightly loaded. 13. Can we be sure that no two computers in the Internet have the same IP address? 14. Compare connectionless (UDP) and connection-oriented (TCP) communication for the implementation of each of the following application-level or presentation-level protocols: i) virtual terminal access (for example, Telnet); ii) file transfer (for example, FTP); iii) user location (for example, rwho, finger); iv) information browsing (for example, HTTP); v) remote procedure call. 15. Suggest a scheme that improves on MobileIP for providing access to a web server on a mobile device that is sometimes connected to the Internet by the mobile phone network and at other times has a wired connection to the Internet at one of several locations. 16. Sun XDR marshals data by converting it into a standard big-endian form before transmission. Discuss the advantages and disadvantages of this method when compared with CORBA CDR. 17. Why can t binary data be represented directly in XML, for example, by representing it as Unicode byte values? XML elements can carry strings represented as base64. Discuss the advantages or disadvantages of using this method to represent binary data. 18. As discussed in Section 4.6, MPI offers a number of variants of send including the MPI_Rsend operation, which assumes the receiver is ready to receive at the time of sending. What optimizations in implementation are possible if this assumption is correct and what are the repercussions of this assumption being false? 19. Describe the ways in which the request-reply protocol masks the heterogeneity of operating systems and of computer networks. 20. Discuss whether the following operations are idempotent: i) pressing a lift (elevator) request button; ii) writing data to a file; iii) appending data to a file. Is it a necessary condition for idempotence that the operation should not be associated with any state? 21. An Election interface provides two remote methods: vote: This method has two parameters through which the client supplies the name of a candidate (a string) and the voter s number (an integer used to ensure each user votes once only). The voter s numbers are allocated sparsely from the range of integers to make them hard to guess. result: This method has two parameters through which the server supplies the client with the name of a candidate and the number of votes for that candidate. Which of the parameters of these two procedures are input and which are output parameters? 22. Discuss the invocation semantics that can be achieved when the request-reply protocol is implemented over a TCP/IP connection, which guarantees that data is delivered in the order sent, without loss or duplication. Take into account all of the conditions causing a connection to be broken. 23. Define the interface to the Election service in CORBA IDL and Java RMI. Note that CORBA IDL provides the type long for 32-bit integers. Compare the methods in the two languages for specifying input and output arguments. 24. A request-reply protocol is implemented over a communication service with omission failures to provide at-least-once invocation semantics. In the first case the implementor assumes an asynchronous distributed system. In the second case the implementor assumes that the maximum time for the communication and the execution of a remote method is T. In what way does the latter assumption simplify the implementation? 25. A client makes remote method invocations to a server. The client takes 5 milliseconds to compute the arguments for each request, and the server takes 10 milliseconds to process each request. The local operating system processing time for each send or receive operation is 0.5 milliseconds, and the network time to transmit each request or reply message is 3 milliseconds. Marshalling or unmarshalling takes 0.5 milliseconds per message. Calculate the time taken by the client to generate and return from two requests: (i) if it is single-threaded; (ii) if it has two threads that can make requests concurrently on a single processor. You can ignore context-switching times. Is there a need for asynchronous invocation if the client and server processes are threaded? 26. As a second example, consider the communication paradigm referred to as queued RPC, as introduced in Rover [Joseph et al. 1997]. Rover is a toolkit to support distributed systems programming in mobile environments where participants in communication may become disconnected for periods of time. The system offers the RPC paradigm and hence calls are directed towards a given server (clearly space-coupled). The calls, though, are routed through an intermediary, a queue at the sending side, and are maintained in the queue until the receiver is available. To what extent is this timeuncoupled? Hint: consider the almost philosophical question of whether a recipient that is temporarily unavailable exists at that point in time. 27. If a communication paradigm is asynchronous, is it also time-uncoupled? Explain your answer with examples as appropriate. 28. In the context of a group communication service, provide example message exchanges that illustrate the difference between causal and total ordering. 29. Suggest a design for a notification mailbox service that is intended to store notifications on behalf of multiple subscribers, allowing subscribers to specify when they require notifications to be delivered. Explain how subscribers that are not always active can make use of the service you describe. How will the service deal with subscribers that crash while they have delivery turned on? 30. In publish-subscribe systems, explain how channel-based approaches can trivially be implemented using a group communication service? Why is this a less optimal strategy for implementing a content-based approach? 31. Explain in which respects DSM is suitable or unsuitable for client-server systems. 32. Assuming a DSM system is implemented in middleware without any hardware support and in a platform-neutral manner, how would you deal with the problem of differing data representations on heterogeneous computers? Does your solution extend to pointers? 33. How would you implement the equivalent of a remote procedure call using a tuple space? What are the advantages and disadvantages of implementing a remote procedure call style interaction in this way? 34. Discuss the tasks of encapsulation, concurrent processing, protection, name resolution, communication of parameters and results, and scheduling in the context of the UNIX file service (or that of another kernel that is familiar to you). 35. Smith decides that every thread in his processes ought to have its own protected stack all other regions in a process would be fully shared. Does this make sense? 36. Should signal (software interrupt) handlers belong to a process or to a thread? 37. Suggest a scheme for balancing the load on a set of computers. You should discuss: i) what user or system requirements are met by such a scheme; ii) to what categories of applications it is suited; iii) how to measure load and with what accuracy; iv) how to monitor load and choose the location for a new process. Assume that processes may not be migrated. How would your design be affected if processes could be migrated between computers? Would you expect process migration to have a significant cost? 38. Explain the advantage of copy-on-write region copying for UNIX, where a call to fork is typically followed by a call to exec. What should happen if a region that has been copied using copy-onwrite is itself copied? 39. A file server uses caching and achieves a hit rate of 80%. File operations in the server cost 5 ms of CPU time when the server finds the requested block in the cache, and an additional 15 ms of disk I/O time otherwise. Explaining any assumptions you make, estimate the server s throughput capacity (average requests/sec) if it is: i) single-threaded; ii) two-threaded, running on a single processor; iii) two-threaded, running on a two-processor computer. 40. A client makes RMIs to a server. The client takes 5 ms to compute the arguments for each request, and the server takes 10 ms to process each request. The local OS processing time for each send or receive operation is 0.5 ms, and the network time to transmit each request or reply message is 3 ms. Marshalling or unmarshalling takes 0.5 ms per message. Estimate the time taken by the client to generate and return from two requests (i) if it is single-threaded, and (ii) if it has two threads that can make requests concurrently on a single processor. Is there a need for asynchronous RMI if processes are multi-threaded? 41. The Task Bag is an object that stores (key, value) pairs. A key is a string and a value is a sequence of bytes. Its interface provides the following remote methods: pairout, with two parameters through which the client specifies a key and a value to be stored. pairin, whose first parameter allows the client to specify the key of a pair to be removed from the Task Bag. The value in the pair is supplied to the client via a second parameter. If no matching pair is available, an exception is thrown. readpair, which is the same as pairin except that the pair remains in the Task Bag. Use CORBA IDL to define the interface of the Task Bag. Define an exception that can be thrown whenever any one of the operations cannot be carried out. Your exception should return an integer indicating the problem number and a string describing the problem. The Task Bag interface should define a single attribute giving the number of tasks in the bag.the Task Bag is intended to be used by cooperating clients, some of which add pairs (describing tasks) and others of which remove them (and carry out the tasks described). When a client is informed that no matching pair is available, it cannot continue with its work until a pair becomes available. Define an appropriate callback interface for use in this situation. 42. Use the Java IDL compiler to process the interface you defined in Exercise 8.1. Inspect the definition of the signatures for the methods pairin and readpair in the generated Java equivalent of the IDL interface. Look also at the generated definition of the holder method for the value argument for the methods pairin and readpair. Now give an example showing how the client will invoke the pairin method, explaining how it will acquire the value returned via the second argument. 43. To what extent may CORBA objects be migrated from one server to another?
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks