SlideShare ist ein Scribd-Unternehmen logo
1 von 79
Downloaden Sie, um offline zu lesen
DISTRIBUTED OPERATING
SYSTEMS
Sandeep Kumar Poonia
Head of Dept. CS/IT
B.E., M.Tech., UGC-NET
LM-IAENG, LM-IACSIT,LM-CSTA, LM-AIRCC, LM-SCIEI, AM-UACEE
DEFINITION OF A DISTRIBUTED SYSTEM
 A distributed system:
 Multiple connected CPUs working together
 A collection of independent computers that
appears to its users as a single coherent
system
 Examples: parallel machines, networked
machines
ADVANTAGES AND DISADVANTAGES
 Advantages
 Communication and resource sharing possible
 Economics – price-performance ratio
 Reliability, scalability
 Potential for incremental growth
 Disadvantages
 Distribution-aware PLs, OSs and applications
 Network connectivity essential
 Security and privacy
TRANSPARENCY IN A DISTRIBUTED SYSTEM
Different forms of transparency in a distributed system.
Transparency Description
Access
Hide differences in data representation and how a resource is
accessed
Location Hide where a resource is located
Migration Hide that a resource may move to another location
Relocation
Hide that a resource may be moved to another location while in
use
Replication User cannot tell how many copies exist
Concurrency Hide that a resource may be shared by several competitive users
Failure Hide the failure and recovery of a resource
Persistence Hide whether a (software) resource is in memory or on disk
SCALABILITY PROBLEMS
Examples of scalability limitations.
Concept Example
Centralized services A single server for all users
Centralized data A single on-line telephone book
Centralized algorithms Doing routing based on complete information
HARDWARE CONCEPTS: MULTIPROCESSORS (1)
 Multiprocessor dimensions
 Memory: could be shared or be private to each CPU
 Interconnect: could be shared (bus-based) or switched
 A bus-based multiprocessor.
MULTIPROCESSORS (2)
a) A crossbar switch b) An omega switching
network
1.8
DISTRIBUTED SYSTEMS MODELS
 Minicomputer model (e.g., early networks)
 Each user has local machine
 Local processing but can fetch remote data (files, databases)
 Workstation model (e.g., Sprite)
 Processing can also migrate
 Client-server Model (e.g., V system, world wide web)
 User has local workstation
 Powerful workstations serve as servers (file, print, DB servers)
 Processor pool model (e.g., Amoeba, Plan 9)
 Terminals are Xterms or diskless terminals
 Pool of backend processors handle processing
UNIPROCESSOR OPERATING SYSTEMS
 An OS acts as a resource manager or an arbitrator
 Manages CPU, I/O devices, memory
 OS provides a virtual interface that is easier to use
than hardware
 Structure of uniprocessor operating systems
 Monolithic (e.g., MS-DOS, early UNIX)
 One large kernel that handles everything
 Layered design
 Functionality is decomposed into N layers
 Each layer uses services of layer N-1 and implements
new service(s) for layer N+1
UNIPROCESSOR OPERATING SYSTEMS
Microkernel architecture
• Small kernel
• user-level servers implement additional functionality
DISTRIBUTED OPERATING SYSTEM
 Manages resources in a distributed system
 Seamlessly and transparently to the user
 Looks to the user like a centralized OS
 But operates on multiple independent CPUs
 Provides transparency
 Location, migration, concurrency, replication,…
 Presents users with a virtual uniprocessor
DOS: CHARACTERISTICS (1)
 Distributed Operating Systems
 Allows a multiprocessor or multicomputer network
resources to be integrated as a single system image
 Hide and manage hardware and software resources
 provides transparency support
 provide heterogeneity support
 control network in most effective way
 consists of low level commands + local operating systems +
distributed features
 Inter-process communication (IPC)
DOS: CHARACTERISTICS (2)
 remote file and device access
 global addressing and naming
 trading and naming services
 synchronization and deadlock avoidance
 resource allocation and protection
 global resource sharing
 deadlock avoidance
 communication security
 no examples in general use but many research systems:
Amoeba, Chorus etc.
TYPES OF DISTRIBUTED OS
System Description Main Goal
DOS
Tightly-coupled operating system for multi-
processors and homogeneous multicomputers
Hide and manage
hardware resources
NOS
Loosely-coupled operating system for
heterogeneous multicomputers (LAN and WAN)
Offer local services
to remote clients
Middleware
Additional layer atop of NOS implementing general-
purpose services
Provide distribution
transparency
MULTIPROCESSOR OPERATING SYSTEMS
 Like a uniprocessor operating system
 Manages multiple CPUs transparently to the
user
 Each processor has its own hardware cache
 Maintain consistency of cached data
MULTICOMPUTER OPERATING SYSTEMS
1.14
NETWORK OPERATING SYSTEM
1-19
NETWORK OPERATING SYSTEM
 Employs a client-server model
 Minimal OS kernel
 Additional functionality as user processes
MIDDLEWARE-BASED SYSTEMS
 General structure of a distributed system as middleware.
1-22
MIDDLEWARE EXAMPLES
 Examples: Sun RPC, CORBA, DCOM, Java RMI (distributed
object technology)
 Built on top of transport layer in the ISO/OSI 7 layer reference
model: application (protocol), presentation (semantic), session
(dialogue), transport (e.g. TCP or UDP), network (IP, ATM etc),
data link (frames, checksum), physical (bits and bytes)
 Most are implemented over the internet protocols
 Masks heterogeneity of underlying networks, hardware,
operating system and programming languages – so provides a
uniform programming model with standard services
 3 types of middleware:
 transaction oriented (for distributed database applications)
 message oriented (for reliable asynchronous communication)
 remote procedure calls (RPC) – the original OO middleware
