Distributed System

A Distributed System is a collection of independent computers that appears to its users as a single coherent system.

Goals of  Distributed System
  1. Connecting User and Resources.
  2. Transparency.
  3. Openness.
  4. Scalability.
Hardware and Software Concept:
Hardware Concept: All distributed system consist of multiple CPUs.There are several different ways the hardware can be organized,especially in terms of how they are interconnected and hoe they communicate.Various classification schemes for multiple CPU computer systems have been proposed such as:

  • SISD:-A computer with single instruction stream and single data stream is called SISD.All uniprocessors computer fall in this category from personal computer to large mainframe.
  • SIMD:-It is a single instruction stream,multiple data stream.This type refers to array processors with one instruction unit that fetch an instruction and then command,many data units to carry it out in parallel,each with its own data.
  • MISD:-It is a multiple instruction stream,single data stream.No known computers fit in this model.
  • MIMD:- It is a multiple instruction stream,multiple data stream.It means a group of independent computers each with own programs and data.All distributed system are MIMD.
          MIMD computers are divided into two categories.
               1.Multiprocessors (shared memory).
               2.Multicomputers.    



Bus-based Multiprocessor:Bus based multiprocessors consist of number of CPUs all connected to common bus,along with memory module.When a CPU wants to read a memory modules all use the same bus for communication.When CPU wants to read a memory work,it first wants on the bus,asserts a few control signals and wait until the memory puts the desired word on the bus show in the fig below:

     

Switched Multiprocessor: To built multiprocessor with more than 64 processors, a different method is needed to connect the CPUs with memory,One possibility is to divide the memory up into modules and connect them to the CPUs with a crossbar switch.Each CPU and each memory has a connection coming out it.At every intersection there is a tiny electronic crosspoint switch that can be opened and closed in hardware when a CPU wants to access a particular memory, the crossbar switch connecting them is closed.

Bus Based Multicomputers : Multicomputers can be design easily.Each CPU has a direct connection to its own local memory.The only problem left is how the CPU communicate with each other.Thus some interconnection scheme is needed here too,but since it is only for CPU-to-CPU communication,the volume of traffic will be several orders of magnitude lower than when the interconnection network is also used for CPU-to-Memory traffic.

Switched Multicomputers: Various interconnection networks has been proposed and built,but all have the property that each CPU has direct and exclusive access to its own private memory.Here two popular topologies are describe Grid and hypercube.Grid are easy to understand and layout on printed circuit boards.It is two dimension in nature such as graph theory.A hypercube is an n-dimensional cube.Here each vertex of cube is a CPU.Each edge is connection between two CPUs.The connecting vertices in each of the two cube are connected.To extend the hypercube to 5 dimensions,we would add another set of two interconnected cube and connect the corresponding edge.For an n-dimensional hypercube,each CPU has n connections to other CPUs.

Software Concept:-Software is an important part of system.In this section we will introduce the various type of Operating system for Multiprocessors and Multicomputers.Operating System for distributed systems for different computers can be divided into two categories such as Tightly Coupled Operating System and Loosely Coupled Operating System.
  • Tightly Coupled System: In this system the operating system essentially tries to system can be thought of as a collection of a computers each running their own operating system.However these operating system work together to make their own services and resource available to the others.
  • Loosely Coupled System: In this category machine and users feel they are independent to one another, but they share some resources such as printer,database etc.
On the basis of above category following Operating System are describe:
1. Network Operating System (NOS): NOS provide services to client in network.Both the client-server and peer-to-peer networking models use NOS.NOS must able to handle following responsibilities such as:
  • Providing access to remote printers,managing which users are using which printers,managing how print job are queued and recognizing when device are not available to the network.
  • Enabling and managing access of files on remote systems and determining who can access what and who can not.
  • Granting access to remote applications and resources such as the internet and making those resources seem like local resources to the user.
  • Providing remote services,including support for major networking protocols.So that the Operating System knows what data to send what.
  • Monitoring the system and security.
  • NOS such as LINEX / UNIX /WINDOWS /MAC O.S /NETWARE etc.
................Referenced By Internet
2. Distributed Operating System (DOS): DOS is a model when distributed application are running on multiple computers linked by communication.A DOS is an extension of the network operating system that supports higher level of communication and integration of machine on the network.This system looks to its user like an ordinary centralized operating system but run on multiples independent CPUs. DOS such as LOCUS (provide access local and distinct files) / MICROS (provide sharing of resources).

3.Multiprocessor Time Sharing System:Multiprocessor are the most general example that operate as a timesharing system but with multiple CPU instead of one CPU.In this system queue is kept in the shared memory.A queue contains a list of all the process in the system that are logically unblocked and ready to run.
For example suppose there are three CPU and five process that are ready to run.All five process are located in the shared memory and three of them are currently executing such as CPU1-Process1,CPU2-Process2,CPU3-Process3, the Process4 & 5 are also in memory and waiting for their turn.

Client-Server Model:In the basic client-server module,processes in a distributed system are divided into two groups. A server is a process implementing a specific services.For example,a file system service or a database service.A client is a process that request a service from a server by sending it request and subsequently waiting for the server's reply.The client-server interaction also known as request-reply behavior.To avoid the considerable overhead of the connection-oriented protocol such as TCP/IP or OSI,the client-server model is usually based on a single connection less request/reply protocol.
The primary advantage of this model is Simplicity and Efficiency.

