Lecture DS

Chapter 1 : Introduction To Distributed Systems

Question 1 . Describe and define Distributed System

A distributed system consists of a collection of autonomous computers linked by a computer network and equipped with distributed system software. Distributed system software enables computers to co-ordinate their activities and to share resources such as computer hardware, software and data. Users of a distributed system should perceive a single, integrated computing facility even though the system is implemented using many computers in different locations.

Question 2. Enumerate and describe its characteristics

Six key characteristics are primarily for the usefulness of distributed system.

1. Resource sharing - The term " resource" is a rather abstract one, but it best characterized range of things that can be shared usefully in a distributed system. The range extends from hardware components such as disks and printers to software. Users of both centralized and distributed computer systems are having the benefit of resource sharing. The benefits of shared access to a single filing system containing databases, programs, documentation and other information were first recognized with the emergence of multi-user or time-sharing systems.

2. Openness - The openness of a computer system is the characteristic that determines whether the system can be extended in various ways. A system can be open or closed with respect to hardware extensions. The addition of peripherals, memory or communication interfaces - or with respect to software extensions - the addition of operating system features, communication protocols, and resource sharing services. The openness of distributed systems is determined primarily by the degree to which new resource sharing services can be added without disruption to or duplication of existing services.

3. Concurrency - when several processes exist in a single computer they are executed concurrently. If the computer is equipped with only a single central processor, this is achieved by interleaving the execution of portion of each process. If the computer has n number of processors, then up to n processors can be executed simultaneously. In distributed systems there are many computers, each with one or more central processors. If there are m computers in a distributed system with one central process each, then up to m processors can run in parallel, provided that the processors are located in different computer.

4. Scalability - distributed systems operate effectively and efficiently in many different scales. The smallest practicable distributed system probably consists of two workstations and a file server, whereas a distributed system constructed around a single LAN may contain several hundred workstations and many file servers, print servers and other special purpose servers. Several LAN are networks are often interconnected to form internetworks, and these may contain many thousand of computers that form a single distributed system, enabling resources to be shared between all of them

5. Fault tolerance - computer systems sometimes fail. When faults occur in hardware or software, programs may produce incorrect results or they may stop before they have completed the intended tasks.

6. Transparency - transparency is defined as the concealment from the user and the application programmer of the separation of components in a distributed system, so that the system is perceived as whole rather than as a collection of independent components. The implications of transparency are a major influence on the design of the system software.

Question 3. Discussed the design issues associated in DS and give a short explanation on each issue

+ Naming

+ Communication

+ Software structure

+ Workload allocation

+ Consistency maintenance

- Naming:

The name assigned to recourses or objects must have global meanings that are independent of the locations of the object.

They must be supported by a name interpretation system that can translate names in order to enable programs to access named resource.

A design issue is to design naming schemes that will scale to an appropriate degree and in which names are translated efficiently to meet appropriate goals for performance.

- Communication

The performance and reliability of the communication techniques used for the implementation of distributed system are critical to their performance.

Communication can be time-consuming because of the number and complexity of the software layer involved.

A design issue to optimize the implementation of communication in distributed systems while retaining a high-level programming model for its use.

- Software structure

The design issues is to structure a system so that new services can be introduced that will inter-work fully with existing services without duplicating existing services elements

A design issue is to structure a system so that new services can be introduced that will interwork fully with existing services without duplicating existing service elements.

- Workload allocation

The design issues for distributed system is how to deploy the processing, communication and resource in a network to optimum effect in the processing of a changing workload

- Consistency maintenance

The maintenance of consistency at reasonable cost is perhaps the most difficult problem encountered in the design of DS

Chapter 3 : Communication In Distributed Systems

Question 4 : Define and describe remote procedure call

Two parties in client-server computing is involved . The two parties are the caller and the cal lee. The caller passes some parameters to the cal lee. The cal lee receives the parameters and returns one or more values to the caller after processing. In Remote procedure call ( TPC ) the caller and the cal lee comes under different hosts. But in the Local procedure call , the caller and the cal lee comes under the same host.

Information can be transported from the caller to the caller in the parameters and can come back in the procedure result. No message passing at all is visible to the programmer. This method is known as Remote Procedure Call or often just RPC.

Question 5 : List and describe its advantages

- Remote interfaces can be specified as a set of named operations

- Communication code can be generated automatically

- Portable client-server modules can be developed

