Computer Networks Notes Unit1
Computer Networks Notes Unit1
A distributed system is a collection of independent computers that appears to its users as a single
coherent system
This definition has several important aspects. The first one is that a distributed system consists of
components (i.e., computers) that are autonomous. A second aspect is that users (be they people or
programs) think they are dealing with a single system.
In order to support heterogeneous computers and networks while offering a single-system view,
distributed systems are often organized by means of a layer of software-that is, logically placed
between a higher-level layer consisting of users and applications, and a layer underneath consisting
of operating systems and basic communication facilities, as shown in Fig. 1-1 Accordingly, such a
distributed system is sometimes called middleware.
A distributed system organized as middleware. The middleware layer extends over multiple
machines, and offers each application the same interface. Fig. 1-1 shows four networked computers
and three applications, of which application B is distributed across computers 2 and 3. Each
application is offered the same interface. The distributed system provides the means for
components of a single distributed application to communicate with each other, but also to let
different applications communicate. At the same time, it hides, as best and reasonable as possible,
the differences in hardware and operating systems from each application.
1.2 GOALS
four important goals that should be met to make building a distributed system
A distributed system should make resources easily accessible; it should reasonably hide the fact that
resources are distributed across a network; it should be open; and it should be scalable.
The main goal of a distributed system is to make it easy for the users (and applications) to access
remote resources, and to share them in a controlled and efficient way. Resources can be just about
anything, but typical examples include things like printers, computers, storage facilities, data, files,
Web pages, and networks, to name just a few. There are many reasons for wanting to share
resources.
The connectivity of the Internet is now leading to numerous virtual organizations in which
geographicaJJy widely-dispersed groups of people work together by means of groupware, that is,
software for coJJaborative editing, teleconferencing, and so on. Likewise, the Internet connectivity
has enabled electronic commerce allowing us to buy and sell all kinds of goods without actually
having to go to a store or even leave home.
An important goal of a distributed system is to hide the fact that its processes and resources are
physically distributed across multiple computers. A distributed system that is able to present itself to
users and applications as if it were only a single computer system is said to be transparent.
1.2.3 Openness
An open distributed system is a system that offers services according to standard rules that describe
the syntax and semantics of those services. For example, in computer networks, standard rules
govern the format, contents, and meaning of messages sent and received. Such rules are formalized
in protocols. In distributed systems,
services are generally specified through interfaces, which are often described in an Interface
Definition Language (IDL). Interface definitions written in an IDL nearly always capture only the
syntax of services. In other words, they specify precisely the names of the functions that are
available together with types of the parameters, return values, possible exceptions that can be
raised, and so on.
1.2.4 Scalability
Scalability of a system can be measured along at least three different dimensions (Neuman, 1994).
First, a system can be scalable with respect to its size, meaning that we can easily add more users
and resources to the system. Second, a geographically scalable system is one in which the users and
resources may lie far apart. Third, a system can be administratively scalable,/~~aning that it can still
be easy to manage even if it spans many independent administrative organizations.
Scaling Techniques
There are now basically only three techniques for scaling: hiding communication latencies,
distribution, and replication. Hiding communication latencies is important to achieve geographical
scalability. The basic idea is simple: try to avoid waiting for responses to remote (and potentially
distant) service requests as much as possible. For example, when a service has been requested at a
remote machine, an alternative to waiting for a reply from the server is to do other useful work at
the requester's side.
the server may check for syntactic errors before accepting an entry. A much better solution is to ship
the code for filling in the form, and possibly checking the entries, to the client, and have the client
return a completed form, as shown in Fig. 1-4(b). This approach of shipping code is now widely
supported by the Web in the form of Java applets and Javascript.
those parts across the system. An excellent example of distribution is the Internet Domain Name
System (DNS).
1.2.5 Pitfalls
Peter Deutsch, then at Sun Microsystems, formulated these mistakes as the following false
assumptions that everyone makes when developing a distributed application for the first time:
5. Latency is zero
6. Bandwidth is infinite.
Note how these assumptions relate to properties that are unique to distributed systems: reliability,
security, heterogeneity, and topology of the network; latency and bandwidth; transport costs; and
finally administrative domains
Access transparency deals with hiding differences in data representation and the way that resources
can be accessed by users. At a basic level, we wish to hide differences in machine architectures, but
more important is that we reach agreement on how data is to be represented by different machines
and operating systems. For example, a distributed system may have computer systems that run
different operating systems, each having their own file-naming conventions. Differences in naming
conventions, as well as how files can be manipulated, should all be hidden from users and
applications
Location transparency refers to the fact that users cannot tell where a resource is physically located
in the system. Naming plays an important role in achieving location transparency.
, location transparency can be achieved by assigning only logical names to resources, that is, names
in which the location of a resource is not secretly encoded. An example of a such a name is the URL
http://www.prenhall.com/index.html. which gives no clue about the location of Prentice Hall's main
Web server. The URL also gives no clue as to whether index.html has always been at its current
location or was recently moved there.
Distributed systems in which resources can be moved without affecting how those resources can be
accessed are said to provide migration transparency.
The relocation transparency is when mobile users can continue to use their wireless laptops while
moving from place to place without ever being (temporarily) disconnected.
sharing resources is done in a cooperative way, as in the case of communication. However. there are
also many examples of competitive sharing of resources. For example, two independent users may
each have stored their files on the same file server or may be accessing the same tables in a shared
database.
concurrent access to a shared resource leaves that resource in a consistent state. Consistency can
be achieved through locking mechanisms, by which users are, in turn, given exclusive access to the
desired resource.
The software of the distributed system is nothing but selection of different operating
system platforms.
The operating system is the interaction between user and the hardware.
There are three largely used operating system types:
a) Distributed operating system
b) Network operating system
c) Middleware operating system
Distributed operating system:
It is different from multiprocessor and multicomputer hardware.
Multiprocessor- uses different system services to manage resources connected in a
system and use system calls to communicate with the processor.
In distributed OS, a common set of services is shared among multiple processors in
such a way that they are meant to execute a distributed application effectively and
also provide services to separate independent computers connected in a network as
shown in fig below
It communicates with all the computer using message passing interface(MPI).
It follows the tightly coupled architecture pattern.
It uses Data structure like queue to manages the messages and avoid message loss
between sender and receiver computer.
Eg Automated banking system, railway reservation system etc.
Disadvantages:
It has a problem of scalability as it supports only limited number of
independent computers with shared resources.
There is need to define message passing semantics prior to the execution of
messages.
Fig. General structure of a multicomputer operating system
Network operating system:
It is specifically designed for hetrogeneous multicomputer system, where multiple
hardware and network platforms are supported.
It has multiple operating system running on different hardware platforms connected
in network.
It provides to each computer connected in network.
There is need to define message passing semantics prior to the execution of
messages.
It provide the services such as locating the objects or interfaces by their names,
finding the location of objects, maintaining the quality of services, handling the
protocol information, synchronization, concurrency and security of the objects etc.