COMPARISON BETWEEN SYSTEMS
Item
Distributed OS
Network OS
Middleware-
based OS
Multiproc. Multicomp.
Degree of transparency Very High High Low High
Same OS on all nodes Yes Yes No No
Number of copies of OS 1 N N N
Basis for communication
Shared
memory
Messages Files Model specific
Resource management
Global,
central
Global,
distributed
Per node Per node
Scalability No Moderately Yes Varies
Openness Closed Closed Open Open
COMMUNICATION IN DISTRIBUTED SYSTEMS
 Issues in communication
 Message-oriented Communication
 Remote Procedure Calls
 Transparency but poor for passing references
 Remote Method Invocation
 RMIs are essentially RPCs but specific to remote
objects
 System wide references passed as parameters
 Stream-oriented Communication
TYPES OF COMMUNICATION
Message passing is the general basis of
communication in a distributed system: transferring a
set of data from a sender to a receiver.
COMMUNICATION BETWEEN PROCESSES
 Unstructured communication
 Use shared memory or shared data structures
 Structured communication
 Use explicit messages (IPCs)
 Distributed Systems: both need low-level
communication support
COMMUNICATION PROTOCOLS
 Protocols are agreements/rules on communication
 Protocols could be connection-oriented or connectionless
2-1
LAYERED PROTOCOLS
 A typical message as it appears on the network.
2-2
Physical layer
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.
PHYSICAL LAYER
Provides physical interface for transmission of information.
Defines rules by which bits are passed from one system to
another on a physical communication medium.
Covers all - mechanical, electrical, functional and
procedural - aspects for physical communication.
Such characteristics as voltage levels, timing of voltage
changes, physical data rates, maximum transmission
distances, physical connectors, and other similar attributes
are defined by physical layer specifications.
OSI Model
Data link layer
The data link layer is responsible for moving
frames from one hop (node) to the next and perform error
detection and correction
DATA LINK LAYER
Data link layer attempts to provide reliable communication
over the physical layer interface.
Breaks the outgoing data into frames and reassemble the
received frames.
Create and detect frame boundaries.
Handle errors by implementing an acknowledgement and
retransmission scheme.
Implement flow control.
Supports points-to-point as well as broadcast
communication.
Supports simplex, half-duplex or full-duplex communication.
OSI Model
DATA LINK LAYER
Network layer
The network layer is responsible for the
delivery of individual packets from
the source host to the destination host.
Protocols: X.25Connection oriented
IP  Connection Less
NETWORK LAYER
Implements routing of frames (packets) through the
network.
Defines the most optimum path the packet should take
from the source to the destination
Defines logical addressing so that any endpoint can be
identified.
Handles congestion in the network.
Facilitates interconnection between heterogeneous
networks (Internetworking).
The network layer also defines how to fragment a packet
into smaller packets to accommodate different media.
OSI Model
Source-to-destination delivery
Transport layer
The transport layer is responsible for the delivery
of a message from one process to another.
Protocols: TCP Connection oriented
UDP  Connection Less
TRANSPORT LAYER
Purpose of this layer is to provide a reliable mechanism for
the exchange of data between two processes in different
computers.
Ensures that the data units are delivered error free.
Ensures that data units are delivered in sequence.
Ensures that there is no loss or duplication of data units.
Provides connectionless or connection oriented service.
Provides for the connection management.
Multiplex multiple connection over a single channel.
OSI Model
Reliable process-to-process delivery of a message
Session layer
The session layer is responsible for dialog
control and synchronization.
SESSION LAYER
Session layer provides mechanism for controlling the dialogue
between the two end systems. It defines how to start, control
and end conversations (called sessions) between applications.
This layer requests for a logical connection to be established on
an end-user’s request.
Any necessary log-on or password validation is also handled by
this layer.
Session layer is also responsible for terminating the connection.
This layer provides services like dialogue discipline which can be
full duplex or half duplex.
Session layer can also provide check-pointing mechanism such
that if a failure of some sort occurs between checkpoints, all
data can be retransmitted from the last checkpoint.
OSI Model
Presentation layer
The presentation layer is responsible for translation,
compression, and encryption.
PRESENTATION LAYER
Presentation layer defines the format in which the data is to
be exchanged between the two communicating entities.
Also handles data compression and data encryption
(cryptography).
OSI Model
Application layer
The application layer is responsible for
providing services to the user.
APPLICATION LAYER
Application layer interacts with application programs and is
the highest level of OSI model.
Application layer contains management functions to
support distributed applications.
Examples of application layer are applications such as file
transfer, electronic mail, remote login etc.
OSI Model
Summary of layers
MIDDLEWARE PROTOCOLS
 Middleware: layer that resides between an OS and an application
 May implement general-purpose protocols that warrant their own layers
 Example: distributed commit
2-5
CLIENT-SERVER COMMUNICATION MODEL
 Structure: group of servers offering service to
clients
 Based on a request/response paradigm
 Techniques:
 Socket, remote procedure calls (RPC), Remote
Method Invocation (RMI)
kernel
client
kernel kernel kernel
file
server
process
server
terminal
server
ISSUES IN CLIENT-SERVER COMMUNICATION
 Addressing
 Blocking versus non-blocking
 Buffered versus unbuffered
 Reliable versus unreliable
 Server architecture: concurrent versus
sequential
 Scalability
ADDRESSING ISSUES
Question: how is the server
located?
Hard-wired address
 Machine address and process
address are known a priori
Broadcast-based
 Server chooses address from a
sparse address space
 Client broadcasts request
 Can cache response for future
Locate address via name
server
user server
user server
user serverNS
BLOCKING VERSUS NON-BLOCKING
 Blocking communication (synchronous)
 Send blocks until message is actually sent
 Receive blocks until message is actually received
 Non-blocking communication (asynchronous)
 Send returns immediately
 Return does not block either
BUFFERING ISSUES
 Unbuffered
communication
 Server must call receive
before client can call send
 Buffered communication
 Client send to a mailbox
 Server receives from a
mailbox
user server
user server
RELIABILITY
 Unreliable channel
 Need acknowledgements (ACKs)
 Applications handle ACKs
 ACKs for both request and reply
 Reliable channel
 Reply acts as ACK for request
 Explicit ACK for response
 Reliable communication on
