Sie sind auf Seite 1von 6

Homework No.

Distributed Systems

Submitted to:
Submitted by:
Mr. Dinesh Kumar
Sonika Dogra

RG
1005 A 19

Reg
no. 11011438
Q1 There are several ways to organize the server .In case of
concurrent server what are the different design issues?

ANSWER: The organization of a server depends upon the type of


server.Basically we have two types of servers:

• Iterative server.

• Concurrent server.

Iterative server: These types of servers handle all requests by themselves &
give response.

Concurrent server: these servers do not handle the requests; they simply
pass the request to other process or thread. Concurrent servers are
implemented by multithreading.

Design issues for a concurrent server:

• NEW PROCESS: concurrent servers can create a new process to handle


the incoming user request. e.g. - in UNIX system.

• END POINTS: client contact the server through end points. These end
points are globally assigned by IANA. Using these end points client find
out the network address of the machine where the server is currently
running. But end points are not pre-assigned to some services, so in that
case local operating assigns the end points dynamically. So, in that case
client first looks up into daemon and request for the end points and then
at the end contact to the specific server.

• SUPER SERVER: Instead of having so many servers running


concurrently,we can make use of a super computer, that listens to each
end point associated with a service .e.g. inept daemon in UNIX.

• HOW A SERVER CAN BE INTERRUPTED: This is an important issue and


it must be taken care that whether a server can be interrupted or not? If
yes then how? So a better approach to handle the interrupts is that client-
server should be developed in such a way that it is possible to send “out
of band” data.
• STATELESS OR STATEFULL: It is a final design issue that whether the
server is stateless or state full. stateless server is one that does not keep
information about the state of its clients. Moreover such servers can
change their state without informing to client.On other hand statefull
servers maintains persistent information on their client.But while
designing the server the choice of stateless or statefull design should not
effect the services provided by the server.

Q2 illustrate the code migration in the D’Agent. Discuss the internal


implementation issues.

ANSWER: Code migration. Every mobile-agent system must provide a


mechanism to transfer the code for the agent, although approaches vary
widely. The sending host could push all necessary code to the destination host
along with the agent’s data, or it could simply send the data and expect the
destination to specifically request code modules that it needs. The former
approach guarantees that the agent has everything it needs on
arrival(important in systems hoping to support disconnected computing).In
some systems, the destination asks the sending host for code, in other systems,
the destination asks a third-party “code server” for code. The use of a code
server allows the sending host to drop out after sending the data to the
destination.

In D’ Agents , we push the agent’s entire code base from the source machine to
the target machine as part of the agent’s state image. We have no plans to
support on-demand code fetching from previous machines,since this approach
weakens the mobile-agent abstraction: the mobile agent becomes dependent
on a machine that it has chosen to leave, a dependency that is particularly
undesirable in our mobile-computing and wireless-network applications. We do
not have, but hope to add, support for code caching, because it is essential for
the highest performance.
In some languages it may be difficult to know precisely which code modules will
be needed at the destination host. Some mobile-agent systems conservatively
send all code along with the agent.

Q3 Explain How the DNS can be used to implement a home based


approach to locating mobile hosts?

ANSWER:

DNS and all other naming systems maintains a mapping of human friendly
names to address.(as each entity has its name and address).For effective
implementations of namespaces like DNS.It is partitioned into three layers:-

• Global layer.

• Administration layer.

• Managerial layer.

In global and administration layer, names do not change often.But in


managerial layer,names change often.If we want to locate the address of
remote host ftp.cs.vu.nl.

By assuming that content of nodes in global & administration layer are


stable,client can find the address of name server for “cs.vu.nl.” domain in its
local cache.So, a request is sent to that name server to find the address of
ftp.cs.vu.nl. But traditional naming servers like DNS are not efficient to locate
mobile entities.This is because of the reason that traditional naming services
maintain a direct a direct maping between human friendly names and the
addresses of entities.But whenever there is change in thename or address,we
need to change the mapping also.
So now we are using identifiers,these days.so, whenever we look up for an
entity by means of the naming service,that naming service returns an identifier,
then that identifier is stored locally for as long as needed,. We have a separate
location service that accepts the identifier as input and returns the current
address of the identified identity.

Q4 Naming and location services provides a global referencing service


for entities. There may be a situation that there is an entity which
consume resources but which is never to be used in the future. Discuss
the different approach for managing references.

ANSWER: If resource descriptions are stored, it becomes possible to quote that


storage in a way that is common for many attributed-based naming systems.

For example, an application could ask for the information associated with a
person named Alice. Such a query would return a reference to the person
resource associated with Alice. This resource can then subsequently be fetched
by the application. However, not having the descriptions in the same place may
incur a serious performance problem.

Hierarchical Implementations:LDAP

A common approach t of tackling distributed directory services is to combine


structured naming with attribute-based naming. This approach has been widely
adopted, for example, in microsoft’s Active Directory service and other systems.
Many of these systems use, or rely on the lightweight directory access protocol
commonly referred as LDAP.

LDAP directory service consists of a number of records usually reffered to as


directory entries. A directory entry comparable to a resource record in DNS.
Each record is made up of a collection of (attribute, value) pairs, where each
attribute has an associated type.The collection of all directory entries in an
LDAP directory service is called a directory information base (DIB). An important
aspect of a DIB is that each record is uniquely named so that it can be looked
up.This whole setup of LDAP can be taken one step further by allowing

several trees to co-exist, while also being linked to each other. This approach is
followed in Microsofts’s Active Directory leading to a forest of LDAP domains.

It is common to combine LDAP with DNS. For example, every tree in LDAP needs
to be accessible at the root. The root is often known under a DNS name, which
in turn can be found through an appropriate record. There is no reason why the
resources should reside at the same location as well.

Q5 For what purpose the physical clock is used in the system.


Elaborate

ANSWER: In computer system, we have a circuit that keeps track of time. This
circuit is known as clock or timer. Every computer contains a physical clock. A
physical clock counts the oscillations in a crystal at a particular frequency and
then counts are typically divided and stored in the counter register. physical
clock act as a stable oscillator or frequency generator along with a counter that
records the number of cycles. value of the counter at any time is called epoch
and recorded as the time stamp.

Purpose of designing the physical clock:

• Physical clocks are helpful in getting the order of the events, The
ordering of events is required in distributed tracing and debugging,
distributed database check-pointing, maintaining consistency in replicated
databases and deadlock avoidance and detection.

• Counter of a physical clock can be used to get the time of the day.

• Physical clock can be programmed to generate the interrupts at regular


intervals.( at the time required by CPU scheduler).

• Physical clocks are helpful for synchronization among different processes


within the same system.

Das könnte Ihnen auch gefallen