Distributed Systems: Practice Exercises
Distributed Systems: Practice Exercises
Distributed Systems: Practice Exercises
17
CHAPTER
Systems
Practice Exercises
17.1 Why would it be a bad idea for gateways to pass broadcast packets
between networks? What would be the advantages of doing so?
Answer:
All broadcasts would be propagated to all networks, causing a lot of
network traffic. If broadcast traffic were limited to important data (and
very little of it), then broadcast propagation would save gateways from
having to run special software to watch for this data (such as network
routing information) and rebroadcast it.
17.2 Discuss the advantages and disadvantages of caching name transla-
tions for computers located in remote domains.
Answer:
There is a performance advantage to caching name translations for
computers located in remote domains: repeated resolution of the same
name from different computers located in the local domain could be
performed locally without requiring a remote name lookup operation.
The disadvantage is that there could be inconsistencies in the name
translations when updates are made in the mapping of names to IP
addresses. These consistency problems could be solved by invalidating
translations, which would require state to be managed regarding which
computers are caching a certain translation and also would require
a number of invalidation messages, or by using leases whereby the
caching entity invalidates a translation after a certain period of time.
The latter approach requires less state and no invalidation messages
but might suffer from temporary inconsistencies.
17.3 What are the advantages and disadvantages of using circuit switching?
For what kinds of applications is circuit switching a viable strategy?
Answer:
Circuit switching guarantees that the network resources required for a
transfer are reserved before the transmission takes place. This ensures
that packets will not be dropped and their delivery would satisfy
quality of service requirements. The disadvantage of circuit switching
57
58 Chapter 17 Distributed Systems
Answer:
For the same operating system, process migration is relatively straight-
forward, as the state of the process needs to migrate from one processor
to another. This involves moving the address space, state of the CPU
registers, and open files from the source system to the destination.
However, it is important that identical copies of the operating system
are running on the different systems to ensure compatibility. If the
operating system are the same, but perhaps different versions are
running on the separate systems, then migrating processes must be
sure to follow programming guidelines that are consistent between the
different versions of the operating system.
Java applets provide a nice example of process migration between
different operating systems. To hide differences in the underlying
system, the migrated process (i.e., a Java applet) runs on a virtual
machine rather than a specific operating system. All that is required
is for the virtual machine to be running on the system the process
migrates to.
17.6 To build a robust distributed system, you must know what kinds of
failures can occur.