unreliable channels
 Transport protocol handles lost
messages
request
ACK
reply
ACK
User
Server
request
reply
ACK
User
Server
SERVER ARCHITECTURE
 Sequential
 Serve one request at a time
 Can service multiple requests by employing events and
asynchronous communication
 Concurrent
 Server spawns a process or thread to service each request
 Can also use a pre-spawned pool of threads/processes
(apache)
 Thus servers could be
 Pure-sequential, event-based, thread-based, process-based
 Discussion: which architecture is most efficient?
SCALABILITY
 Question:How can you scale the server
capacity?
 Buy bigger machine!
 Replicate
 Distribute data and/or algorithms
 Ship code instead of data
 Cache
TO PUSH OR PULL ?
 Client-pull architecture
 Clients pull data from servers (by sending requests)
 Example: HTTP
 Pro: stateless servers, failures are each to handle
 Con: limited scalability
 Server-push architecture
 Servers push data to client
 Example: video streaming, stock tickers
 Pro: more scalable, Con: stateful servers, less resilient to
failure
 When/how-often to push or pull?
GROUP COMMUNICATION
 One-to-many communication: useful for
distributed applications
 Issues:
 Group characteristics:
 Static/dynamic, open/closed
 Group addressing
 Multicast, broadcast, application-level multicast (unicast)
 Atomicity
 Message ordering
 Scalability
PUTTING IT ALL TOGETHER: EMAIL
 User uses mail client to compose a message
 Mail client connects to mail server
 Mail server looks up address to destination
mail server
 Mail server sets up a connection and passes
the mail to destination mail server
 Destination stores mail in input buffer (user
mailbox)
 Recipient checks mail at a later time
EMAIL: DESIGN CONSIDERATIONS
 Structured or unstructured?
 Addressing?
 Blocking/non-blocking?
 Buffered or unbuffered?
 Reliable or unreliable?
 Server architecture
 Scalability
 Push or pull?
 Group communication
REMOTE PROCEDURE CALLS
 Goal: Make distributed computing look like centralized
computing
 Allow remote services to be called as procedures
 Transparency with regard to location, implementation,
language
 Issues
 How to pass parameters
 Bindings
 Semantics in face of errors
 Two classes: integrated into prog, language and
separate
CONVENTIONAL PROCEDURE CALL
a) Parameter passing in a local
procedure call: the stack before the
call to read
b) The stack while the called procedure is
active
PARAMETER PASSING
 Local procedure parameter passing
 Call-by-value
 Call-by-reference: arrays, complex data structures
 Remote procedure calls simulate this through:
 Stubs – proxies
 Flattening – marshalling
 Related issue: global variables are not allowed
in RPCs
CLIENT AND SERVER STUBS
 Principle of RPC between a client and server program.
STUBS
 Client makes procedure call (just like a local
procedure call) to the client stub
 Server is written as a standard procedure
 Stubs take care of packaging arguments and
sending messages
 Packaging parameters is called marshalling
 Stub compiler generates stub automatically
from specs in an Interface Definition Language
(IDL)
 Simplifies programmer task
STEPS OF A REMOTE PROCEDURE CALL
1. Client procedure calls client stub in normal way
2. Client stub builds message, calls local OS
3. Client's OS sends message to remote OS
4. Remote OS gives message to server stub
5. Server stub unpacks parameters, calls server
6. Server does work, returns result to the stub
7. Server stub packs it in message, calls local OS
8. Server's OS sends message to client's OS
9. Client's OS gives message to client stub
10. Stub unpacks result, returns to client
EXAMPLE OF AN RPC
2-8
MARSHALLING
 Problem: different machines have different data formats
 Intel: little endian, SPARC: big endian
 Solution: use a standard representation
 Example: external data representation (XDR)
 Problem: how do we pass pointers?
 If it points to a well-defined data structure, pass a copy and the server
stub passes a pointer to the local copy
 What about data structures containing pointers?
 Prohibit
 Chase pointers over network
 Marshalling: transform parameters/results into a byte stream
BINDING
 Problem: how does a client locate a server?
 Use Bindings
 Server
 Export server interface during initialization
 Send name, version no, unique identifier, handle (address)
to binder
 Client
 First RPC: send message to binder to import server interface
 Binder: check to see if server has exported interface
 Return handle and unique identifier to client
BINDING: COMMENTS
 Exporting and importing incurs overheads
 Binder can be a bottleneck
 Use multiple binders
 Binder can do load balancing
FAILURE SEMANTICS
 Client unable to locate server: return error
 Lost request messages: simple timeout mechanisms
 Lost replies: timeout mechanisms
 Make operation idempotent
 Use sequence numbers, mark retransmissions
 Server failures: did failure occur before or after
operation?
 At least once semantics (SUNRPC)
 At most once
 No guarantee
 Exactly once: desirable but difficult to achieve
FAILURE SEMANTICS
 Client failure: what happens to the server
computation?
 Referred to as an orphan
 Extermination: log at client stub and explicitly kill orphans
 Overhead of maintaining disk logs
 Reincarnation: Divide time into epochs between failures
and delete computations from old epochs
 Gentle reincarnation: upon a new epoch broadcast, try to
locate owner first (delete only if no owner)
 Expiration: give each RPC a fixed quantum T; explicitly
request extensions
 Periodic checks with client during long computations
IMPLEMENTATION ISSUES
 Choice of protocol [affects communication costs]
 Use existing protocol (UDP) or design from scratch
 Packet size restrictions
 Reliability in case of multiple packet messages
 Flow control
 Copying costs are dominant overheads
 Need at least 2 copies per message
 From client to NIC and from server NIC to server
 As many as 7 copies
 Stack in stub – message buffer in stub – kernel – NIC – medium –
NIC – kernel – stub – server
 Scatter-gather operations can reduce overheads
