Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore CU-MCA-SEM II-Parallel and Distributed Computing-Second Draft

CU-MCA-SEM II-Parallel and Distributed Computing-Second Draft

Published by Teamlease Edtech Ltd (Amita Chitroda), 2021-10-12 04:18:43

Description: CU-MCA-SEM II-Parallel and Distributed Computing-Second Draft

Search

Read the Text Version

to be a very powerful method of gaining access to vast amounts of computer power. The goal of such systems is to reduce the cost of communication and computing. The application's processing stages are shared among the participating nodes in distributed systems. The concept of computer communication is at the heart of all distributed computing designs. A distributed system is a programme that runs a set of protocols to accomplish a goal. On a communication network, coordinate the actions of many processes so that all components work together to complete a single or limited set of related tasks. The communication network allows the collaborating computers to access remote and local resources and in distributed system. In a distributed system, the existence of numerous independent computers is invisible to the user. The user is unaware that the jobs are carried out by a number of machines located in different locations. This means that, unlike centralised systems, no single machine in the system is responsible for the whole strain on system resources required to operate a computer programme. Definition of Distributed Computing A distributed system, often known as distributed computing, is a system that consists of several components that are situated on different machines but communicate and coordinate operations in order to seem to the end-user as a single coherent system. Computers, physical servers, virtual machines, containers, and any other node that can connect to the network, contain local memory, and communicate by passing messages are examples of machines that make up a distributed system. Distributed systems can function in one of two ways: Each machine contributes to a common goal, and the end user sees the results as a single entity. Each machine does have its own end-user, as well as the distributed system allows for resource sharing and communication services to be shared. Although distributed systems might be difficult to understand at times, they often have three main characteristics: all components run at the same time, there is no global clock, as well as all components fail independently of one another.A distributed system is a network structure made up of self-contained computers linked together by a distribution middleware. Distributed systems allow users to share various resources and capabilities in order to create a single, integrated, and coherent network. A centralised system is the polar opposite of such a distributed system. It is not a distributed system if all of the components of a computing system are contained in a single machine, and so was the case for early mainframes such as Von Neumann machines. The following are the key characteristics of a distributed system: 101 CU IDOL SELF LEARNING MATERIAL (SLM)

The system's components are running at the same time. There may be several components, but they'll all be self-contained.In a distributed system, there is no need for a global clock. A distributed network model has better fault tolerance than other network models. The price/performance ratio is significantly better. The following are the main objectives of a distributed system: Transparency: Creating a single system image without hiding its location, access, migration, concurrency, failure, relocation, persistence, and resource specifics from the users. Openness: Making it easier both configure and modify the network. A distributed system must be extremely capable of becoming secure, consistent, and capable of disguising mistakes as opposed to a small system. Distributed models are supposed to provide a much-needed performance improvement when compared to conventional models. Scalability: In terms of geography, administration, or scale, distributed systems must be scalable. The following are some of the issues that distributed systems face: In a dispersed setting, security is a major concern, especially when accessing public networks. Whenever the distributed model was constructed on unstable components, fault tolerance may be difficult. If adequate rules or policies are not in place, coordination & resource sharing might be challenging. Administrators and users of a distributed model should have access to process knowledge. Examples of Distributed System In certain ways, any system that consists of autonomous computers cooperating is a distributed system. Distributed systems include the Internet, corporate intranets, and telephone networks. There's also the issue of defining a component as just a machine. The machine must have two characteristics: first, it must have local memory, and second, it must be able to connect to the internet. It's simple to put up distributed systems to accomplish complicated work in modern networks since these two things are plentiful. One of the main problems is how to make network construction easier, such as whether to employ traditional topologies, shift to container or VM virtualization, or use cloud services to outsource topologies to the vendor. 6.2 TYPES OF DISTRIBUTED SYSTEMS The networks that support people in the methods outlined above are built using a variety of distributed systems. A client/server system is a sort of distributed system that divides 102 CU IDOL SELF LEARNING MATERIAL (SLM)

functionality into actions via individual components termed \"clients\" and answers by a server-side provider. Peer-to-peer networks may also be used in new sorts of distributed systems. When a networked mesh of components already exists, such as in autonomous peer-to-peer systems and peer-to-peer systems which use individual smartphone or mobile phone devices, they are beneficial. With the emergence of the Internet of Things as well as the connectivity that entails, the idea of a decentralised peer-to-peer Internet has been discussed, and analogous networks are evolving. Virtualization has altered our perceptions of distributed systems. Regardless of the approach, todays modern distributed systems are intended to be composed of virtual components rather than bare-metal components. It is easier to set up distributed infrastructure and applications on the fly thanks to the logical division of systems and the resulting versatility. The nodes in distributed systems can be configured in client/server or peer-to-peer configurations. The following are the specifics: Client/Server Architectures In a client-server system, the client requests a resource, which the server fulfils. While a client is only in contact with one server, a server can serve several clients at the same time. Both the client and the server normally communicate across a computer network, making dispersed systems possible. Peer-to-Peer (P2P) Systems Peer-to-peer systems have nodes that are equally involved in data sharing. All of the duties are distributed evenly among all of the nodes. The nodes communicate with one another as needed and share resources. This is accomplished through the use of a network. 6.3 ADVANTAGES OF DISTRIBUTED SYSTEMS The following are some of the benefits of distributed systems:  The distributed system's nodes are all connected to one another. As a result, nodes can readily transfer data with one another.  The distributed system may readily expand by adding more nodes, allowing it to scale as needed.  The failure of a single node does not result in the entire distributed system failing. Other nodes will still be able to communicate with one another.  Printers, for example, can be shared among numerous nodes instead of being limited to just one. 103 CU IDOL SELF LEARNING MATERIAL (SLM)

6.4 DISADVANTAGES OF DISTRIBUTED SYSTEMS The following are some of the downsides of distributed systems:  Because both the nodes and the connections must be secured, providing effective security for distributed systems is complex.  While travelling from one node to another, certain messages and data may be lost in the network.  In comparison to a single user system, the database related to distributed systems is highly complicated & difficult to manage.  If all of the distributed system's nodes try to transfer data at the same time, the network may get overloaded. 6.5 GOALS OF DISTRIBUTED SYSTEMS To develop a distributed network worth the time, a number of critical goals must be accomplished. A distributed system must make it simple for users to access resources, disguise the fact as resources are spread across a network, be open, and scalable. Connecting Users and Resources: A distributed system's primary purpose is to make it simple for consumers to connect remote resources and share these with other users in a regulated manner. Resources can be anything; for example, printers, storage facilities, data, files, web pages, & networks are all examples of resources. There are a variety of reasons why resources should be shared. Economics is one of the reasons. Transparency: One of the main goals of a distributed system would be to disguise the fact that its processes and resources are spread over numerous computers. Transparent refers to a distributed system that may display itself to users and devices as if it were a single computer system. As indicated in the table, the concept that transparency could be applied in many areas of a distributed system. The openness of distributed systems is another essential goal. Standard rules in computer networks regulate this same format, content, as well as meaning of messages sent and received, and an open distributed system is one that provides services in standards that describe the syntax of those service instances. These rules are enshrined in protocols. Services in distributed systems are often specified using interfaces, sometimes known as interface definition languages (IDL). IDL interface definitions nearly always simply capture the syntax of services. They precisely specify the names of available functions, as well as the types the parameters, return values, and various exceptions which can be raised. 104 CU IDOL SELF LEARNING MATERIAL (SLM)

Scalability: In distributed systems, the uncertain trend is toward larger systems. This observation has ramifications for distributed file design. Algorithms that work well enough for systems of 100 machines can also work for systems of 1000 machines, and next to nothing for systems of 10,000 machines. To begin with, the centralised algorithm is not scalable. If opening a file requires contacting a single centralised server to record the fact that perhaps the file is open then the server may eventually become a bottleneck as the system grows. The purpose of developing distributed systems would be to make it more reliable than single- processor systems. The notion is that if one machine fails, another becomes accustomed to it. To put it another way, the whole system's reliability can theoretically be a Boolean OR of the component's reliability. With four file servers, including a 0.95 chance of being available at any one time, the likelihood of all four being unavailable at the same time is 0.000006, hence the probability of at least first being available is (1-0.000006) = 0.999994, significantly better than any single server. Performance: It's pointless to build a transparent, flexible, and dependable distributed system if it's slow as molasses. It should not degrade any application in a distributed system any more than it would if it were run on a single CPU. Performance measurements can be used in a variety of ways. One is response time, but others include throughput, system usage, and network capacity consumed. Furthermore, the outcomes of any benchmark are frequently influenced by the benchmark's nature. A benchmark consists of a huge number of separate, CPU-bound computations that produce drastically different results than just a benchmark consisting of scanning one single large file for the same pattern. 6.6 DISTRIBUTED SYSTEM MODELS An architectural model of the distributed system specifies how the system's components interact with one another and how they are mapped on with an underlying computer network. The client-server model as well as the peer process model are two examples. The client- server model can be altered in the following ways: Data partitioning or replication between cooperating servers. Data is cached by proxy servers and clients.Mobile code & mobile agents are used. Applets and object serialisation, for example. In a distributed system, that there's no global time, therefore all communication is done through message forwarding. This is vulnerable to delays, network outages of various kinds, and security threats. Three models are used to address these issues: The interaction model is concerned with performance and the difficulties of establishing time restrictions in a distributed system, such as for message delivery. The failure model tries to provide accurate definitions for the numerous defects that processes and networks display. It establishes dependable communication and proper procedures. Process and network threats are discussed in the security model. 105 CU IDOL SELF LEARNING MATERIAL (SLM)