- Widely understood and used by users

Question 6 : Define Message Passing

-When processes interact with one another, two fundamental requirements must be satisfied: synchronization and communication. Processes need to be synchronized to enforce mutual exclusion: cooperating processes may need to exchange info. One approach is to providing both of these functions is message passing.

Chapter 4 : Remote Procedure Call

Question 1 + 2 : ( Same Q1,2- Chapter 3 )

Question 7 : Define Parameter Passing

-The mechanism used to pass parameters to a procedure (subroutine) or function.

-The most common methods are to pass the value of the actual parameter (call by value), or to pass the address of the memory location where the actual parameter is stored (call by reference).

-The latter parameter allows the procedure to change the value of the parameter, whereas the former method guarantees that the procedure will not change the valued of the parameter.

-Other more complicated parameter-passing methods have been devised, notably call by name in Algol 60, where the actual parameter is re-evaluated each time it is required during execution of the procedure.

Chapter 5

Question 8 : Give the differences between logical and physical time

* Logical time: Time is an important and interesting issue in DS, for several reasons:

- The first: time is a quality we often want to measure accurately. It is necessary to synchronize thee computer's clock with an authoritative and external source of time. This is known as internal synchronization. Also, if computer clocks are synchronized with one another to a known degree of accuracy than we can, within the bounds of this accuracy, measure the interval between two messages occurring at different computers by appealing to their internal clocks. This is known as internal synchronization.

- The second: algorithms are depended upon clock synchronization have been developed for several problems concerning DS. It includes:

 Maintaining the consistency of distributed data

 Checking the authenticity of a request sent to a process

 Eliminating the processing of duplicate updates

* Physical time

- Nearly all computers have a circuit for keeping track of time.

- This circuit is commonly called "clock" although the word "timer" would fit better.

- With a single computer and a single clock. It doesn't matter if this clock is off by a small amount.

- All processes on this computer use the same clock, they will still be internally consistent.

- With multiple computer come into play, each with its own clock, the situation changes dramatically.

- Although the speed of the individual clocks stays fairly constant it is impossible to guarantee that the clocks in different computer all run exactly the same speed. The resulting different in time values is called Clock skew.

Chapter 6

Question 9 : Enumerate and describe the characteristics of a distributed operating system

-The operating systems task is to enable a distributed system to be conveniently programmed, so that it can be used to implement the widest possible range of apps.

-It does this by presenting apps with general, problem-oriented abstractions of the resources in a DS.

-In an open DS, the distributed OS is implemented by a collection of kernels and servers (server processes). There is no clear dividing line between the distributed OS and apps that run on top of it.

Chapter 7

Question 10 : Explain the concepts of concurrency control

Concurrency control is concerned with preventing loss of data integrity due to interference between users in a multi-user environment. Concurrent processing involving update problem , the temporary update problem and the Inconsistent analysis problem.

Chapter 8

Question 11 : Differentiate simple and nested distributed transaction

a. There are two ways that distributed transaction can be structured:

- A simple distributed transaction

- Nested transaction

A simple distributed transaction:

T: transaction

Client

- A client makes requests to more than one server at a time, but each server carries out the client's request without invoking operations in other servers

- In distributed transaction each transaction access server's data items sequentially

- When the server's uses locking a transaction can only be waiting for one data item at a time

Nested transaction:

M

x

N

P

y

- In some case an operation in a server may invoke an operation another server and in general the second server may invoke operations with some other server.

- To deal with this situation, each client transaction is structured as a set of nested transaction.

- In general , a transaction consists of a hierarchy of nested transaction

- Nested transaction at the same level may run concurrently with one another

Question 12 : Discuss how the concurrency control applied in distributed transaction

-Each server manages a set of data items and is responsible for ensuring that they remain consistent when accessed by concurrent transactions.

-Therefore each server is responsible for applying concurrency control to its own data items.

-They are performed in a serially equivalent manner:

+Locking in DTs: each server maintains locks for its data items. The local lock manager can decide whether to grant a lock or make the requesting transaction wait. When locking is used for concurrency control, the data items remain locked and are unavailable for other transactions during the atomic commit protocol.

+Timestamp orders concurrency control in DTs: In a single server transaction, the server issues a unique timestamp to each transaction when it starts. When timestamp ordering is used for concurrency control, conflicts are resolved as each operation is performed. Any transaction that reaches the client request to commit should always be able to commit.

+Optimistic concurrency control in DTs: each transaction is validated before it is allowed to commit. Servers assign transaction numbers at the start of validation. A DT is validated by a collection of independent servers each of which validates transactions that access its own data items.

Chapter 9

Question 13 : Illustrate the organization of a generic name service

1) COS(Common Object services) Naming: the naming service for CORBA applications; allows applications to store and access references to CORBA objects.

2) DNS(Domain Name System): the Internet's naming service; map people-friendly names into computer-friendly IP addresses in dotted-quad notation.

3) LDAP(Lightweight Directory Access Protocol): Developed by the University of Michigan; as its name implies, it is a lightweight version of DAP (Directory Access Protocol), which in turn is part of X.500, a standard for network directory services. Currently, over 40 companies endorse LDAP

4) NIS (Network Information System) and NIS+: Network naming services developed by Sun Microsystems. Both allow users to access files and applications on any host with a single ID and password.

Question 14 : Differentiate object naming and object location

-Object naming:

+Distributed objects can be named in various ways. Object naming based on object identifiers is one extreme.

+When an object is created it is assigned an ID that uniquely IDs that object.

+At the other extreme, objects are addressed by contents or functionality such as object name "printer" can be used to refer to the local printer.

+Many systems offer an intermediate solution: a user-chosen name is used to refer to a single object. One name refers to one object at the same time but can be bound to different objects at different times.

-Object location:

+We use a single distributed location service to keep track of where objects are.

+The location service as a whole stores the location info about all distributed objects.

+Since the number of distributed objects can be extremely large, the complete state of the location service needs to be divided into partitions that are stored in location objects.

+Each location object keeps the location info of some number of distributed objects and can also refer to other location objects.

Question 15 : Describe the steps in naming and binding distributed objects

The naming/ blinding algorithm consists of four steps: Name Lookup, Location Lookup, Destination Selection and Implementation Selection. We will describe each step briefly before going over the details

- Step 1: Name Lookup

• In the first step, a name is resolved to an object handle. This object handle consists of two part: an object identifier and a reference to the location of the object

- Step 2: Location Lookup

• In the second step, the location reference and the object identifier are resolved to a set of pairs

• Each element of this set describes the network address, port number, etc. Where the object can be reached, and the protocol stack that has to communicate with that particular destination

- Step 3: Destination Selection

• In the third step, one pair is chosen

• This selection should be made, based on the protocol implementations available to the address space from which binding takes place, security constraints, and locality

- Step 4: Implementation Selection

• In the fourth step, a suitable implementation for the selected protocol is chosen

• We assume that implementations are available on nearby site which acts as an implementation repository

• Implementations are stored as class objects; new ones can be added at dynamically

• Once a class object is loaded, it can be used to access multiple distributed objects of the same class

Chapter 14

Question 16 : Define and describe distributed shared memory

-Is primarily a tool for parallel applications or for any distributed application or group of apps in which individual shared data items can be accessed directly.

-Is in general less appropriate in client-server systems, where clients normally view server-held resources as abstract data and access them by request

-However, servers can provide DSM that is shared between clients.

-In a DS in the absence of physically shared memory, DSM run-time support has to send updates in messages between computers.

-DSM system manages replicated data.

-Each computer has a local copy of recently accessed data items stored in DSM, for speed of access.

-DSM can be persistent.

Question 17 : Discuss its different approaches

Main the approaches to distributed shared memory:

There are 3 approaches to the implementation of distributed shared memory (DSM), which respectively involve the use of hardware, virtual memory or library support:

• Hardware based

• Page based

• Library based

+ Hardware based:

- Some multiprocessor architectures rely on the specialized hardware to handle load and store instructions applied to address in DSM, and to communicate with remote memory modules as necessary in order implement them.

- These hierarchical designs in which clusters of processors and memory modules are connected via a high speed network are aimed at orders of magnitude more processors than the limit of 10 or so that can be accommodated over a common bus.

+ Page based

DSM can be implemented as a region of virtual memory occupying the same address range in the address spaces of every participating process. In each case the kernel maintains the consistency of data within DSM region part of page fault handling

+ Library based

- Some languages or language extensions support forms of DSM. In this type of implementation sharing is not implemented through the virtual memory system but by communication between instance of the language run-time.

- Processes make library calls inserted by a compiler when they access data items in DSM.

- The library access local data items and communicate as necessary to maintain consistency

Chapter 15

Question 18 : Explain the uses of distributed file system

-A distributed file system in a client/server-based app that allows clients to access and process data stored on the server as if it were on their on computer. When a user accesses a file on the server, the server sends the user a copy of the file, which is cached on the user's computer while the data is being processed and is then returned to the server.

-Ideally, a DFS organizes file and directory services of individual servers into a global directory in such a way that remote data access is not location-specific but is identical from any client.

-All files are accessible to all users of the global file system and organization is hierarchical and directory-based.

Question 19 : Discuss the advantages of a distributed file system

Advantages Of Distributed File System

DFS is today's leading technology for effective global file sharing the right way, right now. Successfully deployed in a variety of industries, DFS gives users the confidence that business-critical information is not only accessible, but also accurate, up-to-date and protected from unauthorized access.

Scalable

DFS combines several key features to achieve scalability.

• File names are independent of the individual machine location so files can be moved, and additional machines and disk resources brought online easily, seamlessly, to simplify management efforts in a growing enterprise.

• Replication places multiple copies of files and applications on multiple machines, making information accessible to many more users than would be possible with a single copy on one machine.

• Client requests for information are distributed between servers to reduce network loads and minimize the amount of infrastructure required for high-volume installations.

Available

With DFS, files and system applications remain available to users during common operations or temporary system failures.

• Replication eliminates single point of failure by placing files and applications across multiple machines to keep information accessible.

• Multiplatform support for the Windows, OS/2, UNIX, AIX, Solaris, HP-UX, SGI, Digital, Windows NT, Windows 95 and IBM mainframe operating environments reduces compatibility issues with existing system architectures.

• Cloning techniques allow system administrators to perform common operations like backup and restore, or to move files from one machine to another, without taking any part of the system data or applications off-line.

• Client-side caching retrieves the most commonly used files directly from the local desktop to expedite information access and increase network bandwidth.

Secure

DFS uses multiple security mechanisms to protect data as it travels across the network.

• Encrypted login and Kerberos-based security require users to authenticate their identities which prevent access to data by unauthorized users.

• Access control lists (ACLs) assign user and group privileges to strictly define authorization permission for changing or accessing information.

• ACLs also make it easier for system administrators to execute a high degree of control over access to information which provides greater data and system integrity both within and between organizations.

Easier to Administer

DFS simplifies administration by combining capabilities for monitoring servers and performing other system functions.

• Client and server machines are grouped into administrative domains called 'cells' which simplifies system administration.

• Cells can be transparently linked into much larger networks, allowing administrators to design extremely large-scale but manageable distributed file systems.

• DFS Server Manager provides a GUI-based single point of administration for completing tasks, such as backup, adding or removing resources and users across multiple platforms.

• Configuration changes are made from anywhere in a network which supports remote administration.

Related files are grouped into filesets and managed as a unit which further simplifies operations such as backup/restore.

Chapter 16

Question 20 Discuss how the distributed object system works

-Once an object has been defined in a generic description language, an interface generator produces language-specific definitions of that object and routines for transmitting that object between programs. Each program becomes a client/server for a specific set of objects.

-So that each program doesn't have to know details about other programs, each program registers its available object types with an ORB (Object request broker). When a program needs a service, it contacts the ORB, which puts it in contact with the appropriate provider.

Program A Program B

#include genMatrix.h #include genMatrix.h

Contact_ORB(anORB);

Provide_ORB_service(anORB, MatrixClass);

Contact_ORB(anORB);

Request_ORB_service(anORB, MatrixClass);

MatrixClass myMatrix=new(...);

Det=myMatrix.determinant();

+The call to "determinant()" contacts program B, sends the matrix and the method call and waits for the response.

+MatrixClass is define in a generic object language, which specifies its contents and public methods. It is called an Interface description language (IDL).

+As the first step of compilation, the file MatrixClass.idl is translated to each of the required languages. Each program then includes the appropriate language-specific file in its program.

Chapter 17

Question 21 : Give the differences between local and distributed computing

The major differences between local and distributed computing concern areas of latency, memory access, partial failure and concurrency. The difference in latency is the most obvious, but in many ways is the least fundamental.

Latency

