Dist_Sys_Unit_1_Notes
Dist_Sys_Unit_1_Notes
users (people or programs) think they are dealing with a single system
Various computers and communications are mostly hidden from the users
Continuous availability
A Distributed system organized as middleware. The middleware layer extends over multiple
machines, and offers each application the same interface
Resource Sharing
Openness
Concurrency
Scalability
Fault Tolerance
Transparency
Resource Sharing
Openness:
Concurrency:
Scalability:
Fault Tolerance:
In a single or multiple systems fail in the hardware or software the network will not
have any problem it can run with no problem.
Transparency:
The Transparency in distributed system should hide the fact that the process &
resource are physically distributed across multiple computers
Uses group of computers that share a common communication problem among them so as to
generate an efficient results in short time span.
i) Cluster Computing:
Grids are usually composed of different types of computers (hard ware, OS, network, security etc.)
Used to keep track of information about application running over the network which are
distributed among various entitles
Focus on database applications - operations on a database are usually carried out in the form
of transactions.
Programming using transactions requires special primitives that must either be supplied by
the underlying distributed system or by the language runtime system.
SUTHOJU GIRIJA RANI, Assistant Professor, CSE, NGIT 1
Example Primitives of Transactions:
Distributed Systems CSE
Exact list of primitives depends on what kinds of objects are being used in the transaction.
e.g. mail system - may be primitives to send, receive, and forward mail.
• e.g. a banking system - a key invariant is the law of conservation of money. After every
internal transfer, the amount of money in the bank must be the same as it was before the
transfer.
Health Care:
Education:
Ex :e-learning,
Transport &logistics:
Environment Management:
– Layered architectures
– Object-based architectures
– Event-based architectures
LAYERED ARCHITECTURES
It separates layers of components from each other giving it a more modular approach just like
OSI model
Each interaction is s sequential where a layer will contact the adjacent layer and this process
continues
OBJECT-BASED ARCHITECTURES
This architecture style is based on loosely coupled arrangement of objects. There is no specific
architecture like layers.
GIRIJA
SUTHOJU Each of the components
RANI, Assistantare objects where
Professor, CSE,each
NGITobjects can interact with a given1 interface
Distributed Systems CSE
Even their could be some direct method calls
DATA-CENTERED ARCHITECTURES
EVENT-BASED ARCHITECTURES
Interceptors
an interceptor is nothing but a software construct that will break the usual flow of control and allow
other (application specific) code to be executed
• These are the systems which can themselves adjust when some thing happens, these
automatically adapt on the account of
– Self configuration
– Self managing
– Self healing
– Self Optimization
• Based on the final output if the accuracy is too low, Back tracking is done by adjusting valves
These explain how distributed systems are actually organized considering where software
components are placed.
Centralized Architecture
Decentralized Architecture
Hybrid Architecture
Client-Server Architecture:
• The most commonly used Architecture which has two major subsystems(Processes)
– Client: This is the first process that issues a request to the second process i.e. server.
– Server: This the second process that receives the request, carries it out and also send a
reply to the client
Application Layering
1.User Interface
2.Process level
3.Data level
Multi tiered Architecture is a client server architecture in which the functions such as
presentation, application processing and data management are physically separated.
Hence by separating now the developer has more flexibility and reusable applications(small
changes can be done easily).
It is the top most level where user can interact with the application
It might me front end of the web page or GUI of application using which a user can
interact/communicate with the other layers
This layer is always user friendly and easy to understand as this layer where end user
communicates with application
Application tier
Here data is stored and retrieved database or file system as the requirements. Then the data
is passed through processing then back to user.
Some of the popular sites who have applied this architecture are: MakeMyTrip.com, Sales
Force enterprise application, Indian Railways – IRCTC, Amazon.com, etc.
Decentralized Architectures
Unlike client server P2P model data not distinguish between client/server, instead of each node can
either a client/server depends on whether the node requesting or providing the service.
• Each object is replicated in several computers to further distribute the load and to provide
residence in the event of disconnection of individual complex
Hybrid Architecture
• Shows the content delivery network how data is transferred from provider to client as per
requirements
• As the content provider is the host (server) gives to all and once data reaches to ISP(also acts
as server) shares to respective client
Execution content
Program Counter(PC)
Stack Pointer(SP)
Data Register
A Process has virtual address space, executable code, open handles system objects, a security
content, a unique identifier, environment variables, a priority class and at last one thread of
execution
A process can have anywhere from just one thread to multiple threads
A thread executes its own piece of code, independently from other threads
A way of process to split it elf into two or more simultaneously running tasks
A thread maintains only the minimum information to allow a CPU to be shared by several
threads
Execution Content :
Program Counter
Stack Pointer
Data Register
Inter process communication is cheap: Can use process memory and may not need to
context switch
Not secure: A thread can write the memory used by other thread
Used to Express communication in the form of multiple logical connections at the same time
An important property of threads that they can provide convenient means of allowing
systems calls without blocking the entire process in which system is running
A Main contribution of threads in distributed systems is that they allow client and server to be
constructed in such that communication and local processing can overlap, resulting high level
of performance
A web browser can start up several threads like one main html file has been fetched , separate
threads can activated to take care of fetching the other parts one each per images on
animations/applets etc..
SUTHOJU GIRIJA RANI, Assistant Professor, CSE, NGIT 2
Distributed Systems CSE
A Multithreaded server organized in a dispatcher/workers model
Single-threaded server
Multi-threaded server
Model - Characteristics
Blocking system calls make programming easier and parallelism improves performance
Single Thread server retains the ease and simplicity of blocking systems but gives up
performance
Finite state machine approach actives high performance through Parallelism and uses
non blocking calls
Hardware virtualization: it means creating virtual machine over existing OS and H/W
Advantages of virtualization
Low cost
1. Application virtualization
2. Network virtualization
3. Desktop virtualization
4. Storage virtualization
1.Application virtualization
The server stores all the personal information and other characteristics of the application but
can still run on local work station through internet. Helps a user to have remote access of an
application from server
2.Network virtualization
The ability to run multiple virtual networks with each has a separate control & data pan.
E.g. : VPN
3.Desktop virtualization
It allows the user OS to remotely stored server and allow control from any device or machine
connected to it
4. Storage virtualization
It is an array of servers that are managed by a virtual storage. We don’t know exactly where
data is stored but we can read it and do any operation on it.
A software agent is an piece of software that functions as an agent for a user or another
program, working autonomously and continuously in a particular environment.
Communicative Yes Can exchange information with uses and other agents
Servers
A separate thread/sub program /process that handles the request and returns result to the
client(no wait parallel execution)
Two operations
wait
Provide service
Types of servers
Iterative server :Server handles request ,then returns results to client, if any new
request must wait for previous request to complete(Also called sequential)
Server states
1.Stateless server:
2.Stateful server:
Improve communication time by shipping code to systems where large data set resides
Client first fetches the necessary software and then invoke server
Migration models
Code segment
Resource segment
Execution segment
Multicast communication
It is way of communication between the process on the sender’s and receiver’s machine, in
term of sending and receiving explicit messages between them
Classification of Communication:
The sender is blocked until its message stored in local buffer at receiver end
Asynchronous communication:
The message is either stored in local buffer or at the first communication server
Persistent communication:
Message that has been submitted is stored by the communication system as long as it
takes to deliver it to receiver
Ex:Mail
Transit Communication
Message are stored as long as sending and receiving applications are running
Ex: Router
Stream Oriented Communication is a form of communication in which timing plays crucial role
SUTHOJU GIRIJA RANI, Assistant Professor, CSE, NGIT 2
Distributed Systems CSE
FEATURES:
Streams in distributed
Stream management
Characteristics
Multicast Communication
RPC is a protocol that one program can use to request a service from a program located in another
computer on a network without having to understand the networks details
A procedure call is also called function call or subroutine call. RPC uses client model
1.The client
5.Server
The client
The client makes a perfectly normal call that invokes a corresponding procedure in the client
stub
On Receipt of a request it packs a requirements into a message and asks to RPC run time to
send
The Server
It executes an appropriate procedure and returns the result from a server stub
It unpacks a call request and make perfectly normal call to invoke appropriate procedure in
the server
On receiving the request a procedure pack will pack it and send to RPC run time
Steps of RPC
RPC protocol:
The Client is bounded to the server and a connection is established between them
IP and UDP are easy to use and fit in well with existing UNIX system and networks the
internet, but downside is performance
Reading a 64k file in a single 64k RPC is mostly more efficient than reading it in 64 1k
RPC’s
Advantages of RPC
The effort of re-write and re- develop the code is minimum in RPC
RPC is the concept that can be implanted in different ways. It is not standard
The RMI is an API that provides a mechanism to create distributed application in java
The RMI provides remote connection between applications using two applications using two
objects stub(client side) and skeleton(server side)
Stub/Skeleton Layer
Transport layer
Stub
RMI uses stub and skeleton object for communication with remote objects
Remote object is an object whose method can be invoked from another JVM
STUB(Client side)
It is the object acts as gateway for the client side, all out going request are routed through it
4
STEPS
Skeleton
STEPS
GOALS OF RMI:
Minimize the difference between working with local and remote objects