A distributed system's security can be achieved through securing the processes and channels that they use to communicate, as well as protecting those objects (e.g., web pages, databases, etc.) that they enclose from unwanted access. Object protection: Some objects, such as a user's mailbox, may include private data, while others, such as web pages, may contain shared data. Access rights define who is permitted to conduct certain types of actions (e.g., read/write/execute) on an object. Not being able to properly identify the sender's identity is one of the threats to processes (such as server or client processes). Copying, modifying, or injecting messages as they go through the network and its routers are all threats to communication channels. This poses a threat to information privacy and integrity. Another method of attack is to save copies of the message and replay it at a later time, allowing the message to be reused multiple times (e.g., remove a sum from a bank account). Security concerns are defeated by encrypting messages and authenticating with digital signatures. Modes of use vary greatly: The burden on the system components is quite variable (e.g., some web pages have millions of hits a day and some may have no hits). High transmission bandwidth and low latency are required for some applications (e.g., multimedia apps). A distributed system must be able to work in a variety of contexts, including hardware, operating systems, and networks (e.g., wireless networks operate at a fraction of the capacity and much higher error rates than present day LANs). Internal issues include non-synchronized clocks, concurrency issues, and a variety of hardware and software errors affecting particular system components.Attacks against data integrity, confidentiality, and denial of service are all examples of external threats. The following are some examples of distributed system models: Models of Architecture Models of Interaction Models of Faults 1. Models of buildings The architectural model specifies how responsibilities are dispersed across system components and where they are located. a) Client-server architecture The system is organised as a collection of processes known as servers that provide services to users known as clients. 106 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 6.2 Client Server Model The client-server model is often built on such a simple request/reply protocol, which is implemented using send/receive primitives or remote procedure calls (RPC) and remote method invocation (RMI): The customer submits a request (invocation) request to the client, requesting a service; the server performs the requested service and delivers a response (e.g., the data requested) or perhaps an error code if the task could not be completed. A server can request services from those other servers, effectively becoming the server a client in this new relationship. b) Peer-to-peer All processes (objects) serve the same purpose. Clients and servers are not distinguished when processes (objects) interact. The communication pattern is determined by the application. A huge number of data objects were shared; each computer only has access to a limited portion of the application database. The processing and communication burdens for object access are spread among a large number of machines and access lines. his is the broadest and most adaptable model. Peer-to-peer seeks to solve some of the problems mentioned above. 107 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 6.3 Peer to peer broadcast It disperses shared resources across a large area, allowing users to share processing and communication workloads. Problems with peer-to-peer learning: Due of the high level of complexity Place separate things in a clever way to retrieve them and keep a big number of copies. 2. Model of Interaction Interaction models are used to deal with time, such as process execution, message delivery, and clock drifts, among other things. The following are the main characteristics of synchronous distributed systems: Process execution time can be regulated to lower and upper boundaries. Messages are sent and received within a predetermined time frame. The rate of drift between local clocks has a defined upper constraint. Important ramifications: There is a concept of global physical time in a synchronous distributed system (with a known relative precision depending on the drift rate). Only synchronous distributed exhibit predictable temporal characteristics. Hard real-time applications can only be run on such systems. In a synchronous distributed system, using timeouts to identify process or communication link failures is possible and safe. ☞ It is difficult and costly to construct synchronous distributed systems. 108 CU IDOL SELF LEARNING MATERIAL (SLM)

Distributed asynchronous systems Asynchronous systems are common in distributed systems, particularly those on the Internet. - There is no time limit on the process execution (nothing can be assumed about speed, load, and reliability of computers). - There is no time limit on message transmission delays (nothing can be assumed about speed, load, and reliability of interconnections) - There are no limits on the rate of drift between local clocks. Important ramifications: There is no global physical time in an asynchronous distributed system. Only logical time can be used to reason (see lecture on time and state). In terms of timing, asynchronous distributed systems are unpredictable. There are no timeouts available. In actuality, asynchronous systems are frequently and successfully employed. In practise, timeouts are used to detect failures in asynchronous systems. However, in order to avoid duplicating messages, processes, and so on, extra safeguards must be implemented. Models of Faults Process and communication channel failures are also possible. Both software and hardware flaws could be to blame. In order to develop systems with predictable behaviour in the event of problems, fault models are required (systems which are fault tolerant). Only as long as the genuine faults behave as stated by the \"fault model\" will such a system perform as predicted. 6.7 HARDWARE CONCEPTS Because all distributed systems have many CPUs, the hardware can be structured in a variety of ways, particularly in terms of how they are networked and interact. We'll take a quick look into distributed system hardware in this section, focusing on how the machines are connected. We'll look at some software concerns linked to distributed systems in the next section. Various classification approaches for multi-processor computer methods have been designed throughout the years, but none have gained widespread acceptance. Although it is quite elementary, Flynn's (1972) taxonomy is probably the most commonly quoted. The number pf instruction streams as well as the number of data streams were two features that Flynn thought essential. SISD refers to a computer with such a single instruction stream and just a single data stream. From desktop computers to enormous mainframes, all classic uniprocessor computers (i.e., those with only one CPU) come under this category. SIMD (single instruction stream, multiple data stream) is the next category. Array processors of this type have a single instruction unit that obtains an instruction and then directs several 109 CU IDOL SELF LEARNING MATERIAL (SLM)

data units to execute it in parallel, within each data. These machines are useful for calculations that repeat the same calculation over and over again on multiple sets of data, such as summing up all the elements of 64 distinct vectors. SIMD supercomputers are a type of supercomputer. Figure 6.4 MIMD MISD (multiple instruction stream, single data stream) is the next category. There are no known computers that fit this model. Finally, MIMD stands for a collection of independent computers, with its own programme counter, programme, and data. Because all distributed systems are MIMD, this classification technique isn't really useful for us. Although Flynn came to a halt here, we shall continue. We divide most MIMD computers in two groups in Figure.: those with shared memory, commonly referred to as multiprocessors, and those without, sometimes referred to as Multicomputers. The most important distinction is that in a multiprocessor, all CPUs share a single virtual address space. If a CPU writes the number 44 to address 1000, for example, any other CPU reading from that address will obtain the value 44. The memory is shared by all of the machines. In Distributed Systems, hardware can be structured in a variety of ways: Memories that are shared (Multiprocessors, which have a single address space). Personal Reminiscence (Multicomputers, each CPU has a direct connection to its local memory). 110 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 6.5 Shared memory In a multicomputer, on the other hand, each machine does have its own private memory. If one CPU writes the number 44 to address 1000, the value read by another CPU will be whatever value was previously present. The write to 44 has no effect on its memory. A cluster of personal computers network of interconnected is a frequent example of a multicomputer. Each of these categories could be further subdivided based on the interconnection network's architecture. These two types are labelled bus and switched in Figure. Via bus, we imply that all of the machines are connected by a single network, backplane, bus, cable, or other media. Cable television works on the following principle: the cable provider lays a line down the street, and all of the subscribers' television sets have taps running to it. Unlike cable television, switched systems do not even have a single backbone. Instead, individual cables are used from machine to machine, with a variety of wiring schemes. Messages go over the wires, with each step requiring an intentional decision to route your message across one of the outgoing cables. This is how the global public telephone system is set up. Another feature of our taxonomy is that the machines in some systems are firmly coupled, while in others they are weakly coupled. When a message is conveyed from one computer to another in a tightly coupled system, the delay is minimal, and the data rate is high; such that, the amount of bits per second that can be exchanged is large. The converse is true in a loosely linked system: the intermachine message delay is considerable and the data rate is low. Two CPU processors on the very same printed circuit board connected by wires engraved on the board, for example, are likely to be closely coupled, whereas multiple computers connected by either a 2400 bit/sec modem out over phone system are almost certainly loosely coupled. 111 CU IDOL SELF LEARNING MATERIAL (SLM)

