Exercises
Exercises
Exercises
A- Introduction (Group 4, 8)
DSP.Chapter 1 -> G4
4. Explain what is meant by (distribution) transparency, and give examples of different types of
transparency.
In a distributed systems there are some features of the system which are hidden from the
users this is called transparency. The end users are not aware of certain mechanisms which
do not appear on the distributed applications because transparency confines it in the layer
below the one user interacts with. The distributed transparency gives the idea to the user
that they are using a single system even though it’s spread across collection of devices.
Access transparency is where a user is accessing a remote resource but the users
get the idea that they accessing data locally. Also access transparency allows you
to access local and remote resource by using identical operations.
Location transparency the users are able access any resource without knowing the
exact physical location of that resource. The location of the resources in the
distributed system would well spread across a vast area but it is not shown the
user and in some cases not shown to the programmers as well.
Both these access transparency and location transparency combined forms network
transparency.
Concurrency transparency is when even though there are multiple processes are
able to simultaneously operate with local and remote resource without
interference between each other. So the basic idea is that distributed applications
where many users are active at the same time they are able to access same
resources at the same time without interference.
Replication transparency is when in a distributed application there is a certain
resource which needs to be accessed by many users at the same time for several
times. To overcome this issue the distributed application has several replicas of the
resources which are more frequently used. These replicas are created so that it
increases the reliability and performance. But as for the concept of transparency
here again the users are certainly not aware that they are using a replica of the
original resource.
Failure transparency is when there are faults or errors in the distributed
applications but it is being hidden from the users. It allows the users to complete
their tasks despite the faults in software or hardware.
Scaling transparency allows the distributed application to expand without affecting
any of the application algorithms. The application should have the ability of
horizontal and vertical expandability. Also it should also be able to adapt to
different instances such scaling down to fit into clients requirements.
6.Why is it not always a good idea to aim at implementing the highest degree of transparency
possible?
Aiming at the highest degree of transparency may lead to a considerable loss of performance
that users are not willing to accept.
7.What is an open distributed system and what benefits does openness provide?
An open distributed system offers services according to clearly defined rules. An open system is
capable of easily interoperating with other open systems but also allows applications to be
easily ported between different implementations of the same system.
A system is scalable with respect to either its number of components, geographical size, or
number and size of administrative domains, if it can grow in one or more of these dimensions
without an unacceptable loss of performance.
DSC.Chapter 1 -> G8
1.1 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.
Sol) Types of hardware resources
CPU
Memory
Disk
Screen
Network
CPU: -most servers, such as filer servers, do some computation for their clients; hence their CPU
is a shared resource.
Memory: - cache server (holds recently-accessed web pages in its RAM, for faster access byother
local computers.)
Disk: - file server, virtual disk server, video on demand server etc...
Screen: -screen network window systems X Windows allow processes in remote computers to
update the content of the local windows
Network: -packet transmission enables many simultaneous communication channels (stream of
data) to be transmitted on the same circuits.
Types of Software Resources
o Web page
o Database
o Object
o File
o Exclusive lock
Web page: - web servers enable multiple clients to share read-only page content (usually stored in
a file, but sometimes generated on-the-fly.)
Database: - databases are intended to record the definitive state of some related sets of data. They
have beenshared ever since multi-user computers appeared. They include techniques to manage
concurrent updates.
Object: - possibilities for software objects are limitless. E.g. shared whiteboard, shared diary, room
Booking system, etc.
File:- file servers enable multiple clients to have read/write access to the same files
Exclusive lock:- A system-level object provided by a lock server, enabling several clients to
coordinate their use of resource (such as printer that does not include a queuing scheme.)
1.2 Consider the implementation strategies for massively multiplayer online games as discussed
in Section 1.2.2. In particular, what advantages do you see in adopting a single server
approach for representing the state of the multiplayer game? What problems can you
identify and how might they be resolved?
Implementation of an underlying game system architecture that best achieves low latency during
periods of high usage.A number of decisions need to be made in order to find the best methods
and structure to achieve the goal. No need for a central server: this makes it much cheaper, and
more viable for low-budget indie games. Scales very well(up to a certain point when the average
client just can’t handle the bandwidth).
In the traditional client server, the server must be configured and managed, could be in the
application server or the client; the client must know where the application data should be stored.
While the cloud eliminates the hassles of managing servers, clients simply have to connect to the
cloud via the Internet; the cloud will be managing his own where he will store applications and
data, making backups, and others
MMOGs can enable players to cooperate and compete with each other on a large scale, and
sometimes to interact meaningfully with people around the world. They include a variety of
gameplay types, representing many video game genres
There are two types of MMO games. There are real-time games that have interaction like
Battle Battalions and Victory command, and there are games that do not require high interaction
between the user and the nature turn and wait like Pirates of the Burning Sea, Clash of Clans. Two
game genresrequire two different architectures.
For games like Farmville standard architecture of the server is sufficient, because the gameplay is
personal to each user does not need to be real-time interaction between users directly so low that
bandwidth capacity is not too inedible.
1.5 Compare and contrast cloud computing with more traditional client-server computing? What
is novel about cloud computing as a concept?
Hardware: CPU: compute server (executes processor-intensive applications for clients), remote
object server (executes methods on behalf of clients), worm program (shares cpu capacity of
desktop machine with the local user). Most other servers, such as file servers, do some
computation for their clients, hence their cpu is a shared resource. memory: cache server (holds
recently-accessed web pages in its RAM, for faster access by other local computers) disk: file
server, virtual disk server (see Chapter 8), video on demand server (see Chapter 15). screen:
Network window systems, such as X-11, allow processes in remote computers to update the
content of windows. printer: networked printers accept print jobs from many computers.
managing them with a queuing system. network capacity: packet transmission enables many
simultaneous communication channels (streams of data) to be transmitted on the same circuits.
Data/software: web page: web servers enable multiple clients to share read-only page content
(usually stored in a file, but sometimes generated on-the-fly). file: file servers enable multiple
clients to share read-write files. Conflicting updates may result in inconsistent results. Most
useful for files that change infrequently, such as software binaries. object: possibilities for
software objects are limitless. E.g. shared whiteboard, shared diary, room booking system, etc.
database: databases are intended to record the definitive state of some related sets of data.
They have been shared ever since multi-user computers appeared. They include techniques to
manage concurrent updates. newsgroup content: The netnews system makes read-only copies
of the recently-posted news items available to clients throughout the Internet. A copy of
newsgroup content is maintained at each netnews server that is an approximate replica of those
at other servers. Each server makes its data available to multiple clients. video/audio stream:
Servers can store entire videos on disk and deliver them at playback speed to multiple clients
simultaneously. exclusive lock: a system-level object provided by a lock server, enabling several
clients to coordinate their use of a resource (such as printer that does not include a queuing
scheme).Distributed
1.6 Use the World Wide Web as an example to illustrate the concept of resource sharing, client
and server. What are the advantages and disadvantages of HTML, URLs and HTTP as core
technologies for information browsing? Are any of these technologies suitable as a basis for
client-server computing in general?
HTML is a relatively straightforward language to parse and render but it confuses presentation
with the underlying data that is being presented.
URLs are efficient resource locators but they are not sufficiently rich as resource links. For
example, they may point at a resource that has been relocated or destroyed; their granularity is
too coarse-grained for many purposes.
HTTP is a simple protocol that can be implemented with a small footprint, and which canbe put
to use in many types of content transfer and other types of service. Its verbosity makes it
inefficient for passing small amounts of data.
HTTP and URLs are acceptable as a basis for client-server computing except that (a) there is
no strong typechecking (b) there is the inefficiency that we have mentioned
1.11 List the three main software components that may fail when a client process invokes a
method in a server object, giving an example of a failure in each case. Suggest how the
components can be made to tolerate one another’s failures.
B- Networking (Group 1, 3)
DSC.Chapter 3 -> G1
3.2 The Internet is far too large for any router to hold routing information for all destinations.
How does the Internet routing scheme deal with this issue?
If a router does not find the network id portion of a destination address in its routing table, it
despatches the packet to a default address an adjacent gateway or router that is designated as
responsible for routing packets for which there is no routing information available. Each router’s
default address carries such packets towards a router than has more complete routing
information, until one is encountered that has a specific entry for the relevant network id.
3.6 Can we be sure that no two computers on the Internet have the same IP addresses?
This depends upon the allocation of network ids to user organizations by the Network
Information Center (NIC). Of course, networks with unauthorized network ids may become
connected, in which case the requirement for unique IP addresses is broken.
3.8 Explain how it is possible for a sequence of packets transmitted through a wide area
network to arrive at their destination in an order that differs from that in which they were sent.
Why can’t this happen in a local network? Can it happen in an ATM network?
3.9 A specific problem that must be solved in remote terminal access protocols such as Telnet
is the need to transmit exceptional events such as ‘kill signals’ from the ‘terminal’ to the host in
advance of previously-transmitted data. Kill signals should reach their destination ahead of any
other ongoing transmissions. Discuss the solution of this problem with connection-oriented and
connectionless protocols.
The problem is that a kill signal should reach the receiving process quickly even when there is
buffer overflow (e.g. caused by an infinite loop in the sender) or other exceptional conditions at
the receiving host. With a connection-oriented, reliable protocol such as TCP, all packets must
be received and acknowledged by the sender, in the order in which they are transmitted. Thus a
kill signal cannot overtake other data already in the stream. To overcome this, an out-of-band
signalling mechanism must be provided. In TCP this is called the URGENT mechanism.
Packets containing data that is flagged as URGENT bypass the flowcontrol mechanisms at the
receiver and are read immediately. With connectionless protocols, the process at the sender
simply recognizes the event and sends a message containing a kill signal in the next outgoing
packet. The message must be resent until the receiving process acknowledges it.
3.10 What are the disadvantages of using network-level broadcasting to locate resources:
i) in a single Ethernet?
ii) in an intranet?
To what extent is Ethernet multicast an improvement on broadcasting?
Each layer must be independent of the other ones. The data passed from layer k +1 down to layer k
contains both header and data, but layer k cannot tell which is which. Having a single big header that
all the layers could read and write would destroy this transparency and make changes in the protocol
of one layer visible to other layers. This is undesirable.
Or
Because:
They hardly offer distribution transparency meaning that application developers are
required to pay significant attention to implementing communication, often leading to
proprietary solutions. The effect is that distributed applications, for example, built directly
on top of sockets are difficult to port and to interoperate with other applications.
Or
In principle, a reliable multicast service could easily be part of the transport layer, or
even the network layer. As an example, the unreliable IP multicasting service is
implemented in the network layer. However, because such services are currently not
readily available, they are generally implemented using transport-level services, which
automatically places them in the middleware. However, when taking scalability into
account, it turns out that reliability can be guaranteed only if application requirements are
considered. This is a strong argument for implementing such services at higher, less
general layers
Or
A multicast is when a message is being addresses to a set of computers on a network. A
multicast can have both one-to-many and many-to-many communications. If we are to
have a reliable multicast service to send messages reliably to collection of selected devices
we need to address the issue of having different devices operating on different platforms.
Middleware is basically software which helps distributed system achieve heterogeneity. This
means that middleware helps to mask the complexion of the distributed system from the
user. Also the middleware allows the system to function successfully on different devices
operating on different platform.
The layers on the bottom of the open systems interconnection reference model are
considered as lower-level layers they include the physical layer, data link layer, network
layer, transport layer. The main focus of these layers is to perform data transmission. This
reference model has seven layers and each of these layers have specific protocols to uphold
which is a very important task it would be inefficient to include multicast to any of these
low-level layers.
To overcome this we have the middleware layer which is placed in between application layer
and the transport layer. The middleware layer can contain all the general purpose protocols
that would be useful for distributed systems and also have the multicast service. Placing the
multicast in the middleware allows any message which is being multi-casted to be received
and accepted by and type of device intended as middleware supports heterogeneity.
4. Consider a procedure incr with two integer parameters. The procedure adds one to
each parameter. Now suppose that it is called with the same variable twice, for example.
as incr(i, i). If i is initially 0, what value will it have afterward if call-by-reference
is used?
If call by reference is used, a pointer to i is passed to incr. It will be incremented two times, so
the final result will be two. However, with copy/restore, i will be passed by value twice, each
value initially 0. Both will be incremented, so both will now be 1. Now both will be copied back,
with the second copy overwriting the first one. The final value will be 1, not 2
Or
10. Describe how connectionless communication between a client and a server proceeds
when using sockets.
Both the client and the server create a socket, but only the server binds the socket to a local endpoint. The
server can then subsequently do a blocking read call in which it waits for incoming data from any client.
Likewise, after creating the socket, the client simply does a blocking call to write data to the server. There
is no need to close a connection.
5.5 Describe a scenario in which a client could receive a reply from an earlier call.
If user request for one time password and times out and then again if user request for one time
password, and wait for one replay. The server which is working under heavy load, receive both
the request, and send two OTP. At this time user, will get OTP for the first request and thenuser
will get OTP for the second request
5.6 Describe the ways in which the request-reply protocol masks the heterogeneity of operating
systems and of computer networks.
5.12 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.
Provided that the connection continues to exist, no messages are lost, therefore, every request will
receive a corresponding reply, in which case the client knows that the method was executed exactly
once.
However, if the server process crashes, the client will be informed that the connection is broken and
the client will know that the method was executed either once (if the server crashed after executing
it) or not at all (if the server crashed before executing it).
But, if the network fails the client will also be informed that the connection is broken. This may have
happened either during the transmission of the request message or during the transmission of the reply
message. As before the method was executed either once or not at all.
5.14 The Election service must ensure that a vote is recorded whenever any user thinks they
have cast a vote.
Discuss the effect of maybe call semantics on the Election service.
Would at-least-once call semantics be acceptable for the Election service or would you
recommend at-most-once call semantics?
Maybe call semantics is obviously inadequate for vote ! Ex 5.1 specifies that the voter’s number is used
to ensure that the user only votes once. This means that the server keeps a record of who has voted.
Therefore at-least-once semantics is alright, because any repeated attempts to vote are foiled by the
server.
5.16 Outline an implementation for the Election service that ensures that its records remain
consistent when it is accessed concurrently by multiple clients.
Or
No.
Time-uncoupled communication means that the receiver(s) do not have to exist at the
time the sender is sending. Sender and receiver can have independent lifetimes.
Asynchronous communication means that the sender does not have to wait until the
receiver has received his message to proceed. The sender doesn't have to block.
What this means is that all time-uncoupled communication is asynchronous, but not vice
versa. With asynchronous communication, the receiver doesn't have to meet in time with
the sender, but he has to exist at the time the sender is sending. So, asynchronous
communication is not time-uncoupled.
The term Group Communication System (GCS) refers to a software platform that implements some
form of group communication. Examples of group communication systems include IS-IS, JGroups,
Spread Toolkit, Appia framework, QuickSilver, and the group services component of IBM's RSCT.
Message queue systems are somewhat similar.
Group communication systems commonly provide specific guarantees about the total ordering of
messages, such as, that if the sender of a message receives it back from the...
9. 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?
15. Explain in which respects DSM is suitable or unsuitable for client-server systems
DSM is unsuitable for client-server systems in that it is not conducive to heterogeneous working.
Furthermore, for security we would need a shared region per client, which would be expensive
DSM may be suitable for client-server systems in some application domains, e.g. where a set of
clients share server responses.
18. 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?
1. In many layered protocols, each layer has its own header. Surely it would be more efficient to
have a single header at the front of each message with all the control in it than all these
separate headers. Why is this not done?
8. Instead of letting a server register itself with a daemon as in DCE, we could also choose to
always assign it the same end point. That end point can then be used in references to objects in
the server's address space. What is the main drawback of this scheme?
21. How could you guarantee a maximum end-to-end delay when a collection of computers is
organized in a (logical or physical) ring?
22. How could you guarantee a minimum end-to-end delay when a collection of computers is
organized in a (logical or physical) ring?
D- Architectures, Group 7 and 12
DSP.Chapter 2-> This was assigned to G7. Thus, Essam removed the Questions.
DSP.Chapter 2 -> G7
2. What is a three-tiered client-server architecture?
3. What is the difference between a vertical distribution and a horizontal distribution?
8. Consider an unstructured overlay network in which each node randomly chooses c
neighbors. If P and Q are both neighbors of R, what is the probability that they are
also neighbors of each other?
10. Not every node in a peer-to-peer network should become superpeer. What are reasonable
requirements that a superpeer should meet?
14. To what extent are interceptors dependent on the middle ware where they are
deployed?
DSC.Chapter 10 ->G12 >G1->G7 Commented [1]: I will not include this chapter in the
final exam.
Commented [2]: _Marked as resolved_
Commented [3]: _Re-opened_
DSP.Chapter 5 ->G16
6. Consider the Chord system as shown in Fig. 5-4 and assume that node 7 has just
joined the network. What would its finger table be and would there be any changes to
other finger tables?
17. Explain the difference between a hard link and a soft link in UNIX systems. Are there
things that can be done with a hard link that cannot be done with a soft link or vice
Versa?
13.3 Explain why iterative navigation is necessary in a name service in which different name
spaces are partially integrated, such as the file-naming scheme provided by NFS.
13.8 Why do DNS root servers hold entries for two-level names such as yahoo.com and
purdue.edu, rather than one-level names such as edu and com?
13.10 Why might a DNS client choose recursive navigation rather than iterative navigation?
What is the relevance of the recursive navigation option to concurrency within a name server?
DSP.Chapter 6
2. Consider the behavior of two machines in a distributed system. Both have clocks that are
supposed to tick 1000 times per millisecond. One of them actually does, but the other ticks only
990 times per millisecond. If UTC updates come in once a minute, what is the maximum clock
skew that will occur?
6. To achieve totally-ordered multicasting with Lamport timestamps, is it strictly neces- sary that
each message is acknowledged?
10. Consider Fig. 6-14 again. Suppose that the coordinator crashes. Does this always bring the
system down? If not, under what circumstances does this happen? Is there any way to avoid the
problem and make the system able to tolerate coordinator crashes?
14.Suppose that two processes detect the demise of the coordinator simultaneously and both
decide to hold an election using the bully algorithm. What happens?
15. In Fig. 6-21 we have two ELECTION messages circulating simultaneously. While it does no
harm to have two of them, it would be more elezant if one could be killed off.
Devise an algorithm for doing this without affecting the operation of the basic election algorithm.
G- Replication Group 6
DSP.Chapter 7 -> G6
2. Explain in your own words what the main reason is for actually considering weak consistency
models.
9. What kind of consistency would you use to implement an electronic stock market? Explain
your answer.
10. Consider a personal mailbox for a mobile user, implemented as part of a wide-area
distributed database. What kind of client-centric consistency would be most appropriate?
14. We have stated that totally-ordered multicasting using Lamport's logical clocks does not
scale. Explain why.