Chapter 7 Fundamentals of Distributed Systems

EXERCISES

7-1 What does a model of a distributed system tell you about? What does the architecture of a distributed system define and what issues are addressed when a system is to be engineered? Into which category, model, architecture or engineering, would you place the following statement:

Bookwork: briefly, model = objects and communication modes in abstract terms; architecture = system components such as clients, application and system services, protocols, location of system services in or above middleware platform; engineering = how to build the system in a practical context.

a) The distributed system comprises distributed objects
model

b) Name-to-location mapping is carried out by means of a name service
architecture

c) Name servers are replicated for high availability.
engineering

d) Objects may be made persistent and stored in persistent storage.
Has aspects of model, architecture and engineering

e) Objects are invoked transparently of whether they are local or remote.
engineering

7-2 Criticise the following assertion: ?If every communication is given a timestamp on being sent then all events in the distributed system can be ordered.?

Timestamps could be used to achieve a logical ordering in restricted circumstances, e.g. to decide which clients should be allocated the available tickets for some event. A tie-breaker is needed for equal timestamps e.g. host IP address.
In general the clocks at the compnents of a distributed system are not, and cannot be, perfectly synchronised. Certain fundamental properties must be enforced such as ?a message is received AFTER it is sent?, and clocks must be adjusted to obey this.
If it is important that events should be ordered with respect to their real-time of occurrence rather than by an arbitrary logical order, there are certain timestamps for which we ?can?t say? which occurred first.
The best we can do is assign interval timestamps, where the intervals are component-specific and depend on local properties such as estimated time to receive a UTC signal from source through communications and operating systems software.

7-3 Why can it not be assumed that distributed system state will converge after any possible communication delay time has elapsed?

Communications delays vary and items will arrive at different components in different orders. The required convergence of state must be defined (total order? causal order?). The overhead to achieve consistent state is high.

7-4 How does the fact that components of a distributed computation can fail independently of each other affect the way they are programmed. Why does this issue not arise in a centralised implementation?

In a centralised implementation everything crashes together. In a distributed system there is inherent uncertainty: we cannot know whether a component has crashed or just the connection to it. We use protocols and may specify whether we require reliable or best effort service.
Some applications need to know whether no communication from a given source means there is nothing to send or the source or connection are dead. In such circumstances a heartbeat protocol (with the heartbeat rate tuned to application requirements) can be used between source and sink.

7-5 What is meant by logical time in a distributed system? If logical time achieves event ordering can it be used without reference to physical time?

See question 7.2 above. It can be used but it must be acknowledged that the physical order in which events occurred may not be honoured by the logical order. And for some events it is not possible to know the physical order.

7-6 What is the average value of a typical computer?s clock drift? What is the accuracy that can be achieved by using NTP (Network Time Protocol).? How would you estimate a value for the time at a computer with a UTC receiver? How would you estimate a value for the time at a computer interacting with a time-server with a UTC receiver?

See 7.6.1, typically 1/10**6 (1 second in 11 days). NTP - a few tens of milliseconds. Is the UTC sigal delivered by radio (10ms) or satellite (0.1 - 1ms)? Add the local OS delay for interrupt service to read the value to set the clock. For a component which does not receive a UTC signal directly add the network communication delay from the time server and the local OS overhead on receipt.

7-7 How can unique names be defined for a distributed system or application? What is meant by pure and impure names? Why is the DNS namespace hard to change? What queries and responses does DNS support?

By using a hierarchy or a (sufficiently long) bit-pattern. A pure name implies no context. An impure name requires a resolution context. DNS is hierarchical, making any change invalidate existing pathnames - the higher the change in the hierarchy, the more names are invalidated.

7-8 If an IP address is bound to a computer, what difficulties do you foresee for a world with large numbers of mobile computers?

IP addresses are allocated to domains and assigned within them. If a device is moved outside a domain (e.g outside a firewall) it may not be able to operate in its new domain nor be allowed access within its original domain. These issues are being addressed by mobile IP?