Tightly connected systems are more commonly used as parallel systems (working on a single problem), whereas loosely coupled systems are more commonly used as distributed systems (working on a number of unrelated problems), however this is not always the case. A well- known counterexample is indeed a project wherein hundreds of computers from around the world collaborated to factor a large number (about 100 digits). Each computer was given a separate set of divisors to try, and they all worked on it in their spare time, reporting their findings through email when they were completed. Multiprocessors are more intimately connected than Multicomputers in general as they can exchange data with memory speeds, however some fibreopticMulticomputers also can work at memory speeds. Despite the ambiguity of the terms \"tightly linked\" and \"loosely coupled,\" these are helpful notions, just as saying \"Jack is fat & Jill is thin\" provides information about girth, despite the fact that the terms \"fatness\" and \"thinness\" can generate a lot of debate. The four types in Figure, including bus multiprocessors, switched multiprocessors, bus Multicomputers, & switched Multicomputers, will be discussed in greater depth in the following four sections. Although these issues are unrelated to our main concern, distributed operating systems, they will help to clarify the subject since, as we will see, different types of computers employ different types of operating systems. Multiprocessors – Bus Based  Have a finite amount of scalability  Bus overloading can be avoided via cache memory. Figure 6.6 Multiprocessor Multiprocessors – Switch Based Multiple CPUs can access various memories at the same time. The number of switches determines how many CPUs may access memory at the same time. a) An omega switching network b) A crossbar switches 112 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 6.7 Switch based multiprocessors Multicomputers:- Homogeneous: All CPUs and memory are identical; in bus-based systems, messages are routed through an interconnection network; in switch-based multicomputers (e.g., grids, hipercubes...), messages are routed through an interconnection network. Heterogeneous:  This is the most common topology.  In terms of processor type, memory size, and I/O bandwidth, computers can be very different.  Connections are also varied (a single multicomputer can use LANs, Wide Area ATM, and frame relay networks at the same time).  Because of the inherent variability, sophisticated software is required to construct applications.  SETI@home, WWW are two examples. 6.8 SOFTWARE CONCEPTS Although hardware is vital for distributed systems, it is software that mostly decides how a distributed system looks. Traditional operating systems are very similar to distributed systems. For starters, they serve as resource managers for both the underlying hardware, allowing several users and programmes to share resources including CPUs, memory, peripheral devices, a network, and various types of data. Second, and probably more importantly, distributed systems aim to disguise the underlying hardware's complexity and heterogeneity by providing a virtual platform on which applications can be readily executed. We'll start by looking at operating systems and how they relate to distributed computers to better grasp the nature underlying distributed systems. Tightly coupled systems and loosely 113 CU IDOL SELF LEARNING MATERIAL (SLM)

coupled systems are also the two basic types of operating systems for distributed computers. The operating system in tightly connected systems essentially strives to keep a single, global view of a resources it oversees. Loosely connected systems are made up of a number of computers, each with its own operating system. These operating systems, on the other hand, collaborate to make each other's services and resources available. The distinction between tightly-coupled & loosely-coupled systems is connected to the hardware classification discussed above. A distributed operating system (DOS) is a type of strongly connected operating system that is used to manage multiprocessors and homogenous multicomputer. The basic purpose of a distributed operating system, like traditional uniprocessor operating systems, is to mask the complexities of controlling the underlying hardware so that it may be shared by several processes. Although hardware is vital for distributed systems, it is software that mostly decides how a distributed system looks. Traditional operating systems are very similar to distributed systems. For starters, they serve as resource managers for both the physical infrastructure, allowing several users and programmes to share resources including CPUs, memory, peripheral devices, a network, and various types of data. Second, and probably more importantly, distributed systems aim to disguise the underlying hardware's complexity and heterogeneity by providing a virtual platform on which applications could be readily executed. We'll start by looking at operating systems and how they relate to distributed computers to better grasp the nature underlying distributed systems. Tightly coupled systems & loosely coupled systems are also the two basic types of operating systems for distributed computers. The operating system in tightly connected systems essentially strives to keep a single, global view of a resources it oversees. Loosely connected systems are made up of a number of computers, each with its own operating system. These operating systems, on the other hand, collaborate to make each other's services and resources available. The distinction between tightly-coupled & loosely-coupled systems is connected to the hardware classification discussed above. A distributed operating system (DOS) is a type of strongly connected operating system that is used to manage multiprocessors and homogenous multicomputer. The basic purpose of a distributed operating system, like normal uniprocessor operating systems, is to mask the complexities of controlling the underlying hardware so that it may be shared by several processes. Uniprocessor Operating Systems  An operating system serves as just a resource manager and arbitrator: Controls the CPU, I/O devices, and memory.  The operating system creates a digital interface which is more user-friendly than the hardware. 114 CU IDOL SELF LEARNING MATERIAL (SLM)

 Uniprocessor operating systems have the following structure: One-dimensional (e.g., MS-DOS, early UNIX)  Everything is handled by a single big kernel: a multi-layered design  N layers are used to decompose functionality.  Each layer makes use of layer N-1's services and adds new ones for layer N+1. Traditionally, operating systems have been designed to manage computers only with one CPU. These systems' major purpose is to make it simple for users and applications to share resources including the CPU, main memory, storage, and peripheral devices. Sharing resources refers to the ability for multiple apps to access the same hardware in a separate manner. It appears to an application that it does have its own resources, but that multiple applications may be running on the same system at the moment, each with their very own set of resources. In this way, the operating system is considered to construct a virtual machine, allowing programmes to multitask. The fact that apps are protected from each other is a crucial aspect of sharing resources in a virtual environment. It is not acceptable, for example, that if two independent apps A and B are running at the same time, A can change the data of application B merely by accessing the section of main memory where those data are now stored. Similarly, we must ensure that apps can only use the features provided by the operating system. For example, it is generally not a good idea for an application to be able to copy messages straight to a network interface. Instead, the operating system can provide communication primitives, and it will be possible to send messages between apps on separate machines exclusively using these primitives. As a result, the operating system should have complete control over how hardware resources are allocated and shared. As a result, the vast majority of CPUs support at least two modes. All instructions are allowed to be executed in kernel mode, and the entire memory plus collection of all registers are available during execution. User mode, on the other hand, restricts memory and register access. For example, a programme will not be able to view memory locations outside of the operating system's address range or directly access device registers. The CPU is switched to kernel mode while running operating system code. However, the operating system's implementation of system calls is the only mechanism to move from user to kernel mode. Because system calls are the only basic services provided by an operating system, and because the hardware assists in limiting memory & register access, an operating system was fully controlled. The existence of two modes of operation has resulted in the organisation of operating systems in which kernel mode is used to run almost all operating system code. As a result, a large, monolithic programme that runs in a single address space is frequently produced. 115 CU IDOL SELF LEARNING MATERIAL (SLM)

The disadvantage of this technique is that adapting the system is typically difficult. To put it another way, replacing or adapting operating system components is difficult without a complete shutdown and possibly a full recompilation & reinstallation. From the standpoints of openness, software engineering, dependability, and maintainability, monolithic operating systems are not just a smart idea. Organizing the operating sample into smaller pieces allows for more flexibility. The first section is made up of a set of modules for handling hardware that can also be run in user mode. Memory management, for example, entails keeping track of which bits of memory have been assigned to processes and which are available. Only when the registers of the MMU are set do we need to run in kernel mode. The operating system's second component is a small microkernel that only contains programmes that must run in kernel mode. A microkernel only has to have code for modifying device registers, switching the CPU between processes, controlling the MMU, and recording hardware interrupts in practise. It also includes code for routing system calls to the relevant user-level operating system modules and returning the results. This method yields the arrangement depicted in Figure There are numerous advantages of adopting microkernels. One of the most essential features is its flexibility: because a large portion of the operating system runs in user mode, replacing a module is reasonably simple without having to recompile or reinstall the entire system. Another major consideration is that user-level modules can theoretically be installed on several machines. For example, a file management module can easily be installed on a system other than the one that manages the directory service. To put it another way, the microkernel technique is well-suited to expanding a single-processor operating system to distributed systems. Microkernels have two significant drawbacks. For starters, they work differently than present operating systems, and changing any well-established status quo always encounters fierce opposition (‘‘If this operating system is good enough for my grandfather, it must be good enough for me.\"). Second, microkernels require more communication, resulting in a minor performance penalty. However, given the speed of today's CPUs, a 20% performance loss is rarely fatal. 6.9 SUMMARY  Parallel computing, in its most basic form, is the use of multiple compute resources to solve a computational problem at the same time: a problem is divided into distinct sections that may be performed concurrently. Each component is further subdivided into a set of instructions. 116 CU IDOL SELF LEARNING MATERIAL (SLM)

 To summarise, parallel computing is the technique of breaking down a task into smaller pieces and running each piece on its own processor or computer at the same time. Weather forecasting, movie special effects, and desktop computer applications are all instances of parallel computing.  Systems that are distributed A distributed system is a group of computing devices that can communicate with one another (i.e., a collection of independent computers, interconnected via a network, capable of collaborating on a task).  An architectural model of a distributed system specifies how the system's components interact with one another and how they are mapped onto an underlying network of computers. 6.10 KEYWORDS  Client-A piece of computer hardware or software that accesses a service made available by a server.  Database-An organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex, they are often developed using formal design and modelling techniques.  Interface-A shared boundary across which two or more separate components of a computer system exchange information.  List-An abstract data type that represents a countable number of ordered values, where the same value may occur more than once. 6.11 LEARNING ACTIVITY 1. In many layered protocols, each layer has its own header. Surely it would be more efficient to have a single header at the front of each message with all the control in it than all these separate headers. Why is this not done? 2. Why are transport-level communication services often inappropriate for building distributed applications? 117 CU IDOL SELF LEARNING MATERIAL (SLM)

6.12 UNIT END QUESTIONS A. Descriptive Questions Short questions 1. What is a peer-to-peer system? 2. Define virtualization 3. Give an example for distributed system. 4. What are the characteristics of a distributed system? 5. Define scalability. Long Questions 1. Explain the types of distributed systems. 2. Explain the objectives of distributed system. 3. Explain the characteristics of distributed system. 4. Describe about distributed system models. 5. Explain the hardware and software concepts. B. Multiple Choice Questions 1. In distributed systems, link and site failure is detected by ___________ a. Polling b. Token c. Handshaking 2. A server may serve _________ clients at the same time 118 a. Single b. Multiple c. Forms d. File system 3. It is easy to provide adequate ___in distributed systems. a. Security b. Transparency c. Openness d. Fragments 4. A distributed system contains _____ nodes. a. Zero node b. One node c. Multiple node CU IDOL SELF LEARNING MATERIAL (SLM)

d. No node 5. ____ in distributed system communicate with each other and handle processes in tandem. a. Every node b. No node c. One node d. All the nodes Answers 1-c, 2-b, 3-a, 4-c, 5-d 6.13 REFERENCES Reference books  George Coulouris, Jean Dollimore, Tim Kindberg, “Distributed Systems: Concepts and Design” (4th Edition), Addison Wesley/Pearson Education.  Pradeep K Sinha, “Distributed Operating Systems: Concepts and design”, IEEE computer society press. Text Book References  M.R. Bhujade, “Parallel Computing”, 2nd edition, New Age International Publishers2009.  Andrew S. Tanenbaum and Maarten Van Steen, “Distributed Systems: Principles and Paradigms, 2nd edition, Pearson Education, Inc., 2007, ISBN: 0-13-239227-5. Websites:  https://www.geeksforgeeks.org/introduction-to-parallel  https://hpc.llnl.gov/training/tutorials/introduction-parallel-computing-tutorial  https://www.javatpoint.com/what-is-parallel-computing 119 CU IDOL SELF LEARNING MATERIAL (SLM)

UNIT 7 - DISTRIBUTED SYSTEMS 2 STRUCTURE 7.0 Learning Objectives 7.1 Introduction 7.2 Models of middleware 7.3 Client-Server Model 7.4 Summary 7.5 Keywords 7.6 Learning Activity 7.7 Unit end questions 7.8 References 7.0 LEARNING OBJECTIVES After studying this unit, you will be able to:  Learn about the fundamentals of distributed systems  Explain about the models of middleware  Categorize the elements of client server model  Differentiate various communication models 7.1 INTRODUCTION Various definitions of distributed systems have been proposed in the literature, none of which have been found to be adequate or in accord with one another. It will suffice to give a broad description for our purposes: A distributed system is a group of independent computers that look to its users as though they are one system. There are a few key features to this definition. The first is that a distributed system is made up of autonomous components (such as computers). The fact that users (whether people or programmes) believe they are interacting with a single system is a second factor to consider. This implies that the independent components will have to work together in some fashion. The challenge of designing distributed systems is figuring out how to get people to collaborate. It's worth noting that no assumptions about computer types are made. They could consist of high mainframe computers through small sensor network nodes in principle, even 120 CU IDOL SELF LEARNING MATERIAL (SLM)

within the same single system. Similarly, no assumptions about how computers are connected are made. Later in this chapter, we'll go over these points again. Rather than delving into further detail on definitions, it might be more useful to focus on key aspects of distributed systems. One distinguishing feature is that consumers are largely unaware of the variations between various computers and the ways in which they communicate. The same may be said of the distributed system's internal organisation. Another key feature is that users and applications can interact with a distributed system in a consistent and uniform manner, regardless of the location or time of engagement. Distributed systems should, in theory, be simple to grow and expand. This is a direct result of having autonomous computers while still obscuring how these computers interact with the system as a whole. A distributed system will typically be available at all times, even though some portions may be momentarily unavailable. Users and applications should be oblivious to the fact that parts are being changed or repaired, or that new parts are being introduced to better serve additional users or applications. Distributed systems are frequently organised by a layer of software—that is, logically placed between a higher-level layer comprised of users and applications and a layer beneath consisting of operating systems and basic communication facilities—in order to support heterogeneous computer networks while providing a single-system view, as shown in Figure. Middleware is the term used to describe such a distributed system. Figure 7.1 Network interface Four networked computers & three applications are shown in Figure 7.1, with application B divided over computers 2 and 3. Each application has the same user interface. The distributed system allows components of a single distributed application can communicate with one another, as well as distinct applications to interact with one another. At the same time, it hides the differences in hardware and software from each application as much as feasible. Objectives 121 CU IDOL SELF LEARNING MATERIAL (SLM)

Just because it's possible to create distributed systems doesn't mean it's a good idea. After all, modern technology allows for the installation of four floppy disc drives on a single computer. It's only that it'd be pointless to do so. In this section, we'll go through four key objectives that must be accomplished in order for developing a distributed system to be worthwhile. A distributed system should make resources freely accessible, disguise the fact that they are distributed across a network as much as possible, be open, and be scalable. Increasing Resource Accessibility A distributed system's major purpose is to make it simple for users (and applications) to access and share remote resources in a regulated and efficient manner. Resources can be anything, however some common examples include: Printers, computers, storage facilities, data, files, Web sites, and networks, to name a few, are all examples of technology. There are a variety of reasons why people want to share resources. Economic considerations are one obvious factor. For example, in a small office, it is less expensive to share a printer among numerous users rather than purchasing and maintaining a separate printer for each user. Similarly, sharing expensive resources like supercomputers, high-performance storage systems, imagesetters, and other pricey peripherals makes financial sense. The success of the Internet, with its simple protocols for transferring files, mail, papers, music, and video, demonstrates how connecting persons and resources makes it easier to collaborate and communicate information. The Internet's connectedness has resulted in a slew of virtual organisations in which geographically separated groups of people collaborate using groupware, such as software for collaborative editing, teleconferencing, and so on. Similarly, Internet access has enabled electronic commerce, allowing us to buy and sell a variety of things without having to physically visit a store or even leave our homes. However, as networking and sharing become more common, security becomes more crucial. Currently, systems offer limited security against eavesdropping or communication intrusion. Passwords and other sensitive data are frequently sent across the network in cleartexts (i.e., unencrypted) or stored on servers that we can only hope are reliable. There is a lot of opportunity for development in this area. For example, it is now feasible to place an order for goods only by providing a credit card number. Proof that the consumer owns the card is rarely requested. Placing orders this manner may become possible only in the future if you can physically show that you own the card by inserting it into a card reader. Another security issue is tracking communication in order to create a user's preference profile (Wang et aI., 1998). Such tracking is a clear violation of privacy, especially if it is carried out without the user's knowledge. Increased connectivity can also lead to undesired communication, such as electronic junk mail, sometimes referred to as spam. In such instances, special information 122 CU IDOL SELF LEARNING MATERIAL (SLM)

filters that choose incoming messages based on their content may be required to safeguard ourselves. Transparency in Distribution A distributed system's primary purpose is to conceal the fact that its activities and resources are physically spread across numerous computers. Transparent refers to a distributed system that may display itself to users as if it were a single computer system. Let's start by looking at the many types of transparency that exist in distributed systems. Following that, we'll talk about whether or not transparency is always essential. 7.2 MODELS OF MIDDLEWARE Applications that run different software or run-on separate computer platforms, like people from other countries who can't talk without a translator, require assistance in communicating. Then there's the middleman, sometimes known as middleware. Middleware, sometimes known as a translation layer, is software that lies between a server- based programme and any number of customers who want to use it. In a heterogeneous computing environment, middleware allows students to communicate with each other and with programmes. It's vital to remember that middleware's functions remain concealed, allowing applications and data to be accessible simply - and smoothly - across various architectures, protocols, and networks. Streamlines Business Processes Middleware helps automates business processes by connecting the back-end and front-end operations of a corporation. Consider it the glue that holds diverse applications together, like Web-based applications and legacy mainframe systems. It allows businesses to benefit from their legacy system investments while also connecting to newer systems and the newest advances that generate innovative applications. Middleware can help a firm succeed in the fast-growing world of e-commerce by connecting its payment, accounting, production, and shipping systems including its Internet-based, customer-focused services. Broad Purposes Application-specific, information-exchange, and administration and support middleware are the three primary categories of middleware functions. Application-specific middleware offers services for a variety of applications, including distributed database services, distributed data/object transaction processing, and specialised mobile computing and multimedia services. 123 CU IDOL SELF LEARNING MATERIAL (SLM)

Information-exchange middleware is software that facilitates the transfer of data across a network. It's used to do things like transmit data, send commands, receive responses, check status, and break deadlocks. Management and assistance Middleware is in charge of finding resources, connecting with servers, dealing with security and faults, and tracking performance. Middleware's Different Types Database middleware, application server middleware, message-oriented middleware, transaction-processing monitors, and Web middleware are examples of middleware. While all middleware performs communication duties, the type of middleware a company chooses - or the combination of products - will be determined by the specific information that needs to be sent. Take, for example, kitchen knives. There are several varieties of knives available, however a butcher knife would not be used to cut medium-rare fillet mignon. If gaining access to a database is critical to a company's success, database middleware is the way to go. The company is more likely to employ database software in conjunction with other forms of middleware. Database middleware is solely used to connect applications to one or more local and remote databases. It does not send or receive calls or objects. While database-oriented middleware is simple to set up and affordable, it lacks some of the functionalities offered in more complicated software. For example, database middleware does not support two-way communication between clients and servers. Servers can't contact clients on their own; they can only answer when they're asked. Application server middleware is a Web-based application server that serves as a bridge between browsers and legacy systems by providing interfaces to a wide range of applications. Messaging-oriented middleware connects client and server programmes, allowing data to be sent back and forth on a regular basis. The difference between messaging middleware and an e-mail system is that it transfers data between programmes. If the destination computer is unavailable, the data is stored in a message queue till the machine is available. A transaction-processing monitor is a piece of middleware that sits between a client programme and databases, ensuring that almost all databases are appropriately updated. It's a command programme that coordinates data transport across several terminals and the applications that service them. 124 CU IDOL SELF LEARNING MATERIAL (SLM)

