D ISTRIBUTED S YSTEM UNIT-1 Prepared By: G.S.Mishra
W HAT IS A D ISTRIBUTED S YSTEM ? “A distributed system is a collection of independent computers that appear to the users of the system as a single computer.” “A distributed system is a collection of processors that do not share memory or a clock.”
W HAT IS A D ISTRIBUTED S YSTEM ? C ONTD …. “ A distributed system in which hardware or, software components located at networked computers communicate & coordinate their actions only by passing messages.” Consequences: Concurrency No global clock Independent failure
E XAMPLES OF DISTRIBUTED SYSTEM The Internet The Intranet Mobile & Ubiquitous Computing
M OBILE S YSTEMS Cellular Concept Frequency Reuse
C LUSTERS
A RCHITECTURE
T ERMINOLOGIES USED
O THER E XAMPLES Web server ( Centralized ) MP3.com : a number of MP3 files stored in the Web site. Failure of this site cause unavailability of services Napster: stores the MP3 files on the actual users’ machines napster.com is used as a massive index (or meeting place) for connecting users
E XAMPLES C ONTD …. Users connect to Napster to search for the files they desire Thereafter connect to users directly to download the file. MP3 file is distributed across a number of servers making it more reliable against failure. But search is centralized. Gnutella does not have a centralized search facility nor a central storage facility for the files.
E XAMPLE C ONTD … Each user in the network runs a servent (a client and a server), which allows him/her to act as both a provider and consumer of information (as in Napster) but acts as a search facility also. if any of the servents are unavailable, users can almost certainly still reach the file they require
D IFFERENCE BETWEEN C ENTRALIZED & D ECENTRAIZED S YSTEMS Broad Areas: 1. Resource Discovery 2. Resource Availability 3. Resource Communication 1-Resource Discovery: A two-stage process The discovery service needs to be located The relevant information is retrieved. E.g. DNS
D IFFERENCE ….. CONTD… Resource Availability: Web servers fall into the centralized category here because there is only one IP address that hosts a particular site. If that machine goes down then the Web site is unavailable machines could be made fault tolerant by replicating the web site employ some internal switching mechanisms but the availability of the IP address remains the same.
In a more decentralized approach; by offering many duplicate services that can perform the same functionality. Resource availability is tied in closely to resource discovery. 3- Resource Communication 1. Brokered Communication : where the communication is always passed through a central server and therefore a resource does not have to reference the other resource directly
2. Point-to-Point (or Peer-to-Peer) Communication : this involves a direct connection (although this connection may be multi-hop) betweenthe sender and the receiver. In this case, the sender is aware of the receiver’s location.
G OALS OF D ISTRIBUTED S YSTEM Advantages of distributed system over centralized system
G OALS OF D ISTRIBUTED S YSTEM C ONTD … Advantages of Distributed System over Independent PCs
G OALS OF D ISTRIBUTED S YSTEM C ONTD … Disadvantages of Distributed System
H ARDWARE C ONCEPTS : T AXONOMY OF P ARALLEL & DISTRIBUTED C OMPUTER S YSTEMS
B US BASED M ULTIPROCESSOR
M ULTICOMPUTERS W ORKSTATION ON LAN
S WITCHED M ULTIPROCESSORS
S WITCHED M ULTICOMPUTERS
S OFTWARE C ONCEPTS
R ESOURCE SHARING hardware resources like printers or disks to reduce costs sharing databases, a set of web pages, search engine Service: file services - read, write, delete. We buy goods by electronic payment service Server: a running program (process) on a networked computer that accepts requests Remote invocation: The complete interaction between the client and the server from sending request to receiving server’s response
T HE WORLD WIDE WEB
C HALLENGES Heterogenity : Networks, computer hardware, Operating systems, Programming languages Openness Security : Denial of Service attack Scalability
C HALLENGES C ONTD … Failure Handling: Detecting failures, Masking failures, tolerating failures, Recovery from failures, Redundancy Concurrency Transparency: Access transparency- Enables local & remote resources to be accessed using identical operations.
C HALLENGES C ONTD … Location transparency- Enables resources to be accessed without knowledge of their location. Concurrency transparency- Enables processes to operate concurrently using shared resources without interference between them. Replication transparency- enables multiple instances of resources to be used to increase reliability and performance without knowledge of replicas by users.
C HALLENGES C ONTD … Failure transparency- enables the concealment of faults, allowing users and application programs to complete their tasks despite the failure of hardware or software components. Mobility transparency- allow the movement of resources and clients within a system without affecting the operation of users or programs. Performance transparency- allows the system to be reconfigured to improve performance as loads vary. Scaling transparency- allows the system and applications to expand in scale without change to the system structure.
W EB SERVERS AND WEB BROWSERS
S HARED M EMORY M ULTI -P ROCESSOR
S YSTEM MODELS Architectural Model: Concerned with the placement of parts and the relationships between them. Software Layers System Architecture Fundamental model: Concerned with a more formal description of the properties that are common in all architectural models. Interaction Model Failure Model Security Model
S OFTWARE LAYERS
S YSTEM ARCHITECTURES The working of Search engines C LIENT SERVER MODEL
S ERVICES PROVIDED BY MULTIPLE SERVERS For Replicated data
W EB PROXY SERVER Proxy servers are used as a cache to store recently used data objects, sharing other web resources, to increase availability and performance, reducing load on a network & web servers.
A DISTRIBUTED APPLICATION BASED ON PEER PROCESSES All of the processes play similar roles, interacting cooperatively as peers to perform a distributed activity without any distinction between clients and servers.
W EB APPLELTS
F UNDAMENTAL MODELS Fundamental model: Concerned with a more formal description of the properties that are common in all architectural models. Interaction Model Failure Model Security Model
I NTERACTION MODEL Performance of communication channel Latency: delay between the start of a messages transmission from one process and the beginning of its receipt by another process. Bandwidth: Total amount of information transmitted in a given time. Jitter: The time taken to deliver a series of messages.
I NTERACTION MODEL C ONTD … o Two variants of the interaction model Synchronous Distributed system Asynchronous Distributed system o Computer clocks & Timing Events o Event ordering
R EAL T IME ORDERING OF EVENT
F AILURE M ODEL Omission failure Arbitrary failure Masking failures Reliability
S ECURITY M ODEL Securing processes and their interactions The enemy Protecting objects Defeating Security Threats
P ROTECTING OBJECTS
T HE ENEMY
S ECURE CHANNELS
T HIN CLIENTS AND COMPUTE SERVERS
O BJECTS AND PRINCIPALS
T HE ENEMY
S ECURE CHANNELS
T HE WEB
S YSTEM MODELS Architectural Model: Concerned with the placement of parts and the relationships between them. Fundamental model: Concerned with a more formal description of the properties that are common in all architectural models.
S YSTEM M ODELS Architectural Models: The placements of its parts & relationship between them: The partition of data or, replication Requirements to add & remove mobile devices conveniently Use of mobile code & agents Caching of data
Software Layers: Applications, services Middleware Operating System Computer & Network Hardware (OS & CN Hardware referd to as Platform) A RCHITECTURAL MODELS
S YSTEM M ODELS Architectural Models: The placements of its parts & relationship between them: The partition of data or, replication Requirements to add & remove mobile devices conveniently Use of mobile code & agents Caching of data
O RDERING OF E VENTS Lamport’s Happened Before relationship: For two events a and b, a → b if a and b are events in the same process and a occurred before b a is an event of sending a message m and b is the corresponding receive event at the destination process If a → c and c → b for some event c, then a → c (transitive relation )
O RDERING OF E VENTS Lamport’s Happened Before relationship: For two events a and b, a → b if a and b are events in the same process and a occurred before b a is an event of sending a message m and b is the corresponding receive event at the destination process If a → c and c → b for some event c, then a → c (transitive relation )
O RDERING OF E VENTS Lamport’s Happened Before relationship: For two events a and b, a → b if a and b are events in the same process and a occurred before b a is an event of sending a message m and b is the corresponding receive event at the destination process If a → c and c → b for some event c, then a → c (transitive relation )
O RDERING OF E VENTS Lamport’s Happened Before relationship: For two events a and b, a → b if a and b are events in the same process and a occurred before b a is an event of sending a message m and b is the corresponding receive event at the destination process If a → c and c → b for some event c, then a → c (transitive relation )
O RDERING OF E VENTS Lamport’s Happened Before relationship: For two events a and b, a → b if a and b are events in the same process and a occurred before b a is an event of sending a message m and b is the corresponding receive event at the destination process If a → c and c → b for some event c, then a → c (transitive relation )
O RDERING OF E VENTS Lamport’s Happened Before relationship: For two events a and b, a → b if a and b are events in the same process and a occurred before b a is an event of sending a message m and b is the corresponding receive event at the destination process If a → c and c → b for some event c, then a → c (transitive relation )