The most obvious difference between a local object invocation and the invocation of an operation on a remote (or possibly remote) object has to do with the latency of the two calls. The difference between the two is currently between four and five orders of magnitude, and given the relative rates at which processor speed and network latency speeds are changing, the difference in the future promises to be at best no better, and will likely be worse.

Ignoring the difference between the performance of local and remote invocations can lead to designs whose implementations are virtually assured or having performance problems because the design requires a large amount of communication between components that are in different address space son different machines.

Memory access

A more fundamental difference between local and remote computing concerns the access to memory in the two cases - specifically in the use of pointers. Simply put, pointers in a local address space are not valid in another address space.

If the desire to completely unify the programming model-to make remote accesses behave as if they were in fact local - the underlying mechanism must totally control all memory access. Providing distributed shared memory is one way of completely relieving the programmer from worrying about remote memory access. Using the object-oriented paradigm to the fullest, and requiring the programmer to build an application with "objects all the way down," (that is, only object references or values are passed as method arguments) is another way to eliminate the boundary between local and remote computing.

Partial failure and concurrency

Partial failure is a central reality of distributed computing. Both the local and the distributed world contain components that are subject t periodic failure. In the case of local computing, such failures are either total, affecting all of the entities that are working together in an application, or detectable by some central resource allocator.

There are two paths to be followed if one is going to have a unified model.

The first path is to treat all objects as if they were local and design all interfaces as if the objects calling them, and being called by them, were local. The result of choosing this path is the resulting model

The other path is to design all interfaces as if they were remote. That is, the semantics and operations are all designed to be deterministic in the face of failure, both total and partial.

Chapter 20

Question 23 : Discuss the possible future of distributed system

Question 24 : Define and describe mobile agents

A mobile agent is not bound to the system where it begins execution. It has the unique ability to transport itself from one system in a network to another. The ability to travel, allows a mobile agent to move to a system that contains an object with which the agent wants to interact, and then to take advantage of being in the same host or network as the object.

Question 25 : Discuss the reasons for using mobile agents

Seven good reasons for using mobile agents.

They reduce the network load. Distributed systems often rely on communications protocols that involve multiple interactions to accomplish a given task. This is especially true when security measures are enabled. The result is a lot of network traffic. Mobile agents allow you to package a conversation and dispatch it to a destination host where the interactions can take place locally.

They overcome network latency. Critical real-time systems such as robots in manufacturing processes need to respond to changes in their environments in real time. Controlling such systems through a factory network of a substantial size involves significant latencies. For critical real-time systems, such latencies are not acceptable. Mobile agents offer a solution, since they can be dispatched from a central controller to act locally and directly execute the controller's directions.

They encapsulate protocols. When data are exchanged in a distributed system, each host owns the code that implements the protocols needed to properly code outgoing data and interpret incoming data, respectively. However, as protocols evolve to accommodate new efficiency or security requirements, it is a cumbersome if not possible task to upgrade protocol code properly. The result is often that protocols become a legacy problem. Mobile agents, on the other hand, are able to move to remote hosts in order to establish " channels" based on proprietary protocols.

They execute asynchronously and automously. Often mobile devices have to rely on expensive or fragile network connection. That is, tasks that require a continuously open connection between a mobile device and a fixed network will most likely not be economically or technically feasible. Tasks can be embedded into mobile agents, which can then be dispatched into the network. After being dispatched, the mobile agents become independent of the creating process and can operate asynchronously and autonomously.

They adapt dynamically. Mobile agents have the ability to sense their execution environment and react autonomously to changes. Multiple mobile agents possess the unique ability to distribute themselves among the hosts in the network in such a way as to maintain the optimal configuration for solving a particular problem.

They are naturally heterogeneous. Network computing is fundamentally hetorogenous, often from both hardware and software perspectives. As mobile agents are generally computer- and transport-layer-independent, and dependent only on their execution environment, they provide optimal conditions for seamless system integration.

They are robust and fault-tolerant. The ability of mobile agents to react dynamically to unfavorable situations and events makes it easier to build robust and fault tolerant distributed systems. If a host is being shut down, all agents executing on that machine will be warned and given time to dispatch and continue their operation on another host in the network.

Question 26 : List some of the applications of mobile agent

-Electronic commerce

-Personal assistance

-Secure brokering

-Distributed info retrieval

-Telecommunication networks services

-Workflow apps and groupware

-Monitoring and notification

-Info dissemination

-Parallel processing

Bạn đang đọc truyện trên: AzTruyen.Top