0% found this document useful (0 votes)
20 views

DISTRIBUTED COMPUTING

distributed computing unit1 notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
20 views

DISTRIBUTED COMPUTING

distributed computing unit1 notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 37
SYLLABUS Distributed Computing - (CS3551) — Message -Passing UNITE INTRODUCTION Introduction : Definition-Relation to Computer Sys Systems versus Shared Memory Systems ~ Primitives for Distributed Communication ~ Synchronous versus Asynchronous Executions — Design Issues and Challenges; A Model of Distributed A Distributed Program — A Model of Distributed Executions — Models of m Components ~ Motiv: Computations : ‘Communication Networks ~ Global State of a Distributed System. (Chapter - 1) UNIT II LOGICAL TIME AND GLOBAL STATE Logical Time : Physical Clock Synchronization ; NTP — A Framework for a System of Logical Clocks ~ Scalar Time ~ Vector Time; Message Ordering and Group Communication : Message Ordering Paradigms — Asynchronous Execution with Synchronous Communication ~ Synchronous Program Order on Asynchronous System — Group Communication ~ Causal Order ~ Total Order; Global State and Snapshot Recording Algorithms : Introduction ~ System Model and Definitions ~ Snapshot Algorithms for FIFO Channels. (Chapter - 2) DISTRIBUTED MUTEX AND DEADLOCK UNIT HL Introduction — Preliminaries — Lamport’s algorithm — Distributed Mutual exclusion Algorithms : Ricart-Agrawala’s Algorithm — Token-Based Algorithms — Suzuki-Kasami’s Broadcast Algorithm: Deadlock Detection in Distributed Systems : Introduction ~ System Model — Preliminaries — Models of Deadlocks ~ Chandy-Misra-Haas Algorithm for the AND model and OR Model. (Chapter - 3) UNITIV CONSENSUS AND RECOVERY Consensus and Agreement Algorithms : Problem Definition — Overview of Results ~ Agreement in a Failure-Free System(Synchronous and Asynchronous) ~ Agreement in Synchronous Systems with Failures; Checkpointing and Rollback Recovery : Introduction ~ Background and Definitions — Issues in Failure Recovery ~ Checkpoint-based Recovery ~ Coordinated Checkpointing Algorithm - - Algorithm for Asynchronous Checkpointing and Recovery. (Chapter - 4) UNITY CLOUD COMPUTING Definition of Cloud Computing ~ Characteristics of Cloud — Cloud Deployment Models — Cloud Service Models ~ Driving Factors and Challenges of Cloud — Virtualization — Load Balancing — Scalability and Elasticity ~ Replication - Monitoring ~ Cloud Services and Platforms : Compute Services ~ Storage Services ~ Application Services. (Chapter ~ 5) (iv) TABLE OF CONTENTS EE ee Chapter - 1 Introduction (1-1) to (1 - 30) 1.1 _Definition...... 4.1.1 Disadvantages of Ds 1-2 1.1.2 Difference between Parallel Computing and Distributed Computing... 1-3 1.2 Relation to Computer System Components...... 1-3 4,3. Motivation a va 4.3.1 Need of Distributed System........ 155 4.3.2 Focus on Resource Sharing “455 14 Message-Passing Systems Versus Shared Memory Systems .. 1-7 1.4.1 Emulating Message - Passing Systems on a Shared Memory Systems. 1-9 1.5 Primitives for Distributed Communication 1-9) 1.5.1 Blocking / Non-blocking, Synchronous / Asynchronous Primitives... 1-9 4.6 Synchronous versus Asynchronous Executions ... 1-10 1.7 Design Issues and Challenges.. 1-11 17.1 Challenges from System Perspective... 1-11 17.2 Challenges.. 1.7.2.1 Heterogeneity 1.7.2.2 Openness 1.7.2.3 Security 1.7.2.4 Scalability 1.7.2.5 Failure Handling .. 1.7.2.6 Concurrency. 1.7.2.7 Transparency Application of Distributed ‘Computing and Challenges... 18 AModel of Distributed Computations : A Distributed Program. Ww) Netwo ed System 1.12 Two Marks Questions with Answers Chapter-2 Logical Time and Global State 2.1 Glock Events and Process State 2.1.1 Physical Clock 2.12 Clock Skew and Drift Compensati 22 Logical Time....... 22.1 Event Ordering 222 Lamport Timestamp 223 Vector Timestamp 2.3 Physical Clock Synchronization : NTP 2.3.1 Synchronization in a Synchronous System.. 2.3.2 Cristian's Method for Synchronizing Clocks 2.3.2.1 Christian's Algorithm 233 Berkeley Algorithm. 23.4 Network Time Protocol... 2.3.4.1 Localized Averaging Distributed Algorithms... 2.4 A Framework for a System of Logical Clocks.. 2.5 Scalar Time... 2.6 Vector Time... 2.7 Message Ordering Paradigms . 2.8 Asynchronous Execution with Synchronous Communication.. 2.8.1 Execution Realizable with Synchronous Communication ... 28.2 Hierarchy of Message Ordering Paradigms... 2.9 Synchronous Program Order on Asynchronous System .. 2.10 Group Communication (vi) (2- 1) to (2-38) 2.10.1 One to Many Communication 2-24 2.10.2 Many-to-One Communication ... 2-25 2.10.3 Many-to-Many Communication 2-26 2.10.3.1 Message Ordering 2-26 2.11 Causal Order. 2-28 2.11.1 Raynal-Schiper-Toueg Algorithm ... 2-29 2.12 Total Order 2-29 2.12.1 Three Phase Distributed Algorithm... 2-30 2.13 Global State and Snapshot Recording Algorithms... 2-30 2.13.1 System Model. 31 2.13.2 Consistent Global State......ssssesssinnnensinene 2-31 2.14 Snapshot Algorithms for FIFO Channels. 2.14.1 Chandy-Lamport Algorithm..... eM ca 2 2.14.2 Property of the Recorded Global State 2.15 Two Marks Questions with Answers ue ety Chapter-3 _ Distributed Mutex and Deadlock (3 - 1) to (3 - 24) 3.1 Distributed Mutual Exclusion Algorithms : Introduction .... 3-2 3.2 Preliminaries .. 3.2.1 System Model...... . 3-2 3.2.2 Requirement of Mutual Exclusion 3-3 3.23 Performance Metrics 3-3 3.3 Lamport's Algorithm .......... 3-4 3.4 Ricart-Agrawala's Algorithm .....0....00 3-8 3.5 Token-Based Algorithms .. 3-10 3.5.1 Suzuki-Kasami's Broadcast Algorithm .. 3-11 3.6 Deadlock Detection in Distributed Systems : introduction... 3-12 3.6.1 Necessary Condition n= 13 3.7 System Model. 3-14 (vei) 3.8 a4 3.10 Chandy-Misra-Haas Algorithm for the AND Model 3.11 Chandy-Misra-Haas Algorithm for the OR Model... 3.12 Two Marks Questions with Answers 3.7.1 Wait for Graph Preliminaries : Deadlock Handling Strategies .... 3.8.1 Deadlock Prevention... 3-15 3.8.2 Dead Avoidance... 3-17 3.8.3 Deadlock Detection. 3-17 Models of Deadlocks -18 ~18 3.9.1 The Single Resource Model ... 3.9.2. The AND Model... 3.9.3 The OR Model .. 3.9.4 The AND-OR Model..... Chapter-4 Consensus and Recovery (4-1) to (4- 28) 4.1 Consensus and Agreement Algorithms : Problem Definition .. 4.2 Byzantine Agreement Problem... 4.2.1 Consensus Problem.. 4.2.2 _ Interactive Consistency Problem ..... 4.3 Overview of Results ... 4.4 Solution to Byzantine Agreement Problem... 4.4.1 Impossible Scenario... 4.4.2 Lamport-Shostak-Pease Algorithm... 4.5 Agreement in a Failure-Free System (Synchronous and Asynchronous)...... 4-7 4.6 Agreement in Synchronous Systems with Failures . 4.7 _ \ntroduction of Check-pointing and Rollback Recovery ... 4.8 Background and Definitions 4.8.1 System Model 4.8.2 Local Checkpoint (viii) 4.9 Consistent Set of Checkpoints 4-9 4.9.1 Synchronous Checkpointing and Recovery 4-12 4.9.1.1 Checkpointing Algorithm.. 4-12 4.9.2 The Rollback Recovery Algorithm ... 4-14 4.9.3 Message Types. 4-15 4.10 Issues in Failure Recovery w= 15 4.10.1 Basic Concept. 4-16 4.11 Checkpoint-based Recovery... 4-17 4.11.1 Difference between Uncoordinated, Coordinated and Communication Induced Check Pointing 4-21 4.12 Coordinated Checkpointing Algorithm... 4-22 4.13 Algorithm for Asynchronous Checkpointing and Recovery ..........sse+:0+ 4-23 4.14 Two Marks Questions with Answers 4 ag Chapter-5 Cloud Computing (6 - 1) to ( - 36) hk 5.2 5.3 5.4 55 5.6 ion of Cloud Computing... 5.1.1 Cloud Components.. 5.1.2 Pros and Cons of Cloud Computing. 5.1.3 Application of Cloud Computing. Characteristics of Cloud... Cloud Deployment Models.. 5.3.1 Difference between Public and Private Cloud... Cloud Service Models... 5.4.1 Software as a Service (SaaS). 5.4.2 Platform as a Service (PaaS). 5.4.3 _ Infrastructure as a Service (laa). 5.4.4 _ Difference between laaS, PaaS and SaaS... Driving Factors and Challenges of Cloud.. Virtualization ..... (ox) Introduction Syllabus Introduction : Definition-Relation to Computer System Components - Motivation - Message ~ _ Passing Systems versus Shared Memory Systems ~ Primitives for Distributed Communication Synchronous versus Asynchronous Executions - Design Issues and Challenges; A Model of + +> Marks 13 1.2 Relation to Computer System Components 1.3. Motivation 1.4 Message-Passing Systems Versus Shared Se samrory systems: Dec. Marks 13 "Primitives for Distributed Communication Marks 13 Distributed Computing fad Intro, Definition LAU : May.22] Definition of distributed systems : * A distributed system is one in which components located at networked computer, commumicate and co-ordinate their actions only by-passing messages. A distributed system is collection of independent entities that co-operate to solve , problem that cannot be individually solved Tanenbaum's definition : A distributed system is a collection of independen; computers that appears to its users a single coherent system. DS can be characterized as a collection of mostly autonomous processors communicating over a communication network. It having following features and consequences Concurrency : The capacity of the system to handle shared resources can b¢ increased by adding more resources to the network. The p and q are concurrent if either p can happen before q or q can happen before p, thus having interleaving semantics. Xv No global clock : The only communication is by sending messages through a network. Not possible to synchronize many computers on a network and guarantee synchronization over time, thus events are logically ordered. Not possible to have a process that can be aware of a single global state. a Independent failures : The programs may not be able to detect whether the network has failed or has become unusually slow. Running processes may be unaware of other failures within context. Failed processes may go undetected Both are due to processes running in isolation. 4. Autonomy and heterogeneity : The processors are loosely coupled in that they have different speeds and each can be running a different OS, Disadvantages of DS 1. Software : Difficult to develop software for distributed systems. 2. Network : Saturation, lossy transmissions, 3. Security : Easy access also applies to secret data. 4. Absence of global clock. TECHNICAL PUBLICATIONS® - an up-hrust for knowledge Distributed Computing 1-3 Introduction Difference between Parallel Computing and Distributed Computing Parallel computing as The goal of parallel computing has traditionally been to__provide performance, either in terms of, processor power or memory. 9 In parallel computation the interaction between processors is frequent. It is typically fine grained with low overhead. 4. A Parallel computation execution time. ee mee) 1ed to be reliable. values short 1. Explain how a parallel system differs from a distributed system. Distributed computing The goal of distributed computing is to provide convenience, where convenience | includes high availability, reliability and physical distribution. In distributed computation the interaction is infrequent. Itis heavier weight. Assumed to be unreliable. Distributed computation values long up time. ORE Relation to Computer System Components © Fig. 1.2.1 shows typical distributed system [Processor [Memory Memory Fig. 1.2.1 Dis ‘Communication network + In distributed computing system, each node consists of a processor (CPU), local memory and interface. Communication between any two or more nodes is only by message passing because there is no common memory available. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge 1-5 Introduction Distributed Computing ee ee 5. Reliability : If one machine crashes, the system as a whole can still survive. It gives higher availability and improved reliability. 6. Incremental growth : Computing power can be added in small increments. ERI Need of Distributed System e Resource sharing is main motivation of the distributed system. The term “resource” ngs that can is a rather abstract one, but it best characterizes the range of th usefully be shared in a networked computer system. , disks, ources or hardware resources. Printe: * Resources may be the software CDROM and data are the example of software resource extends from hardware components such as disks and printers to latabases and data objects of all kinds and hardware resources. Sharing, of software - defined entities such as files, di Tt also includes the stream of video frames and audio connection that a mobile phone call represents. A resource manager is a software module that manages a set of resources of a particular type. © Primary requirement of distributed system are as follows : 1. Fault tolerance 2. Consistency of replicated data 3. Security 4. Reliability 5. Concurrent transactions Focus on Resource Sharing © The term resource is a rather abstract one, but it best characterizes the range of things that can usefully be shared in a networked computer system. Resources in a distributed system are encapsulated within one computer and can only be accessed from other computers by communication. For effective sharing each resource must be managed by a program called resource manager offering, a ‘communication interface enabling the resource being accessed, manipulated and updated consistently and reliably. Equipments are shared to reduce cost. Data shared in database or web pages are high-level resources which are more significant to users without regard for the server or servers that provide these. © Types of resources : 1. Hardware resource : Hard disk, printer, camera, scanner ee lh ee Wired Distributed Computing ’ : ei ppe how cle «Patterns of resource sharing vary widely in their scope and in work together ¢ 1. Search Engine : Users nee d no contact between users: Working (CSCW) : Users cooperate action are determined ed Co-operative hanisms to coordinat ic distribution. 2, Computer Support share resources. Mec pattem of sharing and the geograph ch resource must be manage je user's ad by a program that off accessed and updated r- + For effective sharing, © communication interface ena and consistently. bling the resource to be a collection of related resources and presents their fsnction. © Service : Manag to users and applications. eeeciee td Miasicslly | ptortge.. of resources, and. \tt) provides seymiee? authenticated clients, It is running program on a networked computer a service and responds to requ: accepts requests from client and performs Example is Apache server and IIS server. * ‘The complete interaction between server machine and client machine, from point when the client sends its request to when it receives the server's respon called a remote invocation. * Resources may be encapsulated as objects and accessed by client objects. In t- case a client object invokes a method upon a server object. Hardware and software resource sharing © Examples of hardware resources that can be usefully be shared and examples their sharing. , Hardware resources : 1. CPU: a, Computing server : It executes processor-intensive applications for clients b. Remote object server : It executes methods on behalf of clients c. Worm program : It shares CP! i Wie s CPU capacity of desktop machine with the loc! 2. Memory : Cache server holds recent! acct Fe: access by other local computers. y-accessed web pages in its RAM, for faster 3. Disk : File server, virtual disk server, video on demand server. 4. Screen : Network window s' ystems, such as X- rocesses computers to update the content of windows. Leena ty * oid TECHNICAL PUBLICATIONS® - an up-thrust for EN ee om eee ee ee pisinbuted Computing on Introduction 6. Printer : Networked printers accept print jobs from many computers and managing them with a queuing system, Software resources : 1. Web page : Web servers enable multiple clients to share read-only page content 2, File ; File servers enable multiple clients to share read-write files. 3. Object : Possibilities for software objects are limitless. Shared whiteboard, shared diary and room booking system are examples of this type. 4, Database : Databases are intended to record the definitive state of some related sets of data. They have been shared ever since multi-user computers appeared, They include techniques to manage concurrent updates. 5. Newsgroup content : The netnews system makes read-only copies of the recently-posted news items available to clients throughout the Internet. 6. Video/audio stream : Servers can store entire videos on disk and deliver them at playback speed to multiple clients simultaneously. Message-Passing Systems Versus Shared Memory Systems Message passing * Two processes communicate with each other by passing messages. Message passing is direct and indirect communication. Indirect communication uses mailbox for sending receiving message from other process. * Message passing system requires the synchronization and communication between the two processes. Message passing used as a method of communication in microkernels. ‘© Message passing systems come in many forms. Messages sent by a process can be either fixed or variable size. The actual function of message passing is normally provided in the form of a pair of primitives. a) Send (destination_name, message) b) Receive (source_name, message). Send primitive is used for sending a message to destination. Process sends information in the form of a message to another process designated by a destination. A process receives information by executing the receive primitive, which indicates the source of the sending process and the message. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge a Ut pstibuted Computing = Introduction Emulating Message - Passing Systems on a Shared Memory Systems 8 divided into two disjoint parts and assigned to each * Shared address space processor. Send and receive operations are implemented by using writing and reading the information from receiver and sender processor. + Synchronization primitives like write and read operation are controlled by sender/receiver processor. * AP,—B, message passing can be emulated by a write by P; to the mailbox and then a read by Fj from the mailbox. eae communication [ 1. Illustrate the difference between message passing and shared memory proces model. Primitives for Distributed Communication Blocking / Non-blocking, Synchronous / Asynchronous Primitives Send( ) and receive Message send communication primitives is denoted by communication primitives denoted by Receive( ) © Message passing primitive commands SEND (msg, dest) RECEIVE (sre, buffer) : Send primitives uses two options for sending data : Buffered and unbuffered. In buffered options, user data is copied in the kernel buffer. In unbuffered options, ser buffer onto the network. the data gets copied directly from the implies some level of The communication of a message between two proce synchronization between the two processes. Sender and receiver can be blocking or nonblocking. Three combinations are possible using blocking and nonblocking a. Blocking send, blocking receive. b. Nonblocking send, blocking receive Nonblocking send, nonblocking receive. 1, Blocking send, blocking receive :; Both the sender and receiver are blocked until the message is delivered. This 1s called Rendezvous. This combination allows for tight synchronization between processes. TECHNICAL PUBLICATIONS® - an up-thnist for knowietoe | LI at TA! Distributed Computing 1-10 Introdtuctic 2. Nonblocking send, blocking receive : Sender may continue on, the receiver ic blocked until the requested message arrives. A process that must receive message before it can do useful work needs to be blocked until such message arrives. An example is a server process that exists to provide a service or resource to other processes. 3. Nonblocking send, nonblocking receive : Sending process sends the message and resumes the operation. Receiver retrieves either a valid message or a null i.e. neither party is required to wait. * Processor synchrony : Processor synchrony indicates that all the processors execute in lock step with their clocks synchronized. Synchronous versus Asynchronous Executions Synchronous execution : Main features : A system in which the following bounds are defined : 1. Lower and upper bounds on execution time of processes can be set. 2. Transmitted messages are received within a known bounded time. 3. Drift rates between local clocks have a known bound. Important consequences : 1. Ina synchronous distributed system there is a notion of global physical time (wi a known relative precision depending on the drift rate). 2. Only synchronous distributed systems have a predictable behaviour in terms timing. Only such systems can be used for hard real-time applications. 3. In a synchronous distributed system it is possible and safe to use timeouts order to detect failures of a process or communication link. * It is difficult and costly to implement synchronous distributed systems. Asynchronous executions : * Many distributed systems (including those on the Internet) are asynchronous. * No bound-on process execution time ie. nothing can be assumed about speed, load, and reliability of computers. * No bound-on message transmission delays ie. speed, load, reliability of interconnections. * No bounds on drift rates between local clocks, Important consequences : 1. In an asynchronous distributed system there is no global can be only in terms of logical time. ea ell lll lL! lee Dell. ee pistibuted Computing 4-11 Introduction 2, Asynchronous distributed systems are unpredictable in terms of timing, 3, 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. Synchronous execution Asynchronous execution | ny Synchronous execution means the first Asynchronous execution means a | task in a program must finish second task can begin executing in processing before moving on to parallel, without waiting for an earlier | executing the next task. task to finish. 2. ~- Lower and upper bounds on execution _ No bound-on process execution time. time of processes can be set. 3. Transmitted messages are received No bound-on message transmission within a known bounded time. delay. 4. Drift rates between local clocks have a. No bounds on drift rates between local known bound. clocks Design Issues and Challenges Challenges from System Perspective Communication mechanisms : This task involves designing appropriate mechanism for communication among the processes in the network. For example : Remote Procedure Call (RPC), Remote Object Invocation (ROI), message-oriented vs. stream-oriented communication. « Processes : Issue involved are code migration, process/thread management at clients and servers, design of software and mobile agents. « Naming : Easy to use identifiers needed to locate resources and processes transparently and scalable. * Synchronization : Mechanisms for synchronization or coordination among the processes are essential. Mutual exclusion is the classical example synchronization, but many other forms of synchronization, such as leader election are also needed. ‘© Data storage and access : Various schemes for data storage, searching and lookup should be fast and scalable across network. Revisit file system design. TECHNICAL PUBLICATIONS - an up-thrust for knowledge A Introduction Distributed Computing gs ei eck, to provide fast accesses to data = Sie id bottlen« + Consistency and replication To ay ses, ecalabilty. Require consistency and provide replication for fast access, management among replicas. e nore 1s * Distributed systems security : Secure channels, 3 (Key generation and key distribution), authorization, secure group management are the various method used to provide security. Challenges * Designing the distributed systems does not come for free. Some challenges need to be overcome in order to get the ideal systems. Design issues and challenges of distributed systems are as follows : , 1. Heterogeneity 2. Openness 3. Security 4, Scalability 5, Failure handling 6. Concurrency access control, key management 7. Transparency Heterogeneity Modem distributed systems are highly heterogeneous in many dimensions including available bandwidth, processor speed, disk capacity, security, failure rate, and pattern of failures. It applies to all the following : 1. Computer networks : LAN, wireless network, satellite link 2. Computer hardware devices : Laptop, computer, mobiles phones, tablets 3. Operating systems : Linux, UNIX, Windows 4. Programming languages : C/C+, Java, PHP 5. Different roles of software developers, designers, system managers There may be many different representations of data in the system. This might include different representations for integers, byte streams, floating point numbers and character sets. Most of the data can be marshaled from one system to another without losing significance. Attempts to provide a universal canonical form of information i lagging. * The integration of heterogeneous components implies the construction of distributed systems. In a distributed system, heterogeneity is almost unavoidable as different components may require different implementation technologies. Middleware * Middleware is a software layer that provides a as masking the heterogeneity of the Java RMI, etc. programming abstraction as well underlying platform, E.g., CORBA, DCOM, TECHNICAL PUBLICATIONS® - an up-thrust for knowledge DO SS pistnbuted Computing 1-13 Introduction * Middleware serves to hide both these aspects by providing uniform, standard, high-level interfaces to the application developers and integrators, so that applications can be easily composed, reused, ported, and made to interoperate. Middleware services provide common services to perform various general purpose functions. Fig. 1.7.1 shows position of middleware. Middleware ‘Application sofware software resides above the network cote tt ete software. API for standardized, high-level services © Mobile code is used to refer to Middleware program code that can be | | I | transferred from one computer to i. SP another and run at the destination Distributed, heterogeneous hardware nodes computer. Example of mobile code hy is Java applets. Fig, 1.7.1 Position of middieware ‘* Code suitable for running on one computer is not necessarily suitable for running, on another because executable programs are normally specific both to the instruction set and to the host operating system, Middleware should make the network transparent to the applications and end users. ‘* Users and applications should be able to perform the same operations across the network that they can perform locally. Middleware should hide the details of computing hardware, OS, software components across networks. ans that the system can be easily extended and modified. Openness ability to plug and play. You can, in theory, have two equivalent follow the same interface contract, and interchange one with the of new components means that they have to be able to” h some of the components that already exist in the system. are related. Distributed system components achieve ting using, well-defined interfaces. Distributed Computing 1-14 * Differences in data representation or interface types on different processors hav. be resolved. Openness and distribution are related to each other. Sysj components need to have well-defined and well-documented interfaces. * It can be constructed from heterogeneous hardware and software. C concerned with extensions and improvements of distributed systems. interfaces of components need to be published. New components h integrated with existing components. * The system needs to have a stable architecture so that new componer easily integrated while preserving previous investments. describe the syntax and semantics of those services. Security * Security becomes even more important in a distributed system. Auther authorization, digital sig i major issues in the distributed system. * The four basic goals of a security system are to protect information, to d intrusion, to confine the security breach, and to repair the damage and rett system to a known stable and secure state. + Security for information resources has three components : 1, Confidentiality : Protection against disclosure to unauthorized individual ACL in unix file system. 2. Integrity : Protection against alteration or corruption, e.g. checksum. 3. Availability : Protection against interference with the means to access resources, e.g, Denial of service. * Encryption provides protection of shared resources, keeps sensitive infor secret when transmitted. Security challenges that are not yet fully met : 1, Denial of service attacks 2. Security of mobile code. * A denial-of-service attack is an attempt to make a computer or network resource unavailable to its intended users. * Security of mobile code : Mobile code systems are conceived to operate in large scale settings where networks are composed of heterogeneous hosts, managed by different authorities with different levels of trust and connected by links with different bandwidths. TECHNICAL PUBLICATIONS® - an up-thrst for knowledge eS. istnbuted Computing 1-16 Introdiicte# * Mobile code systems address a wide range of needs and requirements, such as service customization, dynamic extension of application functionality, autonomy, fault tolerance and support for disconnected operations. BREAD scalability * A system is said to be scalable if it can handle the addition of users and resources without suffering a noticeable loss of performance or increase in ad) complexity. rative * The ability to accommodate any growth in the future be it expected or not. Distributed system architectures achieve scalability through employing more than ‘one host, Distributed systems can be scalable because additional computers can be added in order to host additional components. 1. In size : Dealing with large numbers of machines, users, tasks. 2. In location : Dealing with geometric distribution and mobility. 3. In administration : Addressing data passing through different regions of ‘ownership. * The design of scalable distributed systems presents the following challenges : 1. Controlling the cost of resources. 2. Controlling the performance loss. 3. Preventing software resources from running out. 4. Avoiding performance bottlenecks. * Controlling the cost of physical resources i.e. servers and users. ‘* Controlling the performance loss : DNS hierarchic structures scale better than linear structures and save time for access structured data. > > enting software resources running out : Internet 32 bits addresses run out Is one gives extra space in messages. e bottlenecks : DNS name table was kept in a single master system scalability is defined as the ability to support very large file large directories and large numbers of files while still mance. Google file system aims at efficiently and reliably ly large files for many clients, using commodity hardware. catic caching and cache memory management r + scalability. pes cone, a 7 Introduction + Tolerating failures : In the internet, client can be designed to tolerate failures which generally involve the users tolerating them as well @ Recovery from failures : Recovery involves the design of software so that the state of permanent data can be recovered or roll back after a server has crashed. ® Redundancy : Services can be made to tolerate failures. Let us consider following examples : 1, There should be at least 2 routes between any 2 routers in the internet, 2. In DNS, every name table is replicated in at least 2 servers. 3. A database can be replicated in several servers. Clients are redirected from the failure one to working one. Concurrency * Components in distributed systems are executed in concurrent processes. Fig. 1.7.2 shows concept Time of concurrency. © There is a possibility that several clients will attempt to access a shared resource at the same time. Multiple users make requests on same resource for read, write and update operation. Each resource must be safe in a concurrent environment. * Any object that represents a shared resource in a distributed system must be responsible for ensuring that operates correctly in a concurrent Fig. 1.7.2 Concurrency environment. Transparency ‘* Distributed systems should be perceived by users and application programmers as a whole rather than as a collection of cooperating components. Transparency is a key issue within distributed system. © Concept : Hide different aspects of distribution from the client. It is the ultimate goal of many distributed systems. * It can be achieved by providing lower-level services. The client uses these services instead of hard coding the information. The service layer provides a service with a certain Quality of Service. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Distributed Computing 1-19 Introduction ERED Application of Distributed Computing and Challenges 4, Mobile system © The portability of the devices, such as laptop computers, PDA, mobile phone, refrigerators, together with their ability to connect conveniently to networks in different places, makes mobile computing possible. Ubiquitous computing is the harnessing of many small cheap computational devices that are present in user's physical environments, including the home, office and elsewhere. * Mobile devices are 1. Laptop computers. 2, Handheld devices, including PDAs, cell phones, pagers, video cameras and digital cameras. 3. Wearable devices, such as smart watches. 4. Devices embedded in appliances such as washing machines, hi-fi systems, cars, Mobile computing (nomadic computing) 1. People can still access resources while he is on the move or visiting places other than their usual environment. 2. Location-aware computing : Utilize resources that are conveniently nearby, © Ubiquitous computing (pervasive computing) 1. ‘The harnessing of many small, cheap computational devices those are present in user's physical environments, including the home, office and elsewhere. 2. It benefits users while they remain in a single environment such as home. Fig. 1.7.3 shows the portable and handheld devices in a distributed system. (Gee Fig. 1.7.3 on next page) Mobile and ubiquitous computing raise significant system issues presents an ecture for mobile computing. access to three forms of wireless connection : phone is connected to internet using WAP via a gateway. mera is connected to a printer over an infra-red link. Introduction ey eh oe Backbone Satelite Tink Backbone Fig. 1.7.4 Typical portion of Internet © The internet is a collection of large number of computer networks of many different types. Internet communication mechanism is big technical achievement and it is possible by using passing of messages. + The Intemet is a very large distributed system. The web is not equal to the Internet. The implementation of the internet and services that it supports has entailed the development of practical solutions to many distributed system issues. * Internet service providers are companies that provide modem links and other types of connection to individual users and small organizations, enabling them to access services anywhere. It also provides local services such as email and web hosting. pistibuted Computing + 1-23 Introduction + Firewalls protect an intranet by preventing unauthorized messages leaving or entering; implementing by filtered messages. The cost of software installation and support is reduce by the use of system architectures such as network computers and thin clients, 3, Multimedia system + Digital multimedia : Computer-controlled integration of text, graphics, still images, moving pictures, animation, sound, and any other medium. All these data types are represented, stored, transmitted, and processed digitally. * A continuous media type has an implicit time dimension, while a discrete type does not, Referring to video and audio data as continuous and time based. Continuous refers to the user's view of data. Internally, continuous media are represented as sequences of discrete values that replace each other over time. * Multimedia streams are said to be time-based because timed data elements in audio and video streams define the content of the stream. The systems that support multimedia applications need to preserve the timing when they handle continuous data. * A distributed multimedia system should be able to perform the same functions for continuous media types such as audio and video. It should be able to store and locate audio or video files, to transmit them across the network, to support the presentation of the media types to the user and optionally also to share the media types across a group of users. * Distributed multimedia applications typically handle two different types of communication : Request/Reply interaction for control information as well as real-time streaming data. Web casting * Web casting is an application of distributed multimedia technology. It broadcast continuous media over the internet. A webcast uses streaming media technology to take a single content source and distribute it to many simultaneous listeners /viewers. * Web casting support following distributed multimedia application : 1. It supports for encoding and encryption formats. For example : MP3 standard, MPEG-1, HDTV. 2. It supports quality of service. 3. It uses resources management strategies, including appropriate scheduling policies to support the desired quality of service. Webcasting is also called push technology. It is a method of obtaining information in which a server automatically downloads content to your computer at regular intervals or whenever updates are made to the site. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge ‘pisnbuted Computing 1-25 _ Introduction + The send and the receive events signify the flow of information between processes and establish causal dependency from the sender process to the receiver process. « In the figure, for process p;, the second event is a message send event, the third event is an internal event and the fourth event is a message receive event. causal precedence relation * Ordering of events for a single process is simple: they are ordered by their occurrence. * Send and receive events signify the flow of information between processes and establish causal precedence between events at the sender and receiver. ¢ For any two events ej and e, e; ej denotes the fact that event e; does not directly or transitively dependent on event e;. That is, event e; does not causally affect event ej. Logical vs. Physical concurrency * In a distributed computation, two events are logically concurrent if and only if they do not causally affect each other. Physical concurrency, on the other hand, has a connotation that the events occur at the same instant in physical time. Two or more events may be logically concurrent even though they do not occur at the same instant in physical time. However, if processor speed and message delays would have been different, the execution of these events could have very well coincided in physical time. Whether a set of logically concurrent events coincide in the physical time or not, does not change the outcome of the computation. Therefore, even though a set of logically concurrent events m. at the same instant in physical time, we can assume that the: the same instant in physical time. ay not have occurred se events occurred at Models of Communication Networks * There are several models of the service provided by communication networks, namely, FIFO, Non-FIFO and causal ordering. In the FIFO model, each channel acts as a first-in firs thus, message ordering is preserved by a channel, In the non-FIFO model, a channel acts like a set in which the sender process adds ‘messages and the receiver process removes messages from it in a random order. The “causal ordering" model is based on Lamport’s “happens before" relation. A system that supports the causal ordering model satis?es the following property : rout message queue and TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Distributed Computing * This property ensures that causally related * Causal ordering model considerably simplifies the design Global State of Distributed System individual processes involved in the computation plus the state of the comm Requirements of global states * Fig. 1.11.1 shows detecting global properties. n » |. Distributed debugging : Need collect values of distributed variables at the 1-26 For any two messages my and ry, if send (mij) > send (1tyj then rec (my) ~ rec (ty) oma ' i i ir causality relatio destination are delivered in an order that is consistent with their causality relati; Causally ordered delivery of messages implies FIFO message delivery. of distributed algorithm because it provides a built-in synchronization. i tation ik set of local states oj inition : “The gl a distributed computation is the set of Definition : “The global state of cine, Pi P2 Cet message , 8. Garbage collection obec! - ‘garbage object b. Deadlock ¢. Termination Fig. 1.11.4 . Distributed garbage collection ; An object is considered to be garbage if ther no longer any references to it anywhere in the distributed system. It is based reference counting and should include the state of communication channels. Distributed deadlock detection ; It occurs when each of collection of proce: waits for another process to send it a message and look for “waits-fo relationship. Distributed termination detection : Look for state in which all processes passive. time. TECHNICAL PUBLICATIONS® ~ an up-thrust for Introduction ee —— _—_—— eee See pa Two Marks Questions with Answers a1 What do you mean by message passing ? AU: Dec22 ‘Ans.: In this model, data is shared by se cooperating processes, using system calls. Message passing refers to services performing a simple, one-way transfer operation between two programs nding and receiving messages between Q2 Define distributed program, Ans. + Distributed program is composed of a set of “n” asynchronous processes like PivP2/P3---Pi7Pn that communicate by message passing over the communication network. Q.3 What do you mean by synchronous and asynchronous execution ? Ans. : Synchronous execution means the first task in a program must finish processing before moving on to executing the next task. Asynchronous execution means a second task can begin executing in parallel, without waiting for an earlier task to finish Q4 — List out the features of distributed systems. Ans. Features of distributed systems are heterogeneity, openness, scalability, fault tolerance, transparency and resource sharing. @5 Differentiate between synchronous and asynchronous execution. OE Synchronous execution Synchronous execution means the Asynchronous execution means a first task in a program must finish second task can begin executing in processing before moving on to parallel, without waiting for an executing the next task, earlier task to finish. Asynchronous execution Lower and upper bounds on No bound-on process execution time, execution time of processes can be set, Transmitted messages are received No bound-on message transmission within a known bounded time. (idea fee nerraeie Drift rates between local clocks have No bounds on drift rates between a known bound. local clocks. Q6 What is distributed system 7 Ans.: A distributed system is one in which components located at networked somputers communicate and co-ordinate their actions only by passing messages. A distributed system is a collection of independent computers that appears to its users a single coherent system. TECHNICAL PUBLICATIONS® - an up-thrust for knowledge Distributed Computing 1-26 7 Write down the principles of distributed systems. Ans. : Distributed system consists of a collection of autonomous computers, connected through a network and distribution middleware, which enables computers to coordinate their activities and to share the resources of the system S° that users perceive the system as a single, integrated computing facility. Q.8 State the objectives of resource sharing model. oy oftware or data anywhere in the system. Resource heme and controls concurrency. Ans. : Ability to use any hardware, s manager controls access, provides naming sc Q.9 What are the significant consequences of distributed systems ? EG Ans. : a. No global clock : The only communication is by sending messages through a network. b. Independent failures : The programs may not be network has failed or has become unusually slow. able to detect whether the . Concurrency : The capacity of the system to handle shared resources can be increased by adding more resources to the network. Q.10 Define transparency. What are its types ? Ans. : A distributed system needs to hide the fact that its processes and resources are physically distributed across multiple computers. Q.11 What is the need of openness in distributed system ? ‘Ans. ; Distributed system must be able to interact with services from other open systems, irrespective of the underlying environment. Systems should conform to well-defined interfaces and should support portability of applications. Q12 List any two resources of hardware and software, which can be shared in distributed systems with example. Re ‘Ans. : Hardware resource : Memory cache server and CPU servers do some computation for their clients hence their CPU is a shared resource. Software resource : File : File servers enable multiple clients to have read/write acces to the same files. Database : The content of a database can be usefully shared. There are many techniques that control the concurrent access to a database. Q.13 List an example of distributed system. Ape Distributed system examples : Internet, an intranet which is a portion of the intemet managed by an organization, mobile and ubiquitous computing. Q.14_ Enlist the design issues and challenges of distributed systems. Ans. : Design issues and chall istril is lenges of distributed systems are hi ity openness, security, scalability, failure handling, epcintaes and a; TECHNICAL PURBLICATIONS® gL CREME) Computing 1-29 Introduction 15 Define access trai sparency, Ans.: Enables local and remote information objects to be accessed using identical operations, Q.16 What is replication transparency 2 Ans.: It enables multiple instances of information objects to be used to increase seliability and performance without knowledge of the replicas by users or application progtams, Example : Distributed DBMS, Q.17 What is the goal of concurrency and failure transparency ? Ans. : Enables several processes to operate concurrently using shared information objects without interference between them. Failure transparency : Allows users and applications to complete their tasks despite the failure of other components. Q18 Differentiate between buffering and caching. Ans. : Cache is made from static ram which is faster than the slower dynamic ram used for a butfer. A cache transparently stores data so that future requests for that data can be served faster. A buffer temporarily stores data while the data is the process of moving from one place to another, i.e. the input device to the output device. The buffer is mostly used for input/output processes while the cache is used during reading and writing processes from the disk. Q.19 What is open distributed system 7 Ans. : Open distributed system is a system that offers services according to standard rules that describe the syntax and semantics of those services. Q.20 Give the example of relocation transparency ? ‘Ans.: When mobile users can continue to use their wireless laptops while moving from place to place without ever being disconnected. (21 Describe what is meant by a scalable system ? ‘Ans. : A system is scalable with respect to either its number of components, size or | number and size of administrative domains, if it can grow in one or more of these ions without an unacceptable loss of performance. What is the role of middleware in a distributed system ? . : To enhance the distribution transparency that is missing in network operating s. In other words, middleware aims at improving the single system view that a

You might also like