CASE STUDY: SUNRPC
 One of the most widely used RPC systems
 Developed for use with NFS
 Built on top of UDP or TCP
 TCP: stream is divided into records
 UDP: max packet size < 8912 bytes
 UDP: timeout plus limited number of retransmissions
 TCP: return error if connection is terminated by server
 Multiple arguments marshaled into a single structure
 At-least-once semantics if reply received, at-least-zero
semantics if no reply. With UDP tries at-most-once
 Use SUN’s eXternal Data Representation (XDR)
 Big endian order for 32 bit integers, handle arbitrarily large data
structures
BINDER: PORT MAPPER
Server start-up: create port
Server stub calls svc_register
to register prog. #, version #
with local port mapper
Port mapper stores prog #,
version #, and port
Client start-up: call
clnt_create to locate server
port
Upon return, client can call
procedures at the server
RPCGEN: GENERATING STUBS
 Q_xdr.c: do XDR conversion
 Detailed example: later in this course
SUMMARY
 RPCs make distributed computations look like
local computations
 Issues:
 Parameter passing
 Binding
 Failure handling
 Case Study: SUN RPC

Weitere ähnliche Inhalte

Was ist angesagt?

Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented CommunicationDilum Bandara
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmBushra M
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systemssumitjain2013
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systemskaran2190
 
Distributed file system
Distributed file systemDistributed file system
Distributed file systemAnamika Singh
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemorySHIKHA GAUTAM
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactionsNilu Desai
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
Client Centric Consistency Model
Client Centric Consistency ModelClient Centric Consistency Model
Client Centric Consistency ModelRajat Kumar
 
Election algorithms
Election algorithmsElection algorithms
Election algorithmsAnkush Kumar
 

Was ist angesagt? (20)

Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
 
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
 
Stream oriented communication
Stream oriented communicationStream oriented communication
Stream oriented communication
 
Transport layer
Transport layer Transport layer
Transport layer
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Data link layer
Data link layer Data link layer
Data link layer
 
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared MemoryAgreement Protocols, distributed File Systems, Distributed Shared Memory
Agreement Protocols, distributed File Systems, Distributed Shared Memory
 
Distributed Coordination-Based Systems
Distributed Coordination-Based SystemsDistributed Coordination-Based Systems
Distributed Coordination-Based Systems
 
Congestion control
Congestion controlCongestion control
Congestion control
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactions
 
Resource management
Resource managementResource management
Resource management
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Client Centric Consistency Model
Client Centric Consistency ModelClient Centric Consistency Model
Client Centric Consistency Model
 
Election algorithms
Election algorithmsElection algorithms
Election algorithms
 
Distributed System ppt
Distributed System pptDistributed System ppt
Distributed System ppt
 

Andere mochten auch

Amoeba Operating System
Amoeba Operating SystemAmoeba Operating System
Amoeba Operating SystemBurhan Abbasi
 
07 software design
07   software design07   software design
07 software designkebsterz
 
Distributed operating system amoeba case study
Distributed operating system  amoeba case studyDistributed operating system  amoeba case study
Distributed operating system amoeba case studyRamuAryan
 
Top down reading activities
Top down reading activitiesTop down reading activities
Top down reading activitiesSumi Waan
 
Comparison of Amoeba, Mach & Chorus: DOS
Comparison of Amoeba, Mach & Chorus: DOSComparison of Amoeba, Mach & Chorus: DOS
Comparison of Amoeba, Mach & Chorus: DOSEr. Shiva K. Shrestha
 
Top Down and Bottom Up Design Model
Top Down and Bottom Up Design ModelTop Down and Bottom Up Design Model
Top Down and Bottom Up Design ModelAbdul Rahman Sherzad
 
Three Reading Models
Three Reading ModelsThree Reading Models
Three Reading ModelsAntonette A.
 

Andere mochten auch (11)

Top down design
Top down designTop down design
Top down design
 
Amoeba Operating System
Amoeba Operating SystemAmoeba Operating System
Amoeba Operating System
 
Amoeba
AmoebaAmoeba
Amoeba
 
Amoeba
AmoebaAmoeba
Amoeba
 
07 software design
07   software design07   software design
07 software design
 
Distributed operating system amoeba case study
Distributed operating system  amoeba case studyDistributed operating system  amoeba case study
Distributed operating system amoeba case study
 
Top down reading activities
Top down reading activitiesTop down reading activities
Top down reading activities
 
Comparison of Amoeba, Mach & Chorus: DOS
Comparison of Amoeba, Mach & Chorus: DOSComparison of Amoeba, Mach & Chorus: DOS
Comparison of Amoeba, Mach & Chorus: DOS
 
Bottom up & top down tutorial 2
Bottom up & top down tutorial 2Bottom up & top down tutorial 2
Bottom up & top down tutorial 2
 
Top Down and Bottom Up Design Model
Top Down and Bottom Up Design ModelTop Down and Bottom Up Design Model
Top Down and Bottom Up Design Model
 
Three Reading Models
Three Reading ModelsThree Reading Models
Three Reading Models
 

Ähnlich wie Distributed Operating System_4

Ähnlich wie Distributed Operating System_4 (20)

istributed system
istributed systemistributed system
istributed system
 
Chapter 1-Introduction.ppt
Chapter 1-Introduction.pptChapter 1-Introduction.ppt
Chapter 1-Introduction.ppt
 
Chapter 1-Introduction.ppt
Chapter 1-Introduction.pptChapter 1-Introduction.ppt
Chapter 1-Introduction.ppt
 
Distributed OS - An Introduction
Distributed OS - An IntroductionDistributed OS - An Introduction
Distributed OS - An Introduction
 
Chapter 1 introduction
Chapter 1 introductionChapter 1 introduction
Chapter 1 introduction
 
Chapter One.ppt
Chapter One.pptChapter One.ppt
Chapter One.ppt
 
Chap 01
Chap 01Chap 01
Chap 01
 
Chap 01
Chap 01Chap 01
Chap 01
 