Remote Procedure Call (RPC):Most of the computer programs run procedures, or sets of instructions, using the computer's CPU. In other words, the instructions are processed locally on the same computer that the software is running from. Remote procedure calls, however, run procedures on other machines or devices connected to a network. Once the instructions have been run, the results of the procedure are usually returned to the local computer.Remote procedure calls are based on the client-server model, where multiple client computers may connect to a server and retrieve data from it.

For example, a computer without a hard drive may use an RPC to access data from a network file system (NFS). When printing to a network printer, a computer might use an RPC to tell the printer what documents to print. A client system connected to a database server may execute an RPC to process data on the server.
when a process machine1 calls a procedure on machine2 the calling process on 1 is suspanded and the execution of called procedure takes place on 2.Information can be transported from the caller to callee in the parameters and can come back in the procedure results.No message passing or I/O at all is visible to the programmer.This technique is known as RPC.
The idea behind RPC is to make a remote procedure call look as much as possible like a local one.In the simplest form,to call a remote procedure,the client program must be bound with a small library procedure called the client stub that represents the server procedure in the client address space.Similarly the server is bound with a procedure called the server stub.
For making RPC there are following steps:

  • The client calling the client stub.The call is a local procedure call,with the parameter pushed onto the stack in the normal way.
  • The client stub packing the parameter into a message and making a system call to send the message packing the parameters is called marshaling.
  • The kernel sending the message from the client machine to the server machine.
  • The kernel passing the incoming packet to the server stub.
  • Finally the server stub calling the server procedure.The reply traces the same in the direction.

RPC Occurs in the following steps:
  • The client procedure calls the client stub in the normal way.
  • The client stub builds a message and calls the local operating system.
  • The client OS sends the message to the remote OS.
  • The remote OS gives the message to the server stub.
  • The server stub unpacks the parameters and calls the server.
  • The server does the work and returns the result to the stub.
  • The server stub packs it in a message and call it to local OS.
  • The server OS send the message to the client.
  • The client OS gives the message to the client stub.
  • The stub unpacks the result and return to the client.
Remote Object Invocation (ROI): In this scenario there are two type of distributed objects are supported. 
  • Distributed dynamic object.
  • Named object. 
A distributed dynamic object is an object that a server creates locally on behalf of a client, and which is accessible only to that client.To create an object , a client will have to issue a request at the server.Therefore each class of dynamic object has an associated create procedure that can be called using a standard RPC.
A named objects are not intended to be associated with only a single client but are created by server to have it shared by several clients.Name objects are registered with a directory service so that a client can look up the object and subsequently bind it.Each remote object invocation in DCE is done by means of an RPC. When a client invokes a method of an object,it passes the object identifier,the identifier of the interface that contains the method,an identification of the method itself,and parameters to the server.The server maintains an object tale from which it can derive which object is to be invoked if given the object identifier and interface identifier.It can then properly dispatch the requests method with its parameters.Because a server may have thousand of object to serve,DCE offers the possibility to place objects in secondary storage instead of keeping all object active in main memory.When an invocation request comes in for which no object can be found in the server object table,the run time system can be alternatively invoke a server-specific lookup function to first retrieve the object from secondary storage and place it into the server's address space.After the object is placed into  the main memory,the invocation can take place.
Message Oriented Communications: Remote procedure calls and remote object invocations contribute to hiding communication in distributed systems,that is,they enhance access transparency.In particular,when it cannot be assumed that the receiving side is executing at the time a request is issued,alternative communication service are needed.Likewise the inherent synchronous nature of RPC and RMI,by which a client is blocked until its request has been processed sometimes needs to be replaced by something else.Application are always executed on host,where each host offer an interface to the communication system through which message can be submitted for transmission.The host are connected through a network of communication servers, which are responsible for passing message between hosts.we may assume that each host is connected to exactly one communication server.We assume that buffers could be placed only at hosts.We need to consider that buffers can also be placed in the communication servers.
For example consider an Electronic Mail system based on this design.A host runs a user agent:the application by which a user can compose,sent ,receive and read messages.Each host is connected to exactly one mail server,corresponding to what we have called a communication server.The interface at the user host allows the user agent to send messages to a specific destination. When.When the user agent submit a message for transmission at its host,the host generally forwards the message first to its local mail server where it is temporarily stored in an output buffer.A mail server removes a message from its output buffer and look up the destination.Looking up the destination returns the address of the mail server to which the message should be sent.The mail server subsequently sets up a connection and passes the message to the target mail server.The latter stores the message in an input buffer for the designated receiver,also called receiver mailbox.If the target mail server is unreachable,for example,because it has shut down,the local mail server will continue to store message.The interface at the receiving host offers a service to the user mailbox at the local mail server,but in many cases copies new messages to a local buffer on its host.
Stream Oriented Communication: A completely different form of communication is that of streaming in which the issue is whether or not two successive message have to temporal relationship. Incontinent data streams,a maximum end-to-end delay is specified for each message.In addition it is also required that messages are sent subject to a minimum end-to-end delay.Typical example of such continuous data streams are video and audio streams.A data stream is nothing but a sequence of data units.Data stream can be applied to discrete as well as continuous media.Playing an audio file typically require setting up a continuous data stream between the file and audio device.

2 comments: