SlideShare uma empresa Scribd logo
1 de 27
CHIRAG PATIL
DISTRIBUTED SYSTEM
Explain distributed system models with diagram. 10M
Distributed System Models are as follows:
1. Architectural Models
2. Interaction Models
3. Fault Models
1. Architectural Models
Architectural model describes responsibilities distributed between systemcomponents and
how are these components placed.
A) Client-server model
The systemis structured as a set of processes, called servers that offer services to the users,
called clients.
The client-server model is usually based on a simple request/reply protocol, implemented with
send/receive primitives or using remote procedure calls (RPC) or remote method invocation
(RMI).
The client sends a request (invocation) message to the server asking for some service.
The server does the work and returns a result (e.g. the data requested) or an error code if the
work could not be performed.
A server can itself request services from other servers; thus, in this new relation, the server
itself acts like a client.
CHIRAG PATIL
B) Peer-to-peer model
In this model all processes (objects) play similar role.
Processes (objects) interact without particular distinction between clients and servers.
The pattern of communication depends on the particular application.
A large number of data objects are shared; any individual computer holds only a small part of
the application database.
Processing and communication loads for access to objects are distributed across many
computers and access links.
This is the most general and flexible model.
It distributes shared resources widely and it shares computing and communication loads.
Problems with peer-to-peer:
High complexity due to cleverly place individual objects
Retrieve the objects
Maintain potentially large number of replicas.
2. Interaction Model
Interaction model are for handling time i. e. for process execution, message delivery, clock
drifts etc.
CHIRAG PATIL
Synchronous distributed systems:
Main features:
Lower and upper bounds on execution time of processes can be set.
Transmitted messages are received within a known bounded time.
Drift rates between local clocks have a known bound.
Important consequences:
In a synchronous distributed systemthere is a notion of global physical time (with a known
relative precision depending on the drift rate).
Only synchronous distributed systems have a predictable behavior in terms of timing. Only such
systems can be used for hard real-time applications.
In a synchronous distributed systemit is possible and safe to use timeouts in order to detect
failures of a process or communication link.
It is difficult and costly to implement synchronous distributed systems.
Asynchronous distributed systems:
Many distributed systems (including those on the Internet) are asynchronous. - No bound on
process execution time (nothing can be assumed about speed, load, and reliability of
computers).
No bound on message transmission delays (nothing can be assumed about speed, load, and
reliability of interconnections) - No bounds on drift rates between local clocks.
CHIRAG PATIL
Important consequences:
In an asynchronous distributed systemthere is no global physical time. Reasoning can be only in
terms of logical time (see lecture on time and state).
Asynchronous distributed systems are unpredictable in terms of timing.
No timeouts can be used.
Asynchronous systems are widely and successfully used in practice.
In practice timeouts are used with asynchronous systems for failure detection.
However, additional measures have to be applied in order to avoid duplicated messages,
duplicated execution of operations, etc.
3. Fault Models
Failures can occur both in processes and communication channels. The reason can be both
software and hardware faults.
Fault models are needed in order to build systems with predictable behavior in case of faults
(systems which are fault tolerant).
Such a system will function according to the predictions, only as long as the real faults behave
as defined by the fault model.
Compare network and distributed operating system (NOS vs. VOS).
No. Network OS Distributed OS
1 A network operating systemis made up A distributed operating systemis an ordinary
CHIRAG PATIL
of software and associated protocols
that allow a set of computer network to
be used together.
centralized operating system but runs on
multiple independent CPUs.
2 In network OS Environment users are
aware of multiplicity of machines.
In distributed OS Environment users are not
aware of multiplicity of machines.
3 Control over file placement is done
manually by the user.
It can be done automatically by the system
itself.
4 Performance is badly affected if certain
part of the hardware starts
malfunctioning.
It is more reliable or fault tolerant i.e.
distributed operating systemperforms even if
certain part of the hardware starts
malfunctioning.
5 Remote resources are accessed by
either logging into the desired remote
machine or transferring data from the
remote machine to user's own
machines.
Users access remote resources in the same
manner as they access local resources.
6 Network OS is used to manage
Networked computer systems and
create, maintain and transfer files in
that Network.
Designed to control and optimize operations
and resources in distributed system.
Discuss different issues in designing distributed system. 10M
Issues in designing distributed systems:
1. Heterogeneity:
The Internet enables users to access services and run applications over a heterogeneous
collection of computers and networks.
Internet consists of many different sorts of network their differences are masked by the fact
that all of the computers attached to them use the Internet protocols to communicate with one
another.
For e.g., a computer attached to an Ethernet has an implementation of the Internet protocols
over the Ethernet, whereas a computer on a different sort of network will need an
implementation of the Internet protocols for that network.
2. Openness:
The openness of a computer system is the characteristic that determines whether the system
can be extended and re-implemented in various ways.
CHIRAG PATIL
The openness of distributed systems is determined primarily by the degree to which new
resource-sharing services can be added and be made available for use by a variety of client
programs.
3. Security:
Many of the information resources that are made available and maintained in distributed
systems have a high intrinsic value to their users.
Their security is therefore of considerable importance.
Security for information resources has three components: confidentiality, integrity, and
availability.
4. Scalability:
Distributed systems operate effectively and efficiently at many different scales, ranging from a
small intranet to the Internet.
A systemis described as scalable if it will remain effective when there is a significant increase in
the number of resources and the number of users.
5. Failure handling:
Computer systems sometimes fail. When faults occur in hardware or software, programs may
produce incorrect results or may stop before they have completed the intended computation.
Failures in a distributed system are partial – that is, some components fail while others
continue to function.
Therefore the handling of failures is particularly difficult.
6. Concurrency:
Both services and applications provide resources that can be shared by clients in a distributed
system.
There is therefore a possibility that several clients will attempt to access a shared resource at
the same time.
Object that represents a shared resource in a distributed system must be responsible for
ensuring that it operates correctly in a concurrent environment.
This applies not only to servers but also to objects in applications. Therefore any programmer
who takes an implementation of an object that was not intended for use in a distributed system
must do whatever is necessary to make it safe in a concurrent environment.
CHIRAG PATIL
7. Transparency:
Transparency can be achieved at two different levels. Easiest to do is to hide the distribution
from the users.
The concept of transparency can be applied to several aspects of a distributed system.
a) Location transparency: The users cannot tell where resources are located.
b) Migration transparency: Resources can move at will without changing their names.
c) Replication transparency: The users cannot tell how many copies exist.
d) Concurrency transparency: Multiple users can share resources automatically.
e) Parallelismtransparency: Activities can happen in parallel without users knowing.
8. Quality of service:
Once users are provided with the functionality that they require of a service, such as the file
service in a distributed system, we can go on to ask about the quality of the service provided.
The main nonfunctional properties of systems that affect the quality of the service experienced
by clients and users are reliability, security and performance.
Adaptability to meet changing system configurations and resource availability has been
recognized as a further important aspect of service quality.
9. Reliability:
One of the original goals of building distributed systems was to make them more reliable than
single-processor systems.
The idea is that if a machine goes down, some other machine takes over the job. A highly
reliable system must be highly available, but that is not enough.
Data entrusted to the system must not be lost or garbled in any way, and if files are stored
redundantly on multiple servers, all the copies must be kept consistent.
In general, the more copies that are kept, the better the availability, but the greater the chance
that they will be inconsistent, especially if updates are frequent.
10. Performance:
Always the hidden data in the background is the issue of performance.
CHIRAG PATIL
Building a transparent, flexible, reliable distributed system, more important lies in its
performance.
In particular, when running a particular application on a distributed system, it should not be
appreciably worse than running the same application on a single processor.
Unfortunately, achieving this is easier said than done.
What are the reasons for migration of code? Explain the various models for code
migration. 10M
Reasons for migrating code
1. Code migration in DS took place in form of process migration even though it’s costly but
reason is for performance.
2. From heavily loaded to lightly loaded performance
3. Due to heterogeneity of platforms and compression network performance improvement
through code migration is often based on quantitative reasoning.
Eg. Server manages huge database.
4. Code migration also helps improve performance by exploiting parallelism.
Eg. For searching information in web. It’s easy to implement search query program that moves
from site to site.
5. Other reasons for supporting code migration are flexibility.
6. Traditional approach to building dist. Application is to partition application into different
parts and decided where each part to be executed but if code migration between machines, it
is possible to dynamically configure distributed system.
7. Communication in distributed systems is concerned with exchanging data between
processes.
8. Code migration in the broadest sense deals with moving programs between machines, with
the intention to have those programs is executed at the target.
9. In code migration framework, a process consists of 3 segments.
10. The code segment is the part that contains the set of instructions that make up the program
that is being executed
CHIRAG PATIL
11. The resource segment contains references to external resources needed by the process,
such as files, printers, devices, other processes and so on.
Various models of code migration:
1) Weak mobility:
A characteristics feature of weak mobility is that a transferred program is always started from
its initial state.
Eg. Java applets
2) Strong mobility
A characteristics feature of strong mobility is that a running process can be stopped,
subsequently moved to another m/c and then resume execution where it left off.
Eg. D’ Agents.
3) Sender initiated migration
In sender initiated migration, migration is initiated at the m/c where code currently resides or is
being executed.
Eg. Sending a search program access the internet to a web database server to perform the
queries at that server.
What is thread? Advantages of using threads. What are different models of organizing
threads? 10M
Thread:
1. A thread is a single sequence stream within a process.
2. Threads are also called as lightweight processes. Each thread belongs to exactly one process.
3. Threads are run in parallel to improve performance of application.
4. Each thread has its own CPU state and stack.
5. Each thread has its own thread control block (TCB).
6. There are two types of threads: user level threads and kernel level threads.
Advantages of using threads:
1. Performance:
CHIRAG PATIL
Threads improve the performance of a program.
Multiple threads are useful in a multiprocessor system where threads run concurrently on
separate processors.
2. Shared Resources:
An advantage of using multiple threads over using separate processes is that the former share a
single address space, all open files, and other resources.
3. Potential Simplicity:
Multiple threads can reduce the complexity of some applications that are inherently suited for
threads.
4. Modularity:
Programs are often modeled as a number of distinct parts interacting with each other to
produce a desired result or service.
A program can be implemented as a single, complex entity that performs multiple functions
among the different parts of the program.
Different models of organizing threads:
Three commonly used ways to organize the threads of a process are as follows.
1. Dispatcher-Worker Model:
i. In this model, the process consists of single dispatcher threads and multiples worker threads.
ii. The dispatcher the request to one of the free worker threads for further processing of the
request.
iii. Each worker threads work on a different client request.
iv. Therefore multiple client requests can be processed in parallel.
2. Team Model :
i. In this models, all threads behave as equals in the sense that there is no dispatcher-worker
relationship for processing clients requests.
ii. Each threads gets and processes clients request on its own.
iii. This model is often used for implementing specialized threads within a process. That is, each
thread of the process is specialized in servicing a specific type of request.
CHIRAG PATIL
iv. Therefore, multiples types of requests can be simultaneously handled by the process.
3. Pipeline Model:
i. This model is useful for applications based on the producer-consumer model, in which the
output data generated by one part of the application is used as input for another part of the
application.
ii. In this model, the threads of a process are organized as a pipeline so that output data
generated by the first thread is used for processing by the second thread; the output of the
second thread is used for processing by the third thread, and so on.
iii. The output of the last thread in the pipelines is the final output of the process to which the
threads belong.
Compare process & thread. Explain user level & kernel level threads. What is the need of
lightweight threads?
No. Process Threads
1 Program in execution called as process. Thread is a part of process.
2 It is heavy weight process. It is light weight process.
3 Process context switch takes more time as
compare to thread context switch because
it needs interface of operating system.
Thread context switch takes less time as
compare to process context switch because
it needs only interrupt to kernel only.
4 New process creation takes more time as
compare to new thread creation.
New thread creation takes less time as
compare to new process creation.
5 New process termination takes more time
as compare to new thread termination.
New thread termination takes less time as
compare to new process termination.
6 Each process executes same code but has
its own memory and file resources.
All threads can share same set of open files,
child processes.
7 Multiple redundant processes use more
resources than multiple threaded
processes.
Multiple threaded processes use fewer
resources than multiple redundant
processes.
8 Context switch flushes the MMV (TLB)
registers as address space of process
changes.
No need to flush TLB as address space
remains same after context switch because
threads belongs to the same process.
User level threads:
1. In user level implementation the kernel is unaware of the thread.
2. In this case thread package entirely put in user space.
CHIRAG PATIL
3. In user level implementation, all of the work of the thread management is done by the
thread package.
4. Thread management include creation and termination of thread, messages and data passing
between the threads, scheduling thread for execution, thread synchronization and after context
switch saving and restoring thread context etc.
Kernel level threads:
1. In this, threads are implemented in operating system’s kernel.
2. The thread management is carried out by kernel.
3. All these thread management activities are carried out in kernel space. So thread context and
process context switching becomes same.
4. Kernel threads are generally requires more time to create and manage than the user threads.
Need of lightweight threads:
Short note on SOA lifecycle. State the advantages of SOA. 10M
1. Service orientation ties together autonomous sources of information bridging a wide range
of operating systems, technology and communication process.
2. This service orientation process is an iterative and incremental process.
3. It consists of creating services into larger composing applications and making the outputs
available for consumption by the business user.
4. All these phases are driven by the business processes to meet the business experiments.
5. Phases of SOA lifecycle:
CHIRAG PATIL
These phases are as follows:
1) Expose:
i. This phase focuses on creation/extraction of services from existing application and data.
ii. Service creation can be time grained or course grained.
iii. As services are loosely coupled, they can be.
iv. It is also concerned with the implementation of these services.
2) Compose:
i. Once services are created, they can be combined into more complex services, applications or
business processes.
ii. As receives are loosely coupled, they can be combined and reused with maximum flexibility.
3) Consume:
i. This phase is concerned with the usage of the already created services by other IT systems or
end users.
ii. It delivers new, dynamic applications that enable insight into business performance.
Advantages of SOA
1) Reusability
2) Interoperability
3) Scalability
4) Flexibility
5) Cost efficiency
6) Coverage existing assets
7) Easier to integrate and manage
8) More responsive and faster time to market
9) Reduce cost and increases reuse
CHIRAG PATIL
Difference between bully election algorithm and ring based algorithm. 5M
N0. Bully election algorithm Ring based algorithm
1 Any process sends a message to the
current coordinator in bully election
algorithm.
Each process only sends messages to the
next process in the ring in ring based
algorithm.
2 There is no ring forming in this algorithm. All the process forms ring in rig based
algorithm.
3 Each node is allocated a numerical unique
identifier.
The nodes are arranged in a logical ring.
4 In bully algorithm the nodes can
communicate with each node.
In ring algorithm the nodes can only
communicate with our neighbor nodes.
5 Each process has an associated priority. Process priority is obtained by organizing
processes into ring.
Explain migration in heterogeneous system. 10M
1. Process Migration can be defined as the ability to move a currently executing process
between different processors which are connected only by a network.
2. Heterogeneous Process Migration is a technique whereby an active process is moved from
one machine to another.
3. Heterogeneous process migration refers to providing valuable features like heterogeneous
processing, load balancing and crash tolerance.
4. Migration is the process of moving from the use of one operating environment to another
operating environment.
5. The migration process includes making sure the new environments features are exploited,
old setting do not requires changes and that current application continue work.
6. Migration in heterogeneous system includes process migration and code migration.
7. Process migration is the important feature of distributed system.
8. Process migration is specialized from the process management whereby processes are
moved from one computing environment to other computing environment.
9. The traditional form of process migration is in computer clusters where processes are moved
from machine to machine.
10. There are two types of process migration: Non-preemptive process migration and
Preemptive process migration.
11. Code migration is costly than process migration.
CHIRAG PATIL
12. Performance of code migration is better than process migration so code migration takes
place instead of process migration.
13. The code segment is the part that contains the set of instructions that make up the program
that is being executed
14. The resource segment contains references to external resources needed by the process,
such as files, printers, devices, other processes and so on.
15. In code migration process consists of three segments.
16. Modes of code migration: Weak mobility, Strong mobility, Sender initiated migration.
17. Consider an example, a client-server system in which the server manages a huge database.
18. If a client application needs to do many database operations involving large quantities of
data, it may be better to ship part of the client application to the server and send only the results
across the network.
19. Otherwise, the network may be swamped with the transfer of data from the server to the
client. In this case, code migration is based on the assumption that it generally makes sense to
process data close to where those data reside.
20. This same reason can be used for migrating parts of the server to the client.
21. For example, in many interactive database applications, clients need to fill informs that are
subsequently translated into a series of database operations.
22. Processing the form at the client side, and sending only the completed form to the server, can
sometimes avoid that a relatively large number of small messages need to cross the network.
23. The result is that the client perceives better performance, while at the same time the server
spends less time on form processing and communication.
24. Support for code migration can also help improve performance by exploiting Parallelism, but
without the usual intricacies related to parallel programming.
Compare Stateful and Stateless server implementations. 5M
No. Stateful server implementation Stateless server implementation
1 A stateful server remembers client data
(state) from one request to the next
request.
A stateless server keeps no state
information.
2 Programming of stateful server is hard as
compare to stateless server.
Programming of stateless server is easy as
compare to stateful server.
3 Crash recovery is difficult in stateful server. Crash recovery is not difficult in stateless
server.
4 Stateful server application includes read, Stateless server application includes read
CHIRAG PATIL
write, open, seek and close operations. and write operations.
5 In stateful implementation client do not
have to provide full file information every
time they perform an operation.
In stateless implementation client must
have to provide full file information.
6 Stateful server implementation is more
efficient than stateless server
implementation.
Stateless server implementation is less
efficient than stateful server
implementation.
Components of EJB framework 5M
1. EJB stands for Enterprise Java Beans.
2. EJB technology is a specification framework that supports the development and deployment
of java.
3. The framework provides a complete deployment environment and a set of services for
developing and executing distributed applications.
4. This enables you to focus on the application logic instead of the application framework
required when building server applications.
6. An EJB represents a business object or service, such as a purchase requisition, in a Java
application.
7. EJB framework:
8. Components of EJB framework:
i. EJB server
CHIRAG PATIL
ii. EJB client
iii. EJB container
iv. Enterprise Beans
v. Deployment descriptor
i. EJB server:
1. The EJB server manages EJB containers.
2. It provides execution environment for server components.
3. It provides the underlying environment for an enterprise bean.
4. It provides access to the basic systemservices required by the Enterprise JavaBeans
architecture and any vendor specific features.
ii. EJB client:
1. The EJB client and the EJB server communicate using Internet Inter-ORB Protocol (IIOP) or
Remote Method Invocation (RMI).
2. It makes use of EJB beans to perform the operations.
3. Client locates the container using Java Naming & Directory Interface (JNDI).
4. Then the client invokes Java Beans machines through container.
iii. EJB container:
1. The EJB container acts as the enterprise bean holder that manages the enterprise beans
classes and instances.
2. EJB classes are deployed to the EJB container that manages the startup and shutdown of the
EJB class instances.
3. The EJB container provides system-level services to the EJB classes through the standard EJB
APIs.
4. The EJB server manages the EJB containers and container serves as interface of EJB and
Outside World.
iv. Enterprise Beans:
1. The enterprise bean is a Java class or collection of classes, provided as a java archive file.
CHIRAG PATIL
2. The enterprise bean component takes advantage of the Enterprise JavaBean architecture
extending classes aligned with the EJB specifications develops it.
3. Enterprise beans encapsulate business functionalities in an application and it gets security
container.
4. Three types of Enterprise Beans:
A. Session Beans (Synchronous)
B. Message Driven (Asynchronous)
C. Entity Beans (Data/Records in DB)
v. Deployment descriptor:
1. The deployment descriptor is a file that contains all the information needed by the EJB
container at runtime.
2. It lists the bean properties and elements as following:
JNDI Name for Bean, Home and Remote Interface, Bean Implementation Class, Environment
Variables, Access Rules or Rights, Beans Management, Etc
RMI execution 5M
1. The RMI stands for Remote Method Invocation.
2. The RMI is an API that provides a mechanism to create distributed application in java.
3. The RMI allows an object to invoke methods on an object running in another JVM.
4. The RMI provides remote communication between the applications using two objects stub
and skeleton.
5. RMI is used for building distributed application.
6. Stub act as a gateway for Client program.
7. Stub resides on Client side and it communicates with Skeleton object.
8. It establishes the connection between remote object and transmit request to the remote
object.
9. Skeleton object resides on server program.
10. It is responsible for passing request from Stub to remote object.
CHIRAG PATIL
11. Stub and skeleton:
12. Steps involve in creation of RMI application:
i. Define a remote interface
ii. Implementing remote interface
iii. Create and start remote application
iv. Create and start client application
Which .Net components make .NET platform and language independent? Explain how
it works. 5M
1. .NET is Platform Independent because one can download the Standardized Specification of
the Microsoft Common Language Infrastructure and write a .NET compiler for a new operating
system.
2. Platform independent means making your programs capable of being portable on a new
platform.
3. .NET platform is the best solution for the users which are using windows operating system.
4. One can also called “Platform Independence” as “Write Once, Run Anywhere”.
5. Components of .NET platform:
i. .NET applications
ii. Common Language Runtime (CLR)
iii. Windows OS
CHIRAG PATIL
6. Common Language Runtime (CLR) component makes .NET platform independent.
7. It is called as heart of the .NET platform and it is also called as .NET runtime.
8. The place of the common language runtime (CLR) is above the windows operating system.
9. It handles garbage collection, Code Access Security (CAS) and all the .NET applications.
10. The common language runtime monitors the execution of .NET applications and provides
essential services.
11. It shares a common language runtime and common class library.
12.
Explain parameters passing semantics in RPC. 5M
Parameters passing semantics in RPC:
Passing parameters is typically the only way that RPC-based clients and servers share
information.
Parameters that are passed by value are very simple to handle.
1. Last-Once Call Semantics:
i. This call semantics uses the idea of retransmitting the call message based on timeouts till the
caller receives a response.
ii. The call execution and result will keep repeating till the result of procedure execution is
received by the caller.
CHIRAG PATIL
iii. The results of the last executed call are used by the caller, therefore it is called as last-one
semantics.
iv. Last once semantics can be easily achieved only when two nodes are involved in the RPC.
2. May-Be Call Semantics:
i. This semantics is the weakest semantics.
ii. In this semantics, a timeout mechanism is used to prevent the caller from waiting indefinitely
for a response from the callee.
iii. The caller waits until a pre-determined timeout period and then continues to execute.
iv. This semantics does not guarantee the receipt of call message.
v. This semantics is applicable where the response message is less important and applications
that operate within a local network with successful transmission of messages.
3. Last-of-Many Call Semantics:
i. This semantics neglects orphan calls. Orphan call is one whose caller has expired due to node
crash.
ii. Unique call identifiers are used to identify each call.
iii. A response is accepted only if the call identifier associated with it matches.
4. At-Least-Once Call Semantics:
i. This semantics guarantees that the call is executed one or more times.
ii. It does not specify which results are returned to the caller.
iii. It can be implemented using timeout based retransmission without considering the orphan
calls.
5. Exactly-Once Call Semantics:
i. Exactly once call semantics is the strongest and the most desirable call semantics.
ii. It eliminates the possibility of a procedure being executed more than once irrespective of the
number of retransmitted call.
iii. The implementation of this semantics is based on the use of timeouts, retransmission, call
identifiers with the same identifier for repeated calls and a reply cache associated with the
callee.
CHIRAG PATIL
List types of failure in message passing system and how to overcome them 5M
A message passing systemis a subsystemof distributed operating system that provides a set of
message based IPC protocol.
Message passing systemenables processes to communicate by exchanging messages and
allows programs.
A message is a block of information. It is formatted by sending process in such a manner that it
is meaningful to the receiving process.
Failures in message passing system:
1. Loss of request message
2. Loss of response message
3. Unsuccessful execution of the request
1. Loss of request message:
This happens due to failure of the communication link between sender and receiver.
2. Loss of response message:
This also happens due to failure of the communication link between sender and receiver.
CHIRAG PATIL
3. Unsuccessful execution of the request:
This happens the receiver’s node crashing while receiving message.
Solution to handle failures in message passing system:
1. Four message reliable IPC protocol
2. Three message reliable IPC protocol
3. Two message reliable IPC protocol
1. Four message reliable IPC protocol:
CHIRAG PATIL
It works as follows:
i. A client sends request message to the server.
ii. Server sends the acknowledgement message to the client, if acknowledgement message is
not received at the client then client retransmits the request message to the server.
iii. Server gives reply to client on finishing its processing.
iv. After receiving reply from server, client sends acknowledgement message to the server.
2. Three message reliable IPC protocol:
CHIRAG PATIL
It works as follows:
i. A client sends request message to the server.
ii. Server gives reply to client on finishing its processing.
iii. After receiving reply from server, client sends acknowledgement message to the server.
3. Two message reliable IPC protocol:
CHIRAG PATIL
It works as follows:
i. A client sends request message to the server.
ii. Server gives reply to client on finishing its processing.
What do you mean by marshalling of arguments and results in RPC? List the actions involved
in marshalling. 5M
1. The process of transforming the memory representation of an object to a data format
suitable for storage or transmission is called as marshalling of arguments.
2. When data moved between different parts of a computer program or from one program to
other program, marshalling is used.
3. Marshalling is similar to serialization.
4. It is used to communicate to remote objects with an object.
5. Marshalling simplifies complex communication using complex objects to communicate.
List of the actions involved in marshalling:
1. An application sends an invocation request by calling the associated method, and then
control sub object checks the user permissions. Then the request is marshaled and passed on.
2. The replication sub object requests the middleware to set up a secure channel to a suitable
replica.
3. The security object initiates a replica lookup.
4. When a suitable replica has been found, the security sub object can set up a secure channel
with its peer.
5. Then the request is now passed on to the communication sub object.
6. Then sub object encrypts and signs the request to pass it through the channel.
7. After that the request is decrypted and authenticated.
8. Then the request is simply passed on to the server-side replication sub object.
9. In this case the user certificate is passed to the replica for the authorization.
10. Then the request is un-marshaled.
11. And it ends up with the execute operation.
CHIRAG PATIL
Note on callback RPC. 5M
1. In the usual RPC protocol, the caller and callee processes have a client – server relationship.
2. RPC is a powerful technique for constructing distributed, client-server based applications.
3. The callback RPC facilitates a peer-to-peer paradigm among the participating processes.
4. It allows a process to be both a client and a server. Callback RPC facility is very useful in
certain distributed applications.
5. The server may make several callbacks to the client before returning the result of the initial
call to the client process.
6. The ability for a server to call its client back is very important, and care is needed in the
design of RPC protocols to ensure that it is possible.
7. In particular, to provide callback RPC facility, the following are necessary.
i. Providing the server with the client’s handle.
ii. Making the client process wait for the callback RPC.
iii. Handling callback deadlocks.
8. Remote Procedure Call (RPC) provides a different paradigm for accessing network services.

Mais conteúdo relacionado

Mais procurados

1. Overview of Distributed Systems
1. Overview of Distributed Systems1. Overview of Distributed Systems
1. Overview of Distributed Systems
Daminda Herath
 
Intro (Distributed computing)
Intro (Distributed computing)Intro (Distributed computing)
Intro (Distributed computing)
Sri Prasanna
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
shivli0769
 
Chapter 1 -_characterization_of_distributed_systems
Chapter 1 -_characterization_of_distributed_systemsChapter 1 -_characterization_of_distributed_systems
Chapter 1 -_characterization_of_distributed_systems
Francelyno Murela
 

Mais procurados (20)

CSI-503 - 11.Distributed Operating System
CSI-503 - 11.Distributed Operating SystemCSI-503 - 11.Distributed Operating System
CSI-503 - 11.Distributed Operating System
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architecture
 
1. Overview of Distributed Systems
1. Overview of Distributed Systems1. Overview of Distributed Systems
1. Overview of Distributed Systems
 
3. challenges
3. challenges3. challenges
3. challenges
 
Distributed System
Distributed SystemDistributed System
Distributed System
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
01 - Introduction to Distributed Systems
01 - Introduction to Distributed Systems01 - Introduction to Distributed Systems
01 - Introduction to Distributed Systems
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTION
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
 
Distributed Systems - Information Technology
Distributed Systems - Information TechnologyDistributed Systems - Information Technology
Distributed Systems - Information Technology
 
Intro (Distributed computing)
Intro (Distributed computing)Intro (Distributed computing)
Intro (Distributed computing)
 
Aos distibutted system
Aos distibutted systemAos distibutted system
Aos distibutted system
 
Distributed Operating System
Distributed Operating SystemDistributed Operating System
Distributed Operating System
 
HOST AND NETWORK SECURITY by ThesisScientist.com
HOST AND NETWORK SECURITY by ThesisScientist.comHOST AND NETWORK SECURITY by ThesisScientist.com
HOST AND NETWORK SECURITY by ThesisScientist.com
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
 
Distributed systems1
Distributed systems1Distributed systems1
Distributed systems1
 
1.intro. to distributed system
1.intro. to distributed system1.intro. to distributed system
1.intro. to distributed system
 
Chapter 1 -_characterization_of_distributed_systems
Chapter 1 -_characterization_of_distributed_systemsChapter 1 -_characterization_of_distributed_systems
Chapter 1 -_characterization_of_distributed_systems
 
Distributed System - Security
Distributed System - SecurityDistributed System - Security
Distributed System - Security
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 

Semelhante a Distributed system

Semelhante a Distributed system (20)

Distributed system Tanenbaum chapter 1,2,3,4 notes
Distributed system Tanenbaum chapter 1,2,3,4 notes Distributed system Tanenbaum chapter 1,2,3,4 notes
Distributed system Tanenbaum chapter 1,2,3,4 notes
 
Client Server Model and Distributed Computing
Client Server Model and Distributed ComputingClient Server Model and Distributed Computing
Client Server Model and Distributed Computing
 
characteristicsofdistributedsystem-121004123308-phpapp02.ppt
characteristicsofdistributedsystem-121004123308-phpapp02.pptcharacteristicsofdistributedsystem-121004123308-phpapp02.ppt
characteristicsofdistributedsystem-121004123308-phpapp02.ppt
 
DISTRIBUTED SYSTEM 16M.docx
DISTRIBUTED SYSTEM 16M.docxDISTRIBUTED SYSTEM 16M.docx
DISTRIBUTED SYSTEM 16M.docx
 
DISTRIBUTED SYSTEM.docx
DISTRIBUTED SYSTEM.docxDISTRIBUTED SYSTEM.docx
DISTRIBUTED SYSTEM.docx
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Chapter 1-Introduction.ppt
Chapter 1-Introduction.pptChapter 1-Introduction.ppt
Chapter 1-Introduction.ppt
 
CLOUD COMPUTING CHANTI-130 ( FOR THE COMPUTING2).pdf
CLOUD COMPUTING CHANTI-130 ( FOR THE COMPUTING2).pdfCLOUD COMPUTING CHANTI-130 ( FOR THE COMPUTING2).pdf
CLOUD COMPUTING CHANTI-130 ( FOR THE COMPUTING2).pdf
 
Cloud Computing
Cloud Computing Cloud Computing
Cloud Computing
 
paradigms cloud.pptx
paradigms cloud.pptxparadigms cloud.pptx
paradigms cloud.pptx
 
MSB-Distributed systems goals
MSB-Distributed systems goalsMSB-Distributed systems goals
MSB-Distributed systems goals
 
Distributed Systems.pptx
Distributed Systems.pptxDistributed Systems.pptx
Distributed Systems.pptx
 
02 Models of Distribution Systems.pdf
02 Models of Distribution Systems.pdf02 Models of Distribution Systems.pdf
02 Models of Distribution Systems.pdf
 
Distributed System Unit 1 Notes by Dr. Nilam Choudhary, SKIT Jaipur
Distributed System Unit 1 Notes by Dr. Nilam Choudhary, SKIT JaipurDistributed System Unit 1 Notes by Dr. Nilam Choudhary, SKIT Jaipur
Distributed System Unit 1 Notes by Dr. Nilam Choudhary, SKIT Jaipur
 
Distributed system notes unit I
Distributed system notes unit IDistributed system notes unit I
Distributed system notes unit I
 
OS .pptx
OS .pptxOS .pptx
OS .pptx
 
Presentation of ditributed system
Presentation of ditributed systemPresentation of ditributed system
Presentation of ditributed system
 
unit 4-1.pptx
unit 4-1.pptxunit 4-1.pptx
unit 4-1.pptx
 
distributed system chapter one introduction to distribued system.pdf
distributed system chapter one introduction to distribued system.pdfdistributed system chapter one introduction to distribued system.pdf
distributed system chapter one introduction to distribued system.pdf
 
Chapter-1-IntroDistributeddffsfdfsdf-1.pptx
Chapter-1-IntroDistributeddffsfdfsdf-1.pptxChapter-1-IntroDistributeddffsfdfsdf-1.pptx
Chapter-1-IntroDistributeddffsfdfsdf-1.pptx
 

Mais de chirag patil

Mais de chirag patil (20)

Wh Yes-No questions.pptx
Wh Yes-No questions.pptxWh Yes-No questions.pptx
Wh Yes-No questions.pptx
 
joining words not only but also.pptx
joining words not only but also.pptxjoining words not only but also.pptx
joining words not only but also.pptx
 
Basic English Grammar 2.pptx
Basic English Grammar 2.pptxBasic English Grammar 2.pptx
Basic English Grammar 2.pptx
 
Basic English Grammar.pptx
Basic English Grammar.pptxBasic English Grammar.pptx
Basic English Grammar.pptx
 
Maths formulae
Maths formulaeMaths formulae
Maths formulae
 
Input output devices
Input output devicesInput output devices
Input output devices
 
Shortcut keys
Shortcut keysShortcut keys
Shortcut keys
 
Operating system
Operating systemOperating system
Operating system
 
Network topology
Network topologyNetwork topology
Network topology
 
Decimal and binary conversion
Decimal and binary conversionDecimal and binary conversion
Decimal and binary conversion
 
Abbreviations and full forms
Abbreviations and full formsAbbreviations and full forms
Abbreviations and full forms
 
ASCII Code
ASCII CodeASCII Code
ASCII Code
 
Web engineering and Technology
Web engineering and TechnologyWeb engineering and Technology
Web engineering and Technology
 
Web data management
Web data managementWeb data management
Web data management
 
Web application development
Web application developmentWeb application development
Web application development
 
Programming the web
Programming the webProgramming the web
Programming the web
 
Operating System
Operating SystemOperating System
Operating System
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
Computer Graphics and Virtual Reality
Computer Graphics and Virtual RealityComputer Graphics and Virtual Reality
Computer Graphics and Virtual Reality
 
Advanced Database Management Syatem
Advanced Database Management SyatemAdvanced Database Management Syatem
Advanced Database Management Syatem
 

Último

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Último (20)

Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 

Distributed system

  • 1. CHIRAG PATIL DISTRIBUTED SYSTEM Explain distributed system models with diagram. 10M Distributed System Models are as follows: 1. Architectural Models 2. Interaction Models 3. Fault Models 1. Architectural Models Architectural model describes responsibilities distributed between systemcomponents and how are these components placed. A) Client-server model The systemis structured as a set of processes, called servers that offer services to the users, called clients. The client-server model is usually based on a simple request/reply protocol, implemented with send/receive primitives or using remote procedure calls (RPC) or remote method invocation (RMI). The client sends a request (invocation) message to the server asking for some service. The server does the work and returns a result (e.g. the data requested) or an error code if the work could not be performed. A server can itself request services from other servers; thus, in this new relation, the server itself acts like a client.
  • 2. CHIRAG PATIL B) Peer-to-peer model In this model all processes (objects) play similar role. Processes (objects) interact without particular distinction between clients and servers. The pattern of communication depends on the particular application. A large number of data objects are shared; any individual computer holds only a small part of the application database. Processing and communication loads for access to objects are distributed across many computers and access links. This is the most general and flexible model. It distributes shared resources widely and it shares computing and communication loads. Problems with peer-to-peer: High complexity due to cleverly place individual objects Retrieve the objects Maintain potentially large number of replicas. 2. Interaction Model Interaction model are for handling time i. e. for process execution, message delivery, clock drifts etc.
  • 3. CHIRAG PATIL Synchronous distributed systems: Main features: Lower and upper bounds on execution time of processes can be set. Transmitted messages are received within a known bounded time. Drift rates between local clocks have a known bound. Important consequences: In a synchronous distributed systemthere is a notion of global physical time (with a known relative precision depending on the drift rate). Only synchronous distributed systems have a predictable behavior in terms of timing. Only such systems can be used for hard real-time applications. In a synchronous distributed systemit is possible and safe to use timeouts in order to detect failures of a process or communication link. It is difficult and costly to implement synchronous distributed systems. Asynchronous distributed systems: Many distributed systems (including those on the Internet) are asynchronous. - No bound on process execution time (nothing can be assumed about speed, load, and reliability of computers). No bound on message transmission delays (nothing can be assumed about speed, load, and reliability of interconnections) - No bounds on drift rates between local clocks.
  • 4. CHIRAG PATIL Important consequences: In an asynchronous distributed systemthere is no global physical time. Reasoning can be only in terms of logical time (see lecture on time and state). Asynchronous distributed systems are unpredictable in terms of timing. No timeouts can be used. Asynchronous systems are widely and successfully used in practice. In practice timeouts are used with asynchronous systems for failure detection. However, additional measures have to be applied in order to avoid duplicated messages, duplicated execution of operations, etc. 3. Fault Models Failures can occur both in processes and communication channels. The reason can be both software and hardware faults. Fault models are needed in order to build systems with predictable behavior in case of faults (systems which are fault tolerant). Such a system will function according to the predictions, only as long as the real faults behave as defined by the fault model. Compare network and distributed operating system (NOS vs. VOS). No. Network OS Distributed OS 1 A network operating systemis made up A distributed operating systemis an ordinary
  • 5. CHIRAG PATIL of software and associated protocols that allow a set of computer network to be used together. centralized operating system but runs on multiple independent CPUs. 2 In network OS Environment users are aware of multiplicity of machines. In distributed OS Environment users are not aware of multiplicity of machines. 3 Control over file placement is done manually by the user. It can be done automatically by the system itself. 4 Performance is badly affected if certain part of the hardware starts malfunctioning. It is more reliable or fault tolerant i.e. distributed operating systemperforms even if certain part of the hardware starts malfunctioning. 5 Remote resources are accessed by either logging into the desired remote machine or transferring data from the remote machine to user's own machines. Users access remote resources in the same manner as they access local resources. 6 Network OS is used to manage Networked computer systems and create, maintain and transfer files in that Network. Designed to control and optimize operations and resources in distributed system. Discuss different issues in designing distributed system. 10M Issues in designing distributed systems: 1. Heterogeneity: The Internet enables users to access services and run applications over a heterogeneous collection of computers and networks. Internet consists of many different sorts of network their differences are masked by the fact that all of the computers attached to them use the Internet protocols to communicate with one another. For e.g., a computer attached to an Ethernet has an implementation of the Internet protocols over the Ethernet, whereas a computer on a different sort of network will need an implementation of the Internet protocols for that network. 2. Openness: The openness of a computer system is the characteristic that determines whether the system can be extended and re-implemented in various ways.
  • 6. CHIRAG PATIL The openness of distributed systems is determined primarily by the degree to which new resource-sharing services can be added and be made available for use by a variety of client programs. 3. Security: Many of the information resources that are made available and maintained in distributed systems have a high intrinsic value to their users. Their security is therefore of considerable importance. Security for information resources has three components: confidentiality, integrity, and availability. 4. Scalability: Distributed systems operate effectively and efficiently at many different scales, ranging from a small intranet to the Internet. A systemis described as scalable if it will remain effective when there is a significant increase in the number of resources and the number of users. 5. Failure handling: Computer systems sometimes fail. When faults occur in hardware or software, programs may produce incorrect results or may stop before they have completed the intended computation. Failures in a distributed system are partial – that is, some components fail while others continue to function. Therefore the handling of failures is particularly difficult. 6. Concurrency: Both services and applications provide resources that can be shared by clients in a distributed system. There is therefore a possibility that several clients will attempt to access a shared resource at the same time. Object that represents a shared resource in a distributed system must be responsible for ensuring that it operates correctly in a concurrent environment. This applies not only to servers but also to objects in applications. Therefore any programmer who takes an implementation of an object that was not intended for use in a distributed system must do whatever is necessary to make it safe in a concurrent environment.
  • 7. CHIRAG PATIL 7. Transparency: Transparency can be achieved at two different levels. Easiest to do is to hide the distribution from the users. The concept of transparency can be applied to several aspects of a distributed system. a) Location transparency: The users cannot tell where resources are located. b) Migration transparency: Resources can move at will without changing their names. c) Replication transparency: The users cannot tell how many copies exist. d) Concurrency transparency: Multiple users can share resources automatically. e) Parallelismtransparency: Activities can happen in parallel without users knowing. 8. Quality of service: Once users are provided with the functionality that they require of a service, such as the file service in a distributed system, we can go on to ask about the quality of the service provided. The main nonfunctional properties of systems that affect the quality of the service experienced by clients and users are reliability, security and performance. Adaptability to meet changing system configurations and resource availability has been recognized as a further important aspect of service quality. 9. Reliability: One of the original goals of building distributed systems was to make them more reliable than single-processor systems. The idea is that if a machine goes down, some other machine takes over the job. A highly reliable system must be highly available, but that is not enough. Data entrusted to the system must not be lost or garbled in any way, and if files are stored redundantly on multiple servers, all the copies must be kept consistent. In general, the more copies that are kept, the better the availability, but the greater the chance that they will be inconsistent, especially if updates are frequent. 10. Performance: Always the hidden data in the background is the issue of performance.
  • 8. CHIRAG PATIL Building a transparent, flexible, reliable distributed system, more important lies in its performance. In particular, when running a particular application on a distributed system, it should not be appreciably worse than running the same application on a single processor. Unfortunately, achieving this is easier said than done. What are the reasons for migration of code? Explain the various models for code migration. 10M Reasons for migrating code 1. Code migration in DS took place in form of process migration even though it’s costly but reason is for performance. 2. From heavily loaded to lightly loaded performance 3. Due to heterogeneity of platforms and compression network performance improvement through code migration is often based on quantitative reasoning. Eg. Server manages huge database. 4. Code migration also helps improve performance by exploiting parallelism. Eg. For searching information in web. It’s easy to implement search query program that moves from site to site. 5. Other reasons for supporting code migration are flexibility. 6. Traditional approach to building dist. Application is to partition application into different parts and decided where each part to be executed but if code migration between machines, it is possible to dynamically configure distributed system. 7. Communication in distributed systems is concerned with exchanging data between processes. 8. Code migration in the broadest sense deals with moving programs between machines, with the intention to have those programs is executed at the target. 9. In code migration framework, a process consists of 3 segments. 10. The code segment is the part that contains the set of instructions that make up the program that is being executed
  • 9. CHIRAG PATIL 11. The resource segment contains references to external resources needed by the process, such as files, printers, devices, other processes and so on. Various models of code migration: 1) Weak mobility: A characteristics feature of weak mobility is that a transferred program is always started from its initial state. Eg. Java applets 2) Strong mobility A characteristics feature of strong mobility is that a running process can be stopped, subsequently moved to another m/c and then resume execution where it left off. Eg. D’ Agents. 3) Sender initiated migration In sender initiated migration, migration is initiated at the m/c where code currently resides or is being executed. Eg. Sending a search program access the internet to a web database server to perform the queries at that server. What is thread? Advantages of using threads. What are different models of organizing threads? 10M Thread: 1. A thread is a single sequence stream within a process. 2. Threads are also called as lightweight processes. Each thread belongs to exactly one process. 3. Threads are run in parallel to improve performance of application. 4. Each thread has its own CPU state and stack. 5. Each thread has its own thread control block (TCB). 6. There are two types of threads: user level threads and kernel level threads. Advantages of using threads: 1. Performance:
  • 10. CHIRAG PATIL Threads improve the performance of a program. Multiple threads are useful in a multiprocessor system where threads run concurrently on separate processors. 2. Shared Resources: An advantage of using multiple threads over using separate processes is that the former share a single address space, all open files, and other resources. 3. Potential Simplicity: Multiple threads can reduce the complexity of some applications that are inherently suited for threads. 4. Modularity: Programs are often modeled as a number of distinct parts interacting with each other to produce a desired result or service. A program can be implemented as a single, complex entity that performs multiple functions among the different parts of the program. Different models of organizing threads: Three commonly used ways to organize the threads of a process are as follows. 1. Dispatcher-Worker Model: i. In this model, the process consists of single dispatcher threads and multiples worker threads. ii. The dispatcher the request to one of the free worker threads for further processing of the request. iii. Each worker threads work on a different client request. iv. Therefore multiple client requests can be processed in parallel. 2. Team Model : i. In this models, all threads behave as equals in the sense that there is no dispatcher-worker relationship for processing clients requests. ii. Each threads gets and processes clients request on its own. iii. This model is often used for implementing specialized threads within a process. That is, each thread of the process is specialized in servicing a specific type of request.
  • 11. CHIRAG PATIL iv. Therefore, multiples types of requests can be simultaneously handled by the process. 3. Pipeline Model: i. This model is useful for applications based on the producer-consumer model, in which the output data generated by one part of the application is used as input for another part of the application. ii. In this model, the threads of a process are organized as a pipeline so that output data generated by the first thread is used for processing by the second thread; the output of the second thread is used for processing by the third thread, and so on. iii. The output of the last thread in the pipelines is the final output of the process to which the threads belong. Compare process & thread. Explain user level & kernel level threads. What is the need of lightweight threads? No. Process Threads 1 Program in execution called as process. Thread is a part of process. 2 It is heavy weight process. It is light weight process. 3 Process context switch takes more time as compare to thread context switch because it needs interface of operating system. Thread context switch takes less time as compare to process context switch because it needs only interrupt to kernel only. 4 New process creation takes more time as compare to new thread creation. New thread creation takes less time as compare to new process creation. 5 New process termination takes more time as compare to new thread termination. New thread termination takes less time as compare to new process termination. 6 Each process executes same code but has its own memory and file resources. All threads can share same set of open files, child processes. 7 Multiple redundant processes use more resources than multiple threaded processes. Multiple threaded processes use fewer resources than multiple redundant processes. 8 Context switch flushes the MMV (TLB) registers as address space of process changes. No need to flush TLB as address space remains same after context switch because threads belongs to the same process. User level threads: 1. In user level implementation the kernel is unaware of the thread. 2. In this case thread package entirely put in user space.
  • 12. CHIRAG PATIL 3. In user level implementation, all of the work of the thread management is done by the thread package. 4. Thread management include creation and termination of thread, messages and data passing between the threads, scheduling thread for execution, thread synchronization and after context switch saving and restoring thread context etc. Kernel level threads: 1. In this, threads are implemented in operating system’s kernel. 2. The thread management is carried out by kernel. 3. All these thread management activities are carried out in kernel space. So thread context and process context switching becomes same. 4. Kernel threads are generally requires more time to create and manage than the user threads. Need of lightweight threads: Short note on SOA lifecycle. State the advantages of SOA. 10M 1. Service orientation ties together autonomous sources of information bridging a wide range of operating systems, technology and communication process. 2. This service orientation process is an iterative and incremental process. 3. It consists of creating services into larger composing applications and making the outputs available for consumption by the business user. 4. All these phases are driven by the business processes to meet the business experiments. 5. Phases of SOA lifecycle:
  • 13. CHIRAG PATIL These phases are as follows: 1) Expose: i. This phase focuses on creation/extraction of services from existing application and data. ii. Service creation can be time grained or course grained. iii. As services are loosely coupled, they can be. iv. It is also concerned with the implementation of these services. 2) Compose: i. Once services are created, they can be combined into more complex services, applications or business processes. ii. As receives are loosely coupled, they can be combined and reused with maximum flexibility. 3) Consume: i. This phase is concerned with the usage of the already created services by other IT systems or end users. ii. It delivers new, dynamic applications that enable insight into business performance. Advantages of SOA 1) Reusability 2) Interoperability 3) Scalability 4) Flexibility 5) Cost efficiency 6) Coverage existing assets 7) Easier to integrate and manage 8) More responsive and faster time to market 9) Reduce cost and increases reuse
  • 14. CHIRAG PATIL Difference between bully election algorithm and ring based algorithm. 5M N0. Bully election algorithm Ring based algorithm 1 Any process sends a message to the current coordinator in bully election algorithm. Each process only sends messages to the next process in the ring in ring based algorithm. 2 There is no ring forming in this algorithm. All the process forms ring in rig based algorithm. 3 Each node is allocated a numerical unique identifier. The nodes are arranged in a logical ring. 4 In bully algorithm the nodes can communicate with each node. In ring algorithm the nodes can only communicate with our neighbor nodes. 5 Each process has an associated priority. Process priority is obtained by organizing processes into ring. Explain migration in heterogeneous system. 10M 1. Process Migration can be defined as the ability to move a currently executing process between different processors which are connected only by a network. 2. Heterogeneous Process Migration is a technique whereby an active process is moved from one machine to another. 3. Heterogeneous process migration refers to providing valuable features like heterogeneous processing, load balancing and crash tolerance. 4. Migration is the process of moving from the use of one operating environment to another operating environment. 5. The migration process includes making sure the new environments features are exploited, old setting do not requires changes and that current application continue work. 6. Migration in heterogeneous system includes process migration and code migration. 7. Process migration is the important feature of distributed system. 8. Process migration is specialized from the process management whereby processes are moved from one computing environment to other computing environment. 9. The traditional form of process migration is in computer clusters where processes are moved from machine to machine. 10. There are two types of process migration: Non-preemptive process migration and Preemptive process migration. 11. Code migration is costly than process migration.
  • 15. CHIRAG PATIL 12. Performance of code migration is better than process migration so code migration takes place instead of process migration. 13. The code segment is the part that contains the set of instructions that make up the program that is being executed 14. The resource segment contains references to external resources needed by the process, such as files, printers, devices, other processes and so on. 15. In code migration process consists of three segments. 16. Modes of code migration: Weak mobility, Strong mobility, Sender initiated migration. 17. Consider an example, a client-server system in which the server manages a huge database. 18. If a client application needs to do many database operations involving large quantities of data, it may be better to ship part of the client application to the server and send only the results across the network. 19. Otherwise, the network may be swamped with the transfer of data from the server to the client. In this case, code migration is based on the assumption that it generally makes sense to process data close to where those data reside. 20. This same reason can be used for migrating parts of the server to the client. 21. For example, in many interactive database applications, clients need to fill informs that are subsequently translated into a series of database operations. 22. Processing the form at the client side, and sending only the completed form to the server, can sometimes avoid that a relatively large number of small messages need to cross the network. 23. The result is that the client perceives better performance, while at the same time the server spends less time on form processing and communication. 24. Support for code migration can also help improve performance by exploiting Parallelism, but without the usual intricacies related to parallel programming. Compare Stateful and Stateless server implementations. 5M No. Stateful server implementation Stateless server implementation 1 A stateful server remembers client data (state) from one request to the next request. A stateless server keeps no state information. 2 Programming of stateful server is hard as compare to stateless server. Programming of stateless server is easy as compare to stateful server. 3 Crash recovery is difficult in stateful server. Crash recovery is not difficult in stateless server. 4 Stateful server application includes read, Stateless server application includes read
  • 16. CHIRAG PATIL write, open, seek and close operations. and write operations. 5 In stateful implementation client do not have to provide full file information every time they perform an operation. In stateless implementation client must have to provide full file information. 6 Stateful server implementation is more efficient than stateless server implementation. Stateless server implementation is less efficient than stateful server implementation. Components of EJB framework 5M 1. EJB stands for Enterprise Java Beans. 2. EJB technology is a specification framework that supports the development and deployment of java. 3. The framework provides a complete deployment environment and a set of services for developing and executing distributed applications. 4. This enables you to focus on the application logic instead of the application framework required when building server applications. 6. An EJB represents a business object or service, such as a purchase requisition, in a Java application. 7. EJB framework: 8. Components of EJB framework: i. EJB server
  • 17. CHIRAG PATIL ii. EJB client iii. EJB container iv. Enterprise Beans v. Deployment descriptor i. EJB server: 1. The EJB server manages EJB containers. 2. It provides execution environment for server components. 3. It provides the underlying environment for an enterprise bean. 4. It provides access to the basic systemservices required by the Enterprise JavaBeans architecture and any vendor specific features. ii. EJB client: 1. The EJB client and the EJB server communicate using Internet Inter-ORB Protocol (IIOP) or Remote Method Invocation (RMI). 2. It makes use of EJB beans to perform the operations. 3. Client locates the container using Java Naming & Directory Interface (JNDI). 4. Then the client invokes Java Beans machines through container. iii. EJB container: 1. The EJB container acts as the enterprise bean holder that manages the enterprise beans classes and instances. 2. EJB classes are deployed to the EJB container that manages the startup and shutdown of the EJB class instances. 3. The EJB container provides system-level services to the EJB classes through the standard EJB APIs. 4. The EJB server manages the EJB containers and container serves as interface of EJB and Outside World. iv. Enterprise Beans: 1. The enterprise bean is a Java class or collection of classes, provided as a java archive file.
  • 18. CHIRAG PATIL 2. The enterprise bean component takes advantage of the Enterprise JavaBean architecture extending classes aligned with the EJB specifications develops it. 3. Enterprise beans encapsulate business functionalities in an application and it gets security container. 4. Three types of Enterprise Beans: A. Session Beans (Synchronous) B. Message Driven (Asynchronous) C. Entity Beans (Data/Records in DB) v. Deployment descriptor: 1. The deployment descriptor is a file that contains all the information needed by the EJB container at runtime. 2. It lists the bean properties and elements as following: JNDI Name for Bean, Home and Remote Interface, Bean Implementation Class, Environment Variables, Access Rules or Rights, Beans Management, Etc RMI execution 5M 1. The RMI stands for Remote Method Invocation. 2. The RMI is an API that provides a mechanism to create distributed application in java. 3. The RMI allows an object to invoke methods on an object running in another JVM. 4. The RMI provides remote communication between the applications using two objects stub and skeleton. 5. RMI is used for building distributed application. 6. Stub act as a gateway for Client program. 7. Stub resides on Client side and it communicates with Skeleton object. 8. It establishes the connection between remote object and transmit request to the remote object. 9. Skeleton object resides on server program. 10. It is responsible for passing request from Stub to remote object.
  • 19. CHIRAG PATIL 11. Stub and skeleton: 12. Steps involve in creation of RMI application: i. Define a remote interface ii. Implementing remote interface iii. Create and start remote application iv. Create and start client application Which .Net components make .NET platform and language independent? Explain how it works. 5M 1. .NET is Platform Independent because one can download the Standardized Specification of the Microsoft Common Language Infrastructure and write a .NET compiler for a new operating system. 2. Platform independent means making your programs capable of being portable on a new platform. 3. .NET platform is the best solution for the users which are using windows operating system. 4. One can also called “Platform Independence” as “Write Once, Run Anywhere”. 5. Components of .NET platform: i. .NET applications ii. Common Language Runtime (CLR) iii. Windows OS
  • 20. CHIRAG PATIL 6. Common Language Runtime (CLR) component makes .NET platform independent. 7. It is called as heart of the .NET platform and it is also called as .NET runtime. 8. The place of the common language runtime (CLR) is above the windows operating system. 9. It handles garbage collection, Code Access Security (CAS) and all the .NET applications. 10. The common language runtime monitors the execution of .NET applications and provides essential services. 11. It shares a common language runtime and common class library. 12. Explain parameters passing semantics in RPC. 5M Parameters passing semantics in RPC: Passing parameters is typically the only way that RPC-based clients and servers share information. Parameters that are passed by value are very simple to handle. 1. Last-Once Call Semantics: i. This call semantics uses the idea of retransmitting the call message based on timeouts till the caller receives a response. ii. The call execution and result will keep repeating till the result of procedure execution is received by the caller.
  • 21. CHIRAG PATIL iii. The results of the last executed call are used by the caller, therefore it is called as last-one semantics. iv. Last once semantics can be easily achieved only when two nodes are involved in the RPC. 2. May-Be Call Semantics: i. This semantics is the weakest semantics. ii. In this semantics, a timeout mechanism is used to prevent the caller from waiting indefinitely for a response from the callee. iii. The caller waits until a pre-determined timeout period and then continues to execute. iv. This semantics does not guarantee the receipt of call message. v. This semantics is applicable where the response message is less important and applications that operate within a local network with successful transmission of messages. 3. Last-of-Many Call Semantics: i. This semantics neglects orphan calls. Orphan call is one whose caller has expired due to node crash. ii. Unique call identifiers are used to identify each call. iii. A response is accepted only if the call identifier associated with it matches. 4. At-Least-Once Call Semantics: i. This semantics guarantees that the call is executed one or more times. ii. It does not specify which results are returned to the caller. iii. It can be implemented using timeout based retransmission without considering the orphan calls. 5. Exactly-Once Call Semantics: i. Exactly once call semantics is the strongest and the most desirable call semantics. ii. It eliminates the possibility of a procedure being executed more than once irrespective of the number of retransmitted call. iii. The implementation of this semantics is based on the use of timeouts, retransmission, call identifiers with the same identifier for repeated calls and a reply cache associated with the callee.
  • 22. CHIRAG PATIL List types of failure in message passing system and how to overcome them 5M A message passing systemis a subsystemof distributed operating system that provides a set of message based IPC protocol. Message passing systemenables processes to communicate by exchanging messages and allows programs. A message is a block of information. It is formatted by sending process in such a manner that it is meaningful to the receiving process. Failures in message passing system: 1. Loss of request message 2. Loss of response message 3. Unsuccessful execution of the request 1. Loss of request message: This happens due to failure of the communication link between sender and receiver. 2. Loss of response message: This also happens due to failure of the communication link between sender and receiver.
  • 23. CHIRAG PATIL 3. Unsuccessful execution of the request: This happens the receiver’s node crashing while receiving message. Solution to handle failures in message passing system: 1. Four message reliable IPC protocol 2. Three message reliable IPC protocol 3. Two message reliable IPC protocol 1. Four message reliable IPC protocol:
  • 24. CHIRAG PATIL It works as follows: i. A client sends request message to the server. ii. Server sends the acknowledgement message to the client, if acknowledgement message is not received at the client then client retransmits the request message to the server. iii. Server gives reply to client on finishing its processing. iv. After receiving reply from server, client sends acknowledgement message to the server. 2. Three message reliable IPC protocol:
  • 25. CHIRAG PATIL It works as follows: i. A client sends request message to the server. ii. Server gives reply to client on finishing its processing. iii. After receiving reply from server, client sends acknowledgement message to the server. 3. Two message reliable IPC protocol:
  • 26. CHIRAG PATIL It works as follows: i. A client sends request message to the server. ii. Server gives reply to client on finishing its processing. What do you mean by marshalling of arguments and results in RPC? List the actions involved in marshalling. 5M 1. The process of transforming the memory representation of an object to a data format suitable for storage or transmission is called as marshalling of arguments. 2. When data moved between different parts of a computer program or from one program to other program, marshalling is used. 3. Marshalling is similar to serialization. 4. It is used to communicate to remote objects with an object. 5. Marshalling simplifies complex communication using complex objects to communicate. List of the actions involved in marshalling: 1. An application sends an invocation request by calling the associated method, and then control sub object checks the user permissions. Then the request is marshaled and passed on. 2. The replication sub object requests the middleware to set up a secure channel to a suitable replica. 3. The security object initiates a replica lookup. 4. When a suitable replica has been found, the security sub object can set up a secure channel with its peer. 5. Then the request is now passed on to the communication sub object. 6. Then sub object encrypts and signs the request to pass it through the channel. 7. After that the request is decrypted and authenticated. 8. Then the request is simply passed on to the server-side replication sub object. 9. In this case the user certificate is passed to the replica for the authorization. 10. Then the request is un-marshaled. 11. And it ends up with the execute operation.
  • 27. CHIRAG PATIL Note on callback RPC. 5M 1. In the usual RPC protocol, the caller and callee processes have a client – server relationship. 2. RPC is a powerful technique for constructing distributed, client-server based applications. 3. The callback RPC facilitates a peer-to-peer paradigm among the participating processes. 4. It allows a process to be both a client and a server. Callback RPC facility is very useful in certain distributed applications. 5. The server may make several callbacks to the client before returning the result of the initial call to the client process. 6. The ability for a server to call its client back is very important, and care is needed in the design of RPC protocols to ensure that it is possible. 7. In particular, to provide callback RPC facility, the following are necessary. i. Providing the server with the client’s handle. ii. Making the client process wait for the callback RPC. iii. Handling callback deadlocks. 8. Remote Procedure Call (RPC) provides a different paradigm for accessing network services.