Chapter 1_NG_2020.ppt
Chapter 1_NG_2020.pptChapter 1_NG_2020.ppt
Chapter 1_NG_2020.ppt
 
Internetworking
InternetworkingInternetworking
Internetworking
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed Systems.pptx
Distributed Systems.pptxDistributed Systems.pptx
Distributed Systems.pptx
 
Basic concept of networking
Basic concept of networkingBasic concept of networking
Basic concept of networking
 
1658897215230.pdf
1658897215230.pdf1658897215230.pdf
1658897215230.pdf
 
unit-1fon (1).pptx
unit-1fon (1).pptxunit-1fon (1).pptx
unit-1fon (1).pptx
 
IMD 251 - Networking
IMD 251 - NetworkingIMD 251 - Networking
IMD 251 - Networking
 
OSI MODEL
OSI MODELOSI MODEL
OSI MODEL
 
Distributed os
Distributed osDistributed os
Distributed os
 
Osi model
Osi modelOsi model
Osi model
 
Lecture2
Lecture2Lecture2
Lecture2
 

Mehr von Dr Sandeep Kumar Poonia

An improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmAn improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmDr Sandeep Kumar Poonia
 
Modified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmModified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmDr Sandeep Kumar Poonia
 
Enhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmEnhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmDr Sandeep Kumar Poonia
 
Memetic search in differential evolution algorithm
Memetic search in differential evolution algorithmMemetic search in differential evolution algorithm
Memetic search in differential evolution algorithmDr Sandeep Kumar Poonia
 
Improved onlooker bee phase in artificial bee colony algorithm
Improved onlooker bee phase in artificial bee colony algorithmImproved onlooker bee phase in artificial bee colony algorithm
Improved onlooker bee phase in artificial bee colony algorithmDr Sandeep Kumar Poonia
 
Comparative study of_hybrids_of_artificial_bee_colony_algorithm
Comparative study of_hybrids_of_artificial_bee_colony_algorithmComparative study of_hybrids_of_artificial_bee_colony_algorithm
Comparative study of_hybrids_of_artificial_bee_colony_algorithmDr Sandeep Kumar Poonia
 
A novel hybrid crossover based abc algorithm
A novel hybrid crossover based abc algorithmA novel hybrid crossover based abc algorithm
A novel hybrid crossover based abc algorithmDr Sandeep Kumar Poonia
 
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked listsMultiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked listsDr Sandeep Kumar Poonia
 
Sunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmSunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmDr Sandeep Kumar Poonia
 
New Local Search Strategy in Artificial Bee Colony Algorithm
New Local Search Strategy in Artificial Bee Colony Algorithm New Local Search Strategy in Artificial Bee Colony Algorithm
New Local Search Strategy in Artificial Bee Colony Algorithm Dr Sandeep Kumar Poonia
 
Performance evaluation of different routing protocols in wsn using different ...
Performance evaluation of different routing protocols in wsn using different ...Performance evaluation of different routing protocols in wsn using different ...
Performance evaluation of different routing protocols in wsn using different ...Dr Sandeep Kumar Poonia
 
Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Dr Sandeep Kumar Poonia
 

Mehr von Dr Sandeep Kumar Poonia (20)

Soft computing
Soft computingSoft computing
Soft computing
 
An improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmAn improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithm
 
Modified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmModified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithm
 
Enhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmEnhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithm
 
RMABC
RMABCRMABC
RMABC
 
Memetic search in differential evolution algorithm
Memetic search in differential evolution algorithmMemetic search in differential evolution algorithm
Memetic search in differential evolution algorithm
 
Improved onlooker bee phase in artificial bee colony algorithm
Improved onlooker bee phase in artificial bee colony algorithmImproved onlooker bee phase in artificial bee colony algorithm
Improved onlooker bee phase in artificial bee colony algorithm
 
Comparative study of_hybrids_of_artificial_bee_colony_algorithm
Comparative study of_hybrids_of_artificial_bee_colony_algorithmComparative study of_hybrids_of_artificial_bee_colony_algorithm
Comparative study of_hybrids_of_artificial_bee_colony_algorithm
 
A novel hybrid crossover based abc algorithm
A novel hybrid crossover based abc algorithmA novel hybrid crossover based abc algorithm
A novel hybrid crossover based abc algorithm
 
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked listsMultiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
 
Sunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmSunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithm
 
New Local Search Strategy in Artificial Bee Colony Algorithm
New Local Search Strategy in Artificial Bee Colony Algorithm New Local Search Strategy in Artificial Bee Colony Algorithm
New Local Search Strategy in Artificial Bee Colony Algorithm
 
A new approach of program slicing
A new approach of program slicingA new approach of program slicing
A new approach of program slicing
 
Performance evaluation of different routing protocols in wsn using different ...
Performance evaluation of different routing protocols in wsn using different ...Performance evaluation of different routing protocols in wsn using different ...
Performance evaluation of different routing protocols in wsn using different ...
 
Enhanced abc algo for tsp
Enhanced abc algo for tspEnhanced abc algo for tsp
Enhanced abc algo for tsp
 
Database aggregation using metadata
Database aggregation using metadataDatabase aggregation using metadata
Database aggregation using metadata
 
Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...
 
Lecture28 tsp
Lecture28 tspLecture28 tsp
Lecture28 tsp
 
Lecture27 linear programming
Lecture27 linear programmingLecture27 linear programming
Lecture27 linear programming
 
Lecture26
Lecture26Lecture26
Lecture26
 

Kürzlich hochgeladen

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 

Kürzlich hochgeladen (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

Distributed Operating System_4

  • 1. DISTRIBUTED OPERATING SYSTEMS Sandeep Kumar Poonia Head of Dept. CS/IT B.E., M.Tech., UGC-NET LM-IAENG, LM-IACSIT,LM-CSTA, LM-AIRCC, LM-SCIEI, AM-UACEE
  • 2. DEFINITION OF A DISTRIBUTED SYSTEM  A distributed system:  Multiple connected CPUs working together  A collection of independent computers that appears to its users as a single coherent system  Examples: parallel machines, networked machines
  • 3. ADVANTAGES AND DISADVANTAGES  Advantages  Communication and resource sharing possible  Economics – price-performance ratio  Reliability, scalability  Potential for incremental growth  Disadvantages  Distribution-aware PLs, OSs and applications  Network connectivity essential  Security and privacy
  • 4. TRANSPARENCY IN A DISTRIBUTED SYSTEM Different forms of transparency in a distributed system. Transparency Description Access Hide differences in data representation and how a resource is accessed Location Hide where a resource is located Migration Hide that a resource may move to another location Relocation Hide that a resource may be moved to another location while in use Replication User cannot tell how many copies exist Concurrency Hide that a resource may be shared by several competitive users Failure Hide the failure and recovery of a resource Persistence Hide whether a (software) resource is in memory or on disk
  • 5.
  • 6. SCALABILITY PROBLEMS Examples of scalability limitations. Concept Example Centralized services A single server for all users Centralized data A single on-line telephone book Centralized algorithms Doing routing based on complete information
  • 7. HARDWARE CONCEPTS: MULTIPROCESSORS (1)  Multiprocessor dimensions  Memory: could be shared or be private to each CPU  Interconnect: could be shared (bus-based) or switched  A bus-based multiprocessor.
  • 8. MULTIPROCESSORS (2) a) A crossbar switch b) An omega switching network 1.8
  • 9. DISTRIBUTED SYSTEMS MODELS  Minicomputer model (e.g., early networks)  Each user has local machine  Local processing but can fetch remote data (files, databases)  Workstation model (e.g., Sprite)  Processing can also migrate  Client-server Model (e.g., V system, world wide web)  User has local workstation  Powerful workstations serve as servers (file, print, DB servers)  Processor pool model (e.g., Amoeba, Plan 9)  Terminals are Xterms or diskless terminals  Pool of backend processors handle processing
  • 10. UNIPROCESSOR OPERATING SYSTEMS  An OS acts as a resource manager or an arbitrator  Manages CPU, I/O devices, memory  OS provides a virtual interface that is easier to use than hardware  Structure of uniprocessor operating systems  Monolithic (e.g., MS-DOS, early UNIX)  One large kernel that handles everything  Layered design  Functionality is decomposed into N layers  Each layer uses services of layer N-1 and implements new service(s) for layer N+1
  • 11. UNIPROCESSOR OPERATING SYSTEMS Microkernel architecture • Small kernel • user-level servers implement additional functionality
  • 12. DISTRIBUTED OPERATING SYSTEM  Manages resources in a distributed system  Seamlessly and transparently to the user  Looks to the user like a centralized OS  But operates on multiple independent CPUs  Provides transparency  Location, migration, concurrency, replication,…  Presents users with a virtual uniprocessor
  • 13. DOS: CHARACTERISTICS (1)  Distributed Operating Systems  Allows a multiprocessor or multicomputer network resources to be integrated as a single system image  Hide and manage hardware and software resources  provides transparency support  provide heterogeneity support  control network in most effective way  consists of low level commands + local operating systems + distributed features  Inter-process communication (IPC)
  • 14. DOS: CHARACTERISTICS (2)  remote file and device access  global addressing and naming  trading and naming services  synchronization and deadlock avoidance  resource allocation and protection  global resource sharing  deadlock avoidance  communication security  no examples in general use but many research systems: Amoeba, Chorus etc.
  • 15. TYPES OF DISTRIBUTED OS System Description Main Goal DOS Tightly-coupled operating system for multi- processors and homogeneous multicomputers Hide and manage hardware resources NOS Loosely-coupled operating system for heterogeneous multicomputers (LAN and WAN) Offer local services to remote clients Middleware Additional layer atop of NOS implementing general- purpose services Provide distribution transparency
  • 16. MULTIPROCESSOR OPERATING SYSTEMS  Like a uniprocessor operating system  Manages multiple CPUs transparently to the user  Each processor has its own hardware cache  Maintain consistency of cached data
  • 19. NETWORK OPERATING SYSTEM  Employs a client-server model  Minimal OS kernel  Additional functionality as user processes
  • 20. MIDDLEWARE-BASED SYSTEMS  General structure of a distributed system as middleware. 1-22
  • 21. MIDDLEWARE EXAMPLES  Examples: Sun RPC, CORBA, DCOM, Java RMI (distributed object technology)  Built on top of transport layer in the ISO/OSI 7 layer reference model: application (protocol), presentation (semantic), session (dialogue), transport (e.g. TCP or UDP), network (IP, ATM etc), data link (frames, checksum), physical (bits and bytes)  Most are implemented over the internet protocols  Masks heterogeneity of underlying networks, hardware, operating system and programming languages – so provides a uniform programming model with standard services  3 types of middleware:  transaction oriented (for distributed database applications)  message oriented (for reliable asynchronous communication)  remote procedure calls (RPC) – the original OO middleware
  • 22. COMPARISON BETWEEN SYSTEMS Item Distributed OS Network OS Middleware- based OS Multiproc. Multicomp. Degree of transparency Very High High Low High Same OS on all nodes Yes Yes No No Number of copies of OS 1 N N N Basis for communication Shared memory Messages Files Model specific Resource management Global, central Global, distributed Per node Per node Scalability No Moderately Yes Varies Openness Closed Closed Open Open
  • 23. COMMUNICATION IN DISTRIBUTED SYSTEMS  Issues in communication  Message-oriented Communication  Remote Procedure Calls  Transparency but poor for passing references  Remote Method Invocation  RMIs are essentially RPCs but specific to remote objects  System wide references passed as parameters  Stream-oriented Communication
  • 24. TYPES OF COMMUNICATION Message passing is the general basis of communication in a distributed system: transferring a set of data from a sender to a receiver.
  • 25. COMMUNICATION BETWEEN PROCESSES  Unstructured communication  Use shared memory or shared data structures  Structured communication  Use explicit messages (IPCs)  Distributed Systems: both need low-level communication support
  • 26. COMMUNICATION PROTOCOLS  Protocols are agreements/rules on communication  Protocols could be connection-oriented or connectionless 2-1
  • 27. LAYERED PROTOCOLS  A typical message as it appears on the network. 2-2
  • 28. Physical layer The physical layer is responsible for movements of individual bits from one hop (node) to the next.
  • 29. PHYSICAL LAYER Provides physical interface for transmission of information. Defines rules by which bits are passed from one system to another on a physical communication medium. Covers all - mechanical, electrical, functional and procedural - aspects for physical communication. Such characteristics as voltage levels, timing of voltage changes, physical data rates, maximum transmission distances, physical connectors, and other similar attributes are defined by physical layer specifications. OSI Model
  • 30. Data link layer The data link layer is responsible for moving frames from one hop (node) to the next and perform error detection and correction
  • 31. DATA LINK LAYER Data link layer attempts to provide reliable communication over the physical layer interface. Breaks the outgoing data into frames and reassemble the received frames. Create and detect frame boundaries. Handle errors by implementing an acknowledgement and retransmission scheme. Implement flow control. Supports points-to-point as well as broadcast communication. Supports simplex, half-duplex or full-duplex communication. OSI Model
  • 33. Network layer The network layer is responsible for the delivery of individual packets from the source host to the destination host. Protocols: X.25Connection oriented IP  Connection Less
  • 34. NETWORK LAYER Implements routing of frames (packets) through the network. Defines the most optimum path the packet should take from the source to the destination Defines logical addressing so that any endpoint can be identified. Handles congestion in the network. Facilitates interconnection between heterogeneous networks (Internetworking). The network layer also defines how to fragment a packet into smaller packets to accommodate different media. OSI Model
  • 36. Transport layer The transport layer is responsible for the delivery of a message from one process to another. Protocols: TCP Connection oriented UDP  Connection Less
  • 37. TRANSPORT LAYER Purpose of this layer is to provide a reliable mechanism for the exchange of data between two processes in different computers. Ensures that the data units are delivered error free. Ensures that data units are delivered in sequence. Ensures that there is no loss or duplication of data units. Provides connectionless or connection oriented service. Provides for the connection management. Multiplex multiple connection over a single channel. OSI Model
  • 39. Session layer The session layer is responsible for dialog control and synchronization.
  • 40. SESSION LAYER Session layer provides mechanism for controlling the dialogue between the two end systems. It defines how to start, control and end conversations (called sessions) between applications. This layer requests for a logical connection to be established on an end-user’s request. Any necessary log-on or password validation is also handled by this layer. Session layer is also responsible for terminating the connection. This layer provides services like dialogue discipline which can be full duplex or half duplex. Session layer can also provide check-pointing mechanism such that if a failure of some sort occurs between checkpoints, all data can be retransmitted from the last checkpoint. OSI Model
  • 41. Presentation layer The presentation layer is responsible for translation, compression, and encryption.
  • 42. PRESENTATION LAYER Presentation layer defines the format in which the data is to be exchanged between the two communicating entities. Also handles data compression and data encryption (cryptography). OSI Model
  • 43. Application layer The application layer is responsible for providing services to the user.
  • 44. APPLICATION LAYER Application layer interacts with application programs and is the highest level of OSI model. Application layer contains management functions to support distributed applications. Examples of application layer are applications such as file transfer, electronic mail, remote login etc. OSI Model
  • 46. MIDDLEWARE PROTOCOLS  Middleware: layer that resides between an OS and an application  May implement general-purpose protocols that warrant their own layers  Example: distributed commit 2-5
  • 47. CLIENT-SERVER COMMUNICATION MODEL  Structure: group of servers offering service to clients  Based on a request/response paradigm  Techniques:  Socket, remote procedure calls (RPC), Remote Method Invocation (RMI) kernel client kernel kernel kernel file server process server terminal server
  • 48. ISSUES IN CLIENT-SERVER COMMUNICATION  Addressing  Blocking versus non-blocking  Buffered versus unbuffered  Reliable versus unreliable  Server architecture: concurrent versus sequential  Scalability
  • 49. ADDRESSING ISSUES Question: how is the server located? Hard-wired address  Machine address and process address are known a priori Broadcast-based  Server chooses address from a sparse address space  Client broadcasts request  Can cache response for future Locate address via name server user server user server user serverNS
  • 50.
  • 51. BLOCKING VERSUS NON-BLOCKING  Blocking communication (synchronous)  Send blocks until message is actually sent  Receive blocks until message is actually received  Non-blocking communication (asynchronous)  Send returns immediately  Return does not block either
  • 52.
  • 53.
  • 54. BUFFERING ISSUES  Unbuffered communication  Server must call receive before client can call send  Buffered communication  Client send to a mailbox  Server receives from a mailbox user server user server
  • 55. RELIABILITY  Unreliable channel  Need acknowledgements (ACKs)  Applications handle ACKs  ACKs for both request and reply  Reliable channel  Reply acts as ACK for request  Explicit ACK for response  Reliable communication on unreliable channels  Transport protocol handles lost messages request ACK reply ACK User Server request reply ACK User Server
  • 56.
  • 57. SERVER ARCHITECTURE  Sequential  Serve one request at a time  Can service multiple requests by employing events and asynchronous communication  Concurrent  Server spawns a process or thread to service each request  Can also use a pre-spawned pool of threads/processes (apache)  Thus servers could be  Pure-sequential, event-based, thread-based, process-based  Discussion: which architecture is most efficient?
  • 58. SCALABILITY  Question:How can you scale the server capacity?  Buy bigger machine!  Replicate  Distribute data and/or algorithms  Ship code instead of data  Cache
  • 59. TO PUSH OR PULL ?  Client-pull architecture  Clients pull data from servers (by sending requests)  Example: HTTP  Pro: stateless servers, failures are each to handle  Con: limited scalability  Server-push architecture  Servers push data to client  Example: video streaming, stock tickers  Pro: more scalable, Con: stateful servers, less resilient to failure  When/how-often to push or pull?
  • 60. GROUP COMMUNICATION  One-to-many communication: useful for distributed applications  Issues:  Group characteristics:  Static/dynamic, open/closed  Group addressing  Multicast, broadcast, application-level multicast (unicast)  Atomicity  Message ordering  Scalability
  • 61. PUTTING IT ALL TOGETHER: EMAIL  User uses mail client to compose a message  Mail client connects to mail server  Mail server looks up address to destination mail server  Mail server sets up a connection and passes the mail to destination mail server  Destination stores mail in input buffer (user mailbox)  Recipient checks mail at a later time
  • 62. EMAIL: DESIGN CONSIDERATIONS  Structured or unstructured?  Addressing?  Blocking/non-blocking?  Buffered or unbuffered?  Reliable or unreliable?  Server architecture  Scalability  Push or pull?  Group communication
  • 63. REMOTE PROCEDURE CALLS  Goal: Make distributed computing look like centralized computing  Allow remote services to be called as procedures  Transparency with regard to location, implementation, language  Issues  How to pass parameters  Bindings  Semantics in face of errors  Two classes: integrated into prog, language and separate
  • 64. CONVENTIONAL PROCEDURE CALL a) Parameter passing in a local procedure call: the stack before the call to read b) The stack while the called procedure is active
  • 65. PARAMETER PASSING  Local procedure parameter passing  Call-by-value  Call-by-reference: arrays, complex data structures  Remote procedure calls simulate this through:  Stubs – proxies  Flattening – marshalling  Related issue: global variables are not allowed in RPCs
  • 66. CLIENT AND SERVER STUBS  Principle of RPC between a client and server program.
  • 67. STUBS  Client makes procedure call (just like a local procedure call) to the client stub  Server is written as a standard procedure  Stubs take care of packaging arguments and sending messages  Packaging parameters is called marshalling  Stub compiler generates stub automatically from specs in an Interface Definition Language (IDL)  Simplifies programmer task
  • 68. STEPS OF A REMOTE PROCEDURE CALL 1. Client procedure calls client stub in normal way 2. Client stub builds message, calls local OS 3. Client's OS sends message to remote OS 4. Remote OS gives message to server stub 5. Server stub unpacks parameters, calls server 6. Server does work, returns result to the stub 7. Server stub packs it in message, calls local OS 8. Server's OS sends message to client's OS 9. Client's OS gives message to client stub 10. Stub unpacks result, returns to client
  • 69. EXAMPLE OF AN RPC 2-8
  • 70. MARSHALLING  Problem: different machines have different data formats  Intel: little endian, SPARC: big endian  Solution: use a standard representation  Example: external data representation (XDR)  Problem: how do we pass pointers?  If it points to a well-defined data structure, pass a copy and the server stub passes a pointer to the local copy  What about data structures containing pointers?  Prohibit  Chase pointers over network  Marshalling: transform parameters/results into a byte stream
  • 71. BINDING  Problem: how does a client locate a server?  Use Bindings  Server  Export server interface during initialization  Send name, version no, unique identifier, handle (address) to binder  Client  First RPC: send message to binder to import server interface  Binder: check to see if server has exported interface  Return handle and unique identifier to client
  • 72. BINDING: COMMENTS  Exporting and importing incurs overheads  Binder can be a bottleneck  Use multiple binders  Binder can do load balancing
  • 73. FAILURE SEMANTICS  Client unable to locate server: return error  Lost request messages: simple timeout mechanisms  Lost replies: timeout mechanisms  Make operation idempotent  Use sequence numbers, mark retransmissions  Server failures: did failure occur before or after operation?  At least once semantics (SUNRPC)  At most once  No guarantee  Exactly once: desirable but difficult to achieve
  • 74. FAILURE SEMANTICS  Client failure: what happens to the server computation?  Referred to as an orphan  Extermination: log at client stub and explicitly kill orphans  Overhead of maintaining disk logs  Reincarnation: Divide time into epochs between failures and delete computations from old epochs  Gentle reincarnation: upon a new epoch broadcast, try to locate owner first (delete only if no owner)  Expiration: give each RPC a fixed quantum T; explicitly request extensions  Periodic checks with client during long computations
  • 75. IMPLEMENTATION ISSUES  Choice of protocol [affects communication costs]  Use existing protocol (UDP) or design from scratch  Packet size restrictions  Reliability in case of multiple packet messages  Flow control  Copying costs are dominant overheads  Need at least 2 copies per message  From client to NIC and from server NIC to server  As many as 7 copies  Stack in stub – message buffer in stub – kernel – NIC – medium – NIC – kernel – stub – server  Scatter-gather operations can reduce overheads
  • 76. CASE STUDY: SUNRPC  One of the most widely used RPC systems  Developed for use with NFS  Built on top of UDP or TCP  TCP: stream is divided into records  UDP: max packet size < 8912 bytes  UDP: timeout plus limited number of retransmissions  TCP: return error if connection is terminated by server  Multiple arguments marshaled into a single structure  At-least-once semantics if reply received, at-least-zero semantics if no reply. With UDP tries at-most-once  Use SUN’s eXternal Data Representation (XDR)  Big endian order for 32 bit integers, handle arbitrarily large data structures
  • 77. BINDER: PORT MAPPER Server start-up: create port Server stub calls svc_register to register prog. #, version # with local port mapper Port mapper stores prog #, version #, and port Client start-up: call clnt_create to locate server port Upon return, client can call procedures at the server
  • 78. RPCGEN: GENERATING STUBS  Q_xdr.c: do XDR conversion  Detailed example: later in this course
  • 79. SUMMARY  RPCs make distributed computations look like local computations  Issues:  Parameter passing  Binding  Failure handling  Case Study: SUN RPC