Finally, businesses that want to prosper in e-commerce should have information systems that can adapt to changing business needs. Web middleware also makes it easier for those businesses to link back-end applications to new e-commerce platforms. Middleware models are divided into two categories: logical and physical. The logical middleware model conceptualises how information passes within an organisation. The physical middleware model, on the other hand, reflects both the real method of information movement as well as the technology used. We must first consider point-to-point and many-to-many topologies, as well as synchronous versus asynchronous, before moving on to the logical middleware paradigm. Any exploration of the physical middleware model must include a look at a few different message models. Middleware can be configured as a point-to-point or a many-to-many (including one-to- many) system. Each has its own set of benefits and drawbacks. Point-to-Point Middleware is a type of middleware that connects two or more computers To connect one application to another, point-to-point middleware employs a simple pipe: Application A has a connection to Application B. When Application A wants to interact with Application B, it simply uses a procedure call, or message, to \"shut down\" the pipe. Figure 7.2 Communication interval When compared with other types computer middleware, point-to-point middleware is limited by its inability to successfully bind more than two apps. It also lacks any middle-tier processing capabilities, such as the ability to store application logic or alter messages as they pass down the pipe. Message-Oriented Middleware (MOM) solutions (such as MQSeries) and RPCs are two instances of point-to-point middleware (such as DCE). While classic point-to-point middleware can be used to connect more than two apps, this is probably not a good idea. These devices are designed to provide point-to-point solutions that just require a source and a target application. Managing upwards of two applications introduces far too many 125 CU IDOL SELF LEARNING MATERIAL (SLM)

complications. When using point-to-point middleware to connect more than two applications, you'll need point-to-point links between all of them. Figure 7.3 Message oriented middleware Given that most problem domains involve linking several applications, the point-to-point model's concept should make it evident that it is not a viable application integration solution. Perhaps more importantly, in this case, applications should be linked & information must be broken red through a shared, centralised server in order to communicate information. To put it another way, exchanging data necessitates the use of a message broker, often known as transactional middleware. However, like with anything, these drawbacks are partially outweighed by benefits. The simplicity of point-to-point middleware is a significant benefit. The application integration architect & developer are relieved of the complexity of adjusting to the variances between many sources and the target applications by linking just one application to another. Many-to-Many Middleware is a type of middleware that allows you to communicate with a Many-to-many middleware, as the name implies, connects many applications to other applications. It is the greatest option of application integration because of this feature. Because it is the \"best solution,\" it is the clear middleware trend. This is the most central 126 CU IDOL SELF LEARNING MATERIAL (SLM)

principles middleware architecture in terms of flexibility & applicability to just the application integration issue area, in addition to its capacity to link many-to-many. Integration servers, transaction middleware (application servers & TP monitors), and even distributed objects are all instances of many-to-many middleware. This paradigm can be supported by any form of middleware that really can deal with more than two source and target requests at the same time. Figure 7.4 Interface service While the simplicity of the point-to-point model is a benefit, the model's complexity is a negative. Even though the present generation of middleware technologies is getting better at dealing with complexity of connecting so many systems, there is still a lot of work to be done. After all, it is the developer's responsibility to deal with this level of complexity. Asynchronous vs. Synchronous communication As previously stated, middleware uses both asynchronous and synchronous communication techniques. Asynchronous middleware transfers data asynchronously between one or more programmes, allowing the middleware software to divorce itself from source or target applications. The processing of the applications is not reliant on the processing of other connected applications. The technique that permits this to happen involves the application(s) placing a message inside 127 CU IDOL SELF LEARNING MATERIAL (SLM)

a queue and then going about their business while waiting for responses from other application at a later time (s). The main benefit of the asynchronous architecture is that the middleware does not pause the application while it is being processed. Furthermore, because the middleware is detached from the application, it may always process data regardless of the condition of the other applications. Synchronous middleware, on the other hand, is strongly tied to applications. The middleware is used by the applications to process one or more function calls to a remote application. As just a result, the requesting application must pause processing in order to await a response from the remote programme. This form of middleware is referred to as \"blocking\" middleware. The synchronous model's downside is the application's linkage to the middleware and the remote application. Because the programme relies on the middleware, issues with the middleware, such as network and remote server issues, prevent the application from running. Furthermore, synchronous middleware consumes bandwidth because numerous network calls are required to support a synchronous function call. Because of this shortcoming and its ramifications, the asynchronous approach is clearly the preferable application integration choice. There are two types of connections: connection-oriented and connection-less. Parties involved connect, exchange messages, and ultimately disconnect in connection- oriented communication. This is usually a synchronous procedure, although it can be asynchronous as well. The calling application does not establish a position in the target process in connectionless communication. The receiving application merely processes the request and, if necessary, responds. Communication that is direct The middleware layer receives the message from either the caller application and sends it straight to the remote programme in direct communication. With synchronous processing, either direct or deferred communication is used. Direct is typically synchronous, while queued is typically asynchronous. The direct communication mechanism is used by the majority of RPC-enabled middleware. Communication in Line In most cases, queuing communication necessitates the use of a queue manager that place any message in a queue. The message is then retrieved by the remote application either immediately after it has been sent or at any point in time (barring time-out restrictions). The information goes back through the queuing mechanism if the caller application requests a response (such as a verification message or data) (see Figure). Queued communication is used by the majority of MOM products. 128 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 7.4 Message queue The advantage of queuing communication over direct communication is that the distant programme does not need to be running in order for the calling programme to send it a message. Furthermore, queuing communication middleware normally does not prevent the calling or remote applications from completing their tasks. Publish/Subscribe Publish/subscribe (pub/sub) removes the need for an application to know anything at all about the specific application. All it has to do is deliver the data it wants to share to a destination within the pub/sub engine, sometimes known as a broker. The information is subsequently redistributed by the broker to any applications that are interested. For instance, if a financial application wants to make its accounts receivable data available to other apps, it would notify the pub/sub engine. The engine would then let everyone know that this data was available, as well as any application can subscribe to that subject to get accounts receivable data. The publisher is the information supplier in this circumstance. Publishers provide information on a topic, but they are not required to comprehend the applications that really are interested in the data. The subscriber is the information's recipient or consumer. When the information is published, the publisher specifies a topic. The subscriber chooses a subject that interests them. Only accounts payable information is sent to the subscriber in this instance. 129 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 7.5 Subscriber channels Request a Reaction The request-response approach does exactly what it says on the tin. Request response middleware is used to send a request to an application, and the application responds. Any middleware that may support a response from either a request between applications, like integration servers or application servers, is an example of request and response middleware. Figure 7.6 Request response messaging 130 CU IDOL SELF LEARNING MATERIAL (SLM)

Set Fire to It and Forget It The fire and forget paradigm enable a middleware user to \"fire off\" a message and then \"forget\" about it, without having to worry about who receives it or even if it is ever received. Another example of an asynchronous technique is this. The goal of fire and forget is to let a source or target application send out specified types of messages to a large number of people while avoiding auditing and response features. It also enables central servers to send messages out. AIM stands for application infrastructure middleware, which is software that works as a bridge between different applications or devices. For cloud enablement of existing and new applications, AIM is utilised in the context of public, hybrid, or private cloud computing. It is feasible, for example, to convert current custom programmes into Software as a Service application, with platform middleware handling all of the sophisticated software architecture. Looking at specific examples that weren't created for the cloud but are now used by numerous cloud services is one of the greatest ways to learn middleware. These are some examples: Middleware with a message orientation This type of middleware is an architecture that allows remote programmes to receive and transmit messages. It allows programmes to be distributed across multiple platforms and simplifies the process of developing software applications that span multiple operating systems and network protocols. It is one of the most extensively used types of middleware and has numerous advantages over middleware alternatives (such as hard coding logic). Object Middleware Object Middleware Object MIDD Object middleware, also known as an object request broker, allows applications to send and receive objects and services through an object-oriented system. In a nutshell, it is in charge of object communication. Middleware is software that sits in the middle of an operating system as well as the programmes that execute on it. Middleware allows communication & data management for distributed applications by acting as a covert translation layer. It's also known as plumbing since it connects two apps so that data and databases can flow freely between them. Users can use middleware to make requests like submitting forms in a web browser or allowing the web server to return dynamic web pages based on a user's profile. Database middleware, server software middleware, message-oriented middleware, web middleware, and transaction-processing monitors are all examples of common middleware. Different programmes can communicate through messaging frameworks such as simple object access point (SOAP), web services, representational state transfer (REST), and JavaScript object notation, which are normally provided by each programme (JSON). While all middleware provides communication duties, the type of middleware a firm chooses will be 131 CU IDOL SELF LEARNING MATERIAL (SLM)

determined by the service being used and the sort of data that has to be conveyed. Security authentication, transaction management, message queues, applications servers, web servers, and directories are all examples of this. Instead of transferring data back and forth, middleware can be utilised for distributed processing with operations taking place in real time. In the context of distributed applications, middleware is software that extends the operating system's capabilities to allow the many components of a distributed system can communicate and handle data. Middleware is software that helps to support and simplify large distributed applications. It consists of web servers, application servers, messaging, and other tools that aid in the creation and delivery of applications. Modern information technology xml, SOAP, Web services, & service-oriented architecture relies heavily on middleware. Middleware facilitates interoperability between programmes that operate on different operating systems by providing services that allow the apps to communicate data using industry standards. Middleware is software that lies \"in the middle\" of application software that runs on multiple operating systems. It's comparable to the middle layer of a three-tier single-system design, but it spans several systems or applications. EAI software, telecommunications software, transaction monitors, and communication software are just a few examples. To some extent, the separation between operating system & middleware capabilities is arbitrary. While essential kernel functionality can be delivered by the operating system, certain formerly marketed middleware functionality is now included into operating systems. The TCP/IP telecommunications stack, which is now found in almost every operating system, is a good example. Middleware services provide a more comprehensive set of application programming interfaces that enable a programme to: Locate yourself invisibly across the network, allowing you to interact with another service or application. Filter data to make it more usable or public by using an anonymization method to protect privacy (for example) Be self-contained from network services Always be dependable and available. When contrasted to the operating system and network services, add complementary qualities like semantics. Middleware provides businesses and industries with certain distinct technology benefits. Traditional database systems, for example, are typically deployed in closed environments where users can only access the system over a limited network or intranet (such as an organization's internal network). Users can now access almost any database to which they 132 CU IDOL SELF LEARNING MATERIAL (SLM)

have sufficient access privileges from anywhere on the planet thanks to the extraordinary rise of the World Wide Web. The problem of differing levels of compatibility among different database structures is addressed through middleware. Middleware allows web servers to connect to legacy database management systems (DBMSs) and applications in a transparent manner, regardless of database characteristics. Middleware applications are widely used by businesses to link data from departmental datasets, such as payroll, sales, & accounting, or databases spread across various locations. Laboratories employ middleware software extensively in the highly competitive healthcare industry for data mining, laboratory communications network (LIS) backup, and to combine systems following hospital mergers. Following a hospital buyout, middleware helps to bridge the gap between distinct LISs in a newly created healthcare network. By acting as an independent software platform for their applications, middleware can save software developers from having to design application programming interfaces (API) for each control programme. Using mediation tools (middleware) for future Internet network operations through traffic monitoring in multi-domain situations is a major help since it allows operators, searchers, and service providers can supervise Quality of service & analyse eventual telecommunication service failures. Finally, middleware is used in e-commerce to help handle fast and secure transactions across a variety of computer settings. In summary, because of its capacity to bring resources together across disparate networks or computing platforms, middleware has become a vital component in a wide range of sectors. The European Broadcasting Union (EBU) conducted a study of Middleware in relation to system integration in broadcast environments in 2004. Over the course of a year, system design engineers from ten major European broadcasters collaborated to better understand the impact of primarily software-based products on media creation and broadcasting system design methodologies. The Tech 3300 and Tech 3300s reports that resulted were published and thus are freely available on the EBU website. 7.3 CLIENT-SERVER MODEL The client–server paradigm is a distributed application structure that divides tasks or workloads between servers, who supply a resource or service, and clients, who request that service. Clients and servers connect across a computer network using separate hardware most of the time, however they can share a system. A server host is the computer that executes one or more server programmes that share resources with clients. A client typically does not share some of its resources, but instead asks a server for material or services. As a result, clients start communication sessions to servers, which then wait for incoming requests. Email, network printing, and the World Wide Web are examples of computer applications using the client–server concept. 133 CU IDOL SELF LEARNING MATERIAL (SLM)

Client and server role The relationship between cooperating programmes in an application is described by the \"client–server\" characteristic. The server component performs a function or delivers a service to one or more clients who make requests for it. The services that servers provide are used to classify them. A web server, for example, provides web pages, while a file server serves computer files. Some of the server computer's software & electronic components, from programmes and data to processors and storage devices, can be considered a shared resource. A service is defined as the sharing of a server's resources. Client and server communication The type of the application that requires service functions determines whether a computer is indeed a client, a server, or both. A single machine, for example, can run web server & file server software at the very same time to offer different data to clients making different types of requests. Within the same computer, client software can communicate with server software. Inter-server or server-to-server communication refers to communication between servers, such as data synchronisation. In general, a service is a representation of computer resources, and a client is unconcerned about the server's performance while fulfilling the request and providing the response. Only the content and formatting of the data for the requested service must be understood by the client based on the well-known application protocol. In a request–response messaging pattern, clients and servers exchange messages. A request is sent by the client, and the server responds with a response. Inter-process communication is demonstrated by this message exchange. To communicate, the computers must speak the same language and adhere to the same set of rules then both the client and the server are aware of what to expect. A communications protocol specifies the language and norms of communication. The application layer is where all protocols operate. The basic patterns of the discourse are defined by the application layer protocol. The server may define an application programming interface to further formalise the data exchange (API). The API is a layer of abstraction that allows you to access a service. It makes parsing easier by limiting communication to a single content format. It promotes cross-platform data interchange by abstracting access. In a short period of time, a server may get requests from a large number of different clients. A computer can only accomplish a certain number of tasks at any given time;thus, it relies on a scheduling mechanism to prioritise incoming client requests. The server software may limit client availability to avoid abuse and maximise availability. Denial of service attacks take advantage of a server's obligation to process requests by flooding it with too many requests. If sensitive information is to be exchanged between the client and the server, encryption should be used. 134 CU IDOL SELF LEARNING MATERIAL (SLM)

The client-server paradigm is indeed a distributed application structure which divides tasks or labour between servers, who supply a resource or service, and clients, who request that service. When a client computer submits a data request to the server over the internet, the server receives the request and returns the data packets requested to the client. Clients do not share any of their assets with one another. Email, the World Wide Web, and other client- server models are examples. What is the Client-Server Model and how does it work? In this post, we'll look at the Client-Server concept and how the Internet operates using web browsers. This essay will assist us in establishing a solid web foundation and dealing with web technologies using ease. Client: When we talk about a client, we're talking about a person or an organisation who uses a specific service. A Client is a computer (Host) in the digital world, capable of receiving information or using a specific service from both the service providers (Servers). Servers: When we talk about servers, we're talking about a person or a medium who serves things. A server is a distant computer that offers information (data) and access to certain services in the digital world. So, the Client requests something, and the Server fulfils the request as long as it is stored in the database. Figure 7.7 Client server models What is the relationship between the browser and the servers? To interface with the servers as a client, there are a few steps to do.  The URL (Uniform Resource Locator) of a website or file is entered by the user. The DNS (DOMAIN NAME SYSTEM) Server is then requested by the browser. 135 CU IDOL SELF LEARNING MATERIAL (SLM)

 Lookup the WEB Server's address on the DNS Server.  The WEB Server's IP address is returned by the DNS Server.  The browser sends an HTTP/HTTPS request to the WEB Server's IP address (provided by DNS server).  The website's relevant files are sent over by the server.  The files are subsequently rendered by the browser, and the webpage is shown. The DOM (Document Object Model) interpreter, CSS interpreter, and JS Engine, collectively known as that of the JIT or (Just in Time) Compilers, are used to render the page. Figure 7.8 Different web servers Advantages of Client-Server model:  All data is in one place thanks to a centralised system.  Data recovery is possible, and cost-effectiveness necessitates lower maintenance costs.  The Client and Server capacities can be modified independently. Disadvantages of Client-Server model:  Viruses, Trojans, and worms can infect clients if they are present on the server or are uploaded to the server.  Denial of Service (DoS) attacks are common on servers.  During transmission, data packets might be faked or manipulated.  Phishing, or collecting a user's login credentials or other relevant information, is prevalent, as are MITM (Man in the Middle) assaults. 136 CU IDOL SELF LEARNING MATERIAL (SLM)

7.4 SUMMARY  Middleware models are divided into two categories: logical and physical. The logical middleware model conceptualises how information passes within an organisation. The physical middleware model, on the other hand, reflects both the real method of information movement and the technology used.  Database middleware, application server middleware, message-oriented middleware, web middleware, and transaction-processing monitors are all examples of common middleware. Security authentication, transaction management, message queues, application servers, web servers, and directories are all examples of this.  The goal of middleware is to facilitate communication between different components of an application, or even between distinct apps. Businesses can expect to benefit from middleware in the following ways: Efficient networking. Solutions that are unique.  The client-server paradigm, also known as client-server architecture, is a distributed application framework that divides responsibilities between servers and clients, who can either be in the same system or communicate over a network or the Internet. The TCP/IP protocol suite is commonly used for client-server communication.  A computer system with two logical components: a server that delivers information or services and a client that seeks them. Users on a network, for example, can use client software to access server resources from their own computers. 7.5 KEYWORDS  Reliability-A protocol is said to be reliable if it delivers messages without loss or corruption across a transmission medium.  Socket abstraction-An endpoint for communication between processes supported by most operating systems, which is bound to a local port and an Internet address.  Dependability-The set of requirements placed on a computer system which ensures its correctness, security and fault-tolerance.  Client-server architecture-A widely used architecture model in which client processes interact with individual server processes on separate host computers in order to access shared data.  Broadcast-A form of delivery not requiring switching in which one copy of a packet is delivered to each computer on a network. 7.6 LEARNING ACTIVITY 137 CU IDOL SELF LEARNING MATERIAL (SLM)

1. Imagine a Web server that maintains a table in which client IP addresses are mapped to the most recently accessed Web pages. When a client connects to the server, the server looks up the client in its table, and if found, returns the registered page. Is this server stateful or stateless? 2. Consider a process P that requires access to file F which is locally available on the machine where P is currently running. When P moves to another machine, it still requires access to F. If the file-to-machine binding is fixed, how could the systemwide reference to F be implemented? 7.7 UNIT END QUESTIONS 138 A. Descriptive Questions Short questions 1. What is database middleware? 2. How will you steam line the business process? 3. Distinguish logical and physical middleware. 4. What is a client? 5. What is SOAP? Long Questions 1. Explain the broad purposes of middleware. 2. What is the Client-Server Model and how does it work? 3. Explain the categories of middleware. 4. Describe about client server communication. 5. Explain the applications of middleware. B. Multiple Choice Questions 1. In distributed systems, link and site failure is detected by___ a. Polling b. Handshaking c. Token passing CU IDOL SELF LEARNING MATERIAL (SLM)

d. Communication 2. A “glue” between client and server parts of application is ____ a. Middleware b. Firmware c. Software d. Hardware 3. A software that lies between the OS and the applications running on it. a. Firmware b. Utility software c. Hardware d. Middleware 4. A type of middleware that allows for between the built-in applications and the real- time OS? a. Database middleware b. Firmware c. Embedded middleware d. Hardware 5. What is the other name for object middleware? a. Object request interface b. Object request broker c. Object refer interface d. Object refer broker Answers 1-b, 2-a, 3-d, 4-c,5-b 139 CU IDOL SELF LEARNING MATERIAL (SLM)

7.8 REFERENCES Reference books  George Coulouris, Jean Dollimore, Tim Kindberg, “Distributed Systems: Concepts and Design” (4th Edition), Addison Wesley/Pearson Education.  Pradeep K Sinha, “Distributed Operating Systems: Concepts and design”, IEEE computer society press. Text Book References  M.R. Bhujade, “Parallel Computing”, 2nd edition, New Age International Publishers2009.  Andrew S. Tanenbaum and Maarten Van Steen, “Distributed Systems: Principles and Paradigms, 2nd edition, Pearson Education, Inc., 2007, ISBN: 0-13-239227-5. Websites:  https://www.geeksforgeeks.org/introduction-to-parallel  https://hpc.llnl.gov/training/tutorials/introduction-parallel-computing-tutorial  https://www.javatpoint.com/what-is-parallel-computing 140 CU IDOL SELF LEARNING MATERIAL (SLM)

UNIT 8-COMMUNICATION STRUCTURE 8.0 Learning Objectives 8.1 Introduction 8.2 Layered Protocols 8.3 Remote procedure call 8.4 Remote Object Invocation 8.5 Message oriented communication 8.6 Stream oriented communication 8.7 Summary 8.8 Keywords 8.9 Learning Activity 8.10Unit end questions 8.11References 8.0 LEARNING OBJECTIVES After studying this unit, you will be able to:  Describe about layered protocols and its types  Outline the procedure of message-oriented communication  Explain about remote object invocation  Describe about stream-oriented communication 8.1 INTRODUCTION In a distributed system, communication between two processes is utilized to exchange different information, such as code or even a file, between the processes. Group Communication occurs when a single source process tries that communicate with numerous processes at the same time. A group is a collection of abstracted interrelated processes. The purpose of this abstraction is to disguise the message passing just so the communication appears to be normal. Group communication also makes it easier for processes on various hosts to collaborate and perform activities in a synchronised way, which improves the system's overall performance. 141 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 8.1 Group communication In a distributed system, there are several different types of group communication. Broadcast Communication Because when host process tries to interact with every process inside a distributed system at the same time, this is known as broadcast communication. When a common stream of information needs to be given to each and every operation in the most effective manner possible, broadcast communication comes in handy. Communication is extremely rapid in compared to other kinds of communication because it does not need any processing. It does not, however, support a huge range of procedures and therefore can treat each one separately. Figure 8.2 Broad cast communications Multicast Communication When the host process in a distributed system tries to interact with a specific set of processes at the same time, this is known as multicast communication. This technique is mostly used to discover a solution to the problem of either a high workload on the host system plus redundant data from system processes. Multitasking can greatly reduce the amount of time it takes to handle messages. 142 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 8.3 Multicast Unicast Communication Only when host process tries to interact with a single process inside a distributed system at some point, this is known as unicast communication. However, the same data may be sent to many processes. This works best when two processes are communicating because it only has to deal with one process. However, it incurs costs because it must first identify the particular process and then communicate information/data. Figure 8.4 Unicast communication All distributed systems rely on interprocess communication to function. It's pointless to analyse distributed systems without looking into the manner in which processes on various machines might exchange data. In distributed systems, communication is always relied on low-level message passing provided by the underlying network. Utilizing primitives based on common memory, as available on non-distributed platforms, to express communication is more difficult. Thousands or even millions of processes are commonly separated across a network with unpredictable communication, such as the Internet, in modem distributed systems. The growth of construction distributed applications is extremely challenging unless 143 CU IDOL SELF LEARNING MATERIAL (SLM)

such primitive communication capabilities of computer networks are replaced by someone else. We begin by addressing the rules which communicating processes must follow, known as protocols, and then focus on structuring those protocols in the form of layers in this chapter. After that, we'll explore at three popular communication models: Remote Procedure Call (RPC), Message-Oriented Middleware (MOM), and data streaming. We also cover multicasting, which is the difficulty of distributing data to several receivers. The remote procedure call is our initial paradigm for communication in distributed systems (RPC). RPCs are ideal in client-server applications because they hide the majority of the complexities of message passing. Communication in several distributed applications does not follow the standard client-server interaction pattern. In some circumstances, it turns out here that thinking in terms with messages is more suitable. However, due to their lack of distribution transparency, computer networks' low-level communication facilities are in many respects unsuitable. A high-level message-queuing approach, in which communication is similar to that of electronic maiI systems, is an alternative. Message-oriented middleware (MOM) is a significant topic that deserves its own section. With the introduction of multimedia distributed systems, this became clear that many systems lacked capability for continuous media communication, such as audio and video. The concept of a stream is required, which can sustain a continuous transmission of communication while adhering to various temporal requirements. Streams are covered in a different section. Finally, as our understanding of how to set up multicast facilities has grown, new and attractive data distribution options have evolved. 8.2 LAYERED PROTOCOLS All communication with distributed systems is predicated on sending or receiving (low level) messages due to the lack of shared memory. When process A wishes to interact with process B, it creates a message with its own address space first. After that, it makes a system call that instructs the operating system to transfer the data. B receives a message through the network. Despite the fact that this basic concept appears to be straightforward, To avoid chaos, A and B must agree upon on meaning of both the bits being sent.sent. If A submits a fantastic new novel translated into French and encoded in IBM's encoding system,B expects a supermarket's inventory written in EBCDIC character code.Communication would be less than ideal if it is done in English & encoded in ASCII. A variety of agreements are required. How many volts must be utilised in this situation? 144 CU IDOL SELF LEARNING MATERIAL (SLM)

How many volts do you need to indicate an O-bit, and also how many volts do you need to signal an I-bit? What does the receiver determine which message is which? Is this the final part of the message? How does it know if a message is damaged or not? What should it do if it discovers it is missing? How long do numbers, strings, and words last? what more data elements are there, and how are these represented? In a nutshell, agreements are required at all levels. A number of levels, ranging from the low-level minutiae of bit transmission to both the high- level details of data transferhigh-level details about how data should be expressed. They were never widely used and are now essentially extinct. The fundamental paradigm, however, is flawed. It has shown to be quite beneficial in the study of computer networks. Although we do not want to provide a comprehensive description of such a model and all its implications in this paper, a brief overview will be useful. See Tanenbaum for more information (2003). The OSI model was created to allow open users to communicate with one another. An open system is one that can communicate with every other open system by following a set of standard rules that control the format, content, and meaning of messages sent and received. Protocols are formalised versions of these rules. To communicate more than a network, a collection of computers must all agree on the protocols for use. There are two sorts of protocols that can be distinguished. Before sharing data with connection-oriented protocols, the sender and receiver must first expressly establish a connection and optionally negotiate the protocol they will use. They should release (terminate) the connection after they are finished. The telephone is a communication method that is based on making connections. There is no need to set up anything in advance with connectionless protocols. When the sender is ready, it simply sends the first message. Connectionless communication is as simple as dropping a letter in a mailbox. Both connection-oriented and connectionless communications are frequent with computers. Communication is organised into seven tiers or layers in the OSI model, as seen in Figure. Each layer focuses on a different facet of communication. The problem can then be broken down into smaller chunks, each of which can be solved independently of the others. Each layer communicates with the one above it. The interface is made up of a collection of operations that define the service that the layer is ready to provide to its users. 145 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 8.5 Datalink layer When process a on machine 1 wishes to connect with process B on machine 2, it creates a message and sends it to its machine's application layer. This layer could be implemented as a library procedure, but it could also be implemented in other ways (e.g., within the operating system, on an external network processor, etc.). The application layer software then inserts a header to the front of the message and sends it to the presentation layer over the layer 6/7 interface. In tum, the presentation layer adds its own header and sends the result to the session layer, and so on. Some layers include both a front and back header, as well as a trailer at the conclusion. When it reaches the bottom, the physical layer places the message (which may now resemble that depicted in Figure.) on the physical transmission media. Figure 8.6 OSI model 146 CU IDOL SELF LEARNING MATERIAL (SLM)

When the message reaches machine 2, it is sent upward, with each tier removing and inspecting its own header. Finally, the message reaches the recipient, process B, who may respond by taking the opposite way. The layer n protocol uses the information in the layer n header. Consider the communication between Zippy Airlines as well as its caterer, Mushy Meals, Inc., as an example as to why layered procedures are vital. Every month, Zippy's head of passenger service instructs her secretary to contact Mushy's sales manager's secretary in order to place an order for 100,000 cartons of rubber chicken. Traditionally, orders were sent over the mail. However, when the postal service deteriorated, the two secretaries eventually agreed to stop using it and communicate via e-mail. They could do so without troubling their superiors because their protocol only concerns the physical conveyance of commands, not their content. Similarly, the head for passenger service can opt for Mushy's new special, prime rib from goat, instead of rubber chicken, without harming the secretaries. It's worth noting that there are two tiers here: bosses and secretaries. Each layer has its own protocol (conversation topics and technology) that may be altered without affecting the others. Layered protocols appeal to people because of their independence. Each one can be updated as technology advances without affecting the others. As shown in Figurethe OSI model has seven layers rather than two. A protocol suite, often known as a protocol stack, is a set of protocols utilised in a specific system. It's critical to distinguish between a reference model and its protocols. The OSI protocols, as previously said, were never particularly popular. Protocols established for the Internet, like TCP and IP, are, on the other hand, widely utilised. Starting at the bottom, we'll look at each of the OSI levels in turn in the sections below. Instead of offering examples of OSI protocols, we'll highlight a few of the Internet protocols that are used in each layer. Lower-Level Protocols The three lowest layers of both the OSI protocol suite are discussed first. These layers work together to implement the core functionalities of a computer network. The Os and Is are sent through the physical layer. The physical layer must decide how many volts to use for 0 and 1, how so many bits per second can be delivered, and whether transmission may take place both in directions at the same time. The size and shape of both the network connector (plug), as well as the number of pins and their meanings, are all factors to consider. The physical layer protocol is responsible for standardising electrical, mechanical, and signalling interfaces so when one machine delivers a 0 bit, it is received as a 0 bit rather than 147 CU IDOL SELF LEARNING MATERIAL (SLM)

a 1. Several physical layer standards (for various media) have been developed, such as the RS-232-C standard besides serial communication lines. The physical layer does nothing but send bits. Everything is fine as long as there are no errors. Real-world communication networks, on the other hand, are prone to faults, necessitating the development of a method to identify and repair them. The data link layer's primary function is to implement this method. Its job is to arrange bits into units, which are commonly referred to as frames, and ensure that each frame is successfully received. The data link layer fulfils its job by marking the start and end of each frame with a unique bit pattern, as well as generating a checksum by adding all the bytes throughout the frame in a specific order. The checksum is appended to the frame by the data link layer. When the frame comes, the receiver recalculates the checksum from the data & compares the result to a previous frame's checksum. The frame is considered right and acceptable if the two agree. They have a disagreement. The receiver requests that the sender send it again. Sequence numbers are assigned to frames (in the header) so that everyone knows which is which. On a LAN, the sender normally does not need to find the receiver. It simply sends the message out over the network, and the receiver receives it. A wide-area network, on the other hand, is made up of a huge number of machines, each with a set of connections to other machines, similar to a large-scale map depicting important cities and the highways that connect them. A message may have to make any number of hops to go from one sender to the receiver, with each hop deciding which outbound line to utilise. Routing is the question about how to find the optimum path, and it is effectively the network layer's principal duty. The fact that the shortest path is not always the optimal route adds to the complexity of the situation. What counts most is the amount of delay on a specific route, which is proportional to the volume of traffic as well as the number of responses queued for transmission across the various lines. As a result, the delay can alter over time. Some routing algorithms strive to adapt to shifting loads, while others rely on long-term averages to make judgments. The connectionless IP (Internet Protocol), which really is part of the Internet protocol family, is currently the most extensively used network protocol. Without any setup, an IP packet (the technical word for a message in the network layer) can be transmitted. Each IP packet gets routed to its intended destination independently of other IP packets. There is no internal path that is chosen and remembered. Transport Protocols The three lowest layers of both the OSI protocol suite are discussed first. These layers work together to implement the core functionalities of a computer network. 148 CU IDOL SELF LEARNING MATERIAL (SLM)

The Os and Is are sent through the physical layer. The physical layer must decide how many volts to use for 0 & 1, how so many bits per second could be delivered, and whether transmission may take place both in directions at the same time. The size and shape of both the network connector (plug), as well as the number of pins and their meanings, are all factors to consider. The physical layer protocol is responsible for standardising electrical, mechanical, and signalling interfaces so when one machine delivers a 0 bit, it is received as a 0 bit rather than a 1. Several physical layer standards (for various media) have been developed, such as the RS-232-C standard besides serial communication lines. The physical layer does nothing but send bits. Everything is fine as long as there are no errors. Real-world communication networks, on the other hand, are prone to faults, necessitating the development of a method to identify and repair them. The data link layer's primary function is to implement this method. Its job is to arrange bits into units, which are commonly referred to as frames, and ensure that each frame is successfully received. The data link layer fulfils its job by marking the start and end of each frame with a unique bit pattern, as well as generating a checksum by adding all the bytes throughout the frame in a specific order. The checksum is appended to the frame by the data link layer. When the frame comes, the receiver recalculates the checksum from the data & compares the result to a previous frame's checksum. The frame is considered right and acceptable if the two agree. They have a disagreement. The receiver requests that the sender send it again. Sequence numbers are assigned to frames (in the header) so that everyone knows which is which. On a LAN, the sender normally does not need to find the receiver. It simply sends the message out over the network, and the receiver receives it. A wide-area network, on the other hand, is made up of a huge number of machines, each with a set of connections to other machines, similar to a large-scale map depicting important cities and the highways that connect them. A message may have to make any number of hops to go from one sender to the receiver, with each hop deciding which outbound line to utilise. Routing is the question about how to find the optimum path, and it is effectively the network layer's principal duty. The fact that the shortest path is not always the optimal route adds to the complexity of the situation. What counts most is the amount of delay on a specific route, which is proportional to the volume of traffic as well as the number of responses queued for transmission across the various lines. As a result, the delay can alter over time. Some routing algorithms strive to adapt to shifting loads, while others rely on long-term averages to make judgments. The connectionless IP (Internet Protocol), which really is part of the Internet protocol family, is currently the most extensively used network protocol. Without any setup, an IP packet (the 149 CU IDOL SELF LEARNING MATERIAL (SLM)

technical word for a message in the network layer) can be transmitted. Each IP packet gets routed to its intended destination independently of other IP packets. There is no internal path that is chosen and remembered. The transport layer is the final component of what is known as a basic network protocol stack, in that it provides all services that are not provided at the network layer's interface but are reasonably required to develop network applications. To put it another way, the transport layer transforms the underlying network towards something that can be used by an application developer. On their transit from the sender to the recipient, packets can be lost. While some apps can manage error recovery on their own, others need a secure connection. The transport layer's role is to deliver this service. The notion is that the application layer must be able to send a message to a transport layer with confidence that it will arrive intact. When the transport layer receives a message from the application layer, it breaks it down into small enough parts for transmission, assigns it each a sequence number, and delivers them all at once. The transport layer header contains information about which packets have been delivered, which have been received, how many more the receiver may accept, that should be retransmitted, and other issues. On top of connection-oriented as well as connectionless network services, reliable transport links (which are by definition connection orientated) can be constructed. In the first example, all packets would arrive in the right order (assuming they arrive at all), but in the second case, one packet may take a different route & arrive before the packet transmitted before it. It is essential to the transport layer software to restore everything in order to keep the illusion that even a transport connection is like a huge tube into which messages are inserted and then returned in the same sequence in which they were received. The transport layer is responsible for providing such end-to-end communication behaviour. TCP (Transmission Control Protocol) is the Internet transport protocol, and it is defined in full in Comer (2006). The TCPIIP combination has become the de facto standard all network communication. The Internet protocol suite also includes UDP (Universal Datagram Protocol), a connectionless transport protocol that is essentially IP with a few tweaks. UDP is commonly used by user programmes that do not require a connection-oriented protocol. New transport protocols are introduced on a regular basis. The Real-time Transport Protocol (RTP), for example, was created to facilitate real-time data transport. In the sense that it describes packet formats for real-time communication without providing the actual methods for ensuring data delivery, RTP is a framework protocol. It also specifies a mechanism for monitoring and regulating RTP packet data flow (Schulzrinne et al., 2003). Higher- Level Protocols 150 CU IDOL SELF LEARNING MATERIAL (SLM)


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook