You are on page 1of 23


Qu.1. What is distributed operating system and role of

middleware in a Distributed system ?

The definition of distributed system is given below:-

“A distributed system is a collection of independent computer

that appears to its users as a single coherent system.”

The definition has two aspects. The first one deals with hardware
– the machines are autonomous. The second one deals with
software – the users think they are dealing with a single system.
Both are essential. The distributed system has two important
characteristics, first is that the difference between system has
two important characteristic, first is that the difference between
the various computers and the ways in which they communicate
are hidden from users and another important characteristic is that
users and applications can interact with a distributed system in a
consistent and uniform way, regardless of where and when
interaction takes place.

Distributed system should also be relatively easy to expand or

scale. This characteristic is a direct consequence of having
independent computer but at the same time, hiding how these
computers take part in the system as a whole. A distributed
system will normally be continuously available although perhaps
certain parts may be temporarily out of order. Users and
applications should not notice that parts are being replaced or
fixed, or that new parts are added to serve more users or

To support heterogeneous computers and networks while offering

a single system view, distributed system are often organized by
means of a layers of software that is logically placed between a
higher-level layer consisting or users and applications, and a layer
underneath consisting of operation systems. Such a distributed
system is sometimes called middleware.

For example, consider a network of workstations in a university or

company department. In addition to each user’s personal
workstation, there might be a pool of processors in the machine
room that are not assigned to specific users but are allocated
dynamically as needed. Such a system might have a single file
system, with all files accessible from all machines in the same
way and using the same path name.

Machine A Machine B Machine


Distributed Applications

Middleware Service
A Distributed System

Local Local

A set of drivers, APIs, or other software that improves connectivity

between a client application and a server known as middleware.
The exact role of the middleware component will depend on the
style of client/server computing being used.

There is both a client and a server component of middleware. The

basic purpose of middleware is to enable application or user at a
client to access a variety of services on servers without being
concerned about differences among servers.

Consider a distributed system used to support, among other

things, the personnel department. The basic employee data, such
as employee name address, etc., might be stored on a Gupta
database, whereas salary information might be contained on an
Oracle database. When a user in the personal department
requires access to particular records, that user does not want to
be concerned with which Vender’s database contains the

Presentation services

Application Logic

Middleware Middleware
Communications Communication Application
software s software services
Protocol Interaction
Client Operating
System Server operating system

Hardware Platform
Hardware platform

The Role of Middleware


Qu.2. Write short note on client-server model.

In the basic client-server model, processers 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 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.

Functions such as email exchange, web access and database

access, are built on the client–server model. For example, a web
browser is a client program running on a user's computer that
may access information stored on a web server on the Internet.
Users accessing banking services from their computer use a web
browser client to send a request to a web server at a bank. That
program may in turn forward the request to its own database
client program that sends a request to a database server at
another bank computer to retrieve the account information. The
balance is returned to the bank database client, which in turn
serves it back to the web browser client displaying the results to
the user.

The client–server model has become one of the central ideas

of network computing. Many business applications being written
today use the client–server model. So do the Internet's main

application protocols, such as HTTP, SMTP, Telnet, and DNS. In

marketing, the term has been used to distinguish distributed
computing by smaller dispersed computers from the "monolithic"
centralized computing of mainframe computers. But this
distinction has largely disappeared as mainframes and their
applications have also turned to the client–server model and
become part of network computing.


• in most cases, a client–server architecture enables the roles

and responsibilities of a computing system to be distributed
among several independent computers that are known to
each other only through a network. This creates an
additional advantage to this architecture: greater ease of
maintenance. For example, it is possible to replace, repair,
upgrade, or even relocate a server while its clients remain
both unaware and unaffected by that change.

• All data is stored on the servers, which generally have far

greater security controls than most clients. Servers can
better control access and resources, to guarantee that only
those clients with the appropriate permissions may access
and change data.
• Since data storage is centralized, updates to that data are
far easier to administer in compared to a P2P paradigm;
where a P2P architecture, data updates may need to be
distributed and applied to each peer in the network, which is

both time-consuming and error-prone, as there can be

thousands or even millions of peers.
• Many mature client–server technologies are already
available which were designed to ensure security,
friendliness of the user interface, and ease of functions
with multiple different clients of different capabilities.

Qu.3 .Where a short note on Election Algorithm.

In distributed computing, leader election is the process of

designating a single process as the organizer of some task
distributed among several computers (nodes). Before the task is
begun, all network nodes are unaware which node will serve as
the "leader," or coordinator, of the task. After a leader election
algorithm has been run, however, each node throughout the
network recognizes a particular, unique node as the task leader.

The network nodes communicate among themselves in order to

decide which of them will get into the "leader" state. For that,
they need some method in order to break the symmetry among
them. For example, if each node has unique identities, then the
nodes can compare their identities, and decide that the node with
the highest identity is the leader.

The definition of this problem is often attributed to LeLann, who

formalized it as a method to create a new token in a token ring
network in which the token has been lost.

Leader election algorithms are designed to be economical in

terms of total bytes transmitted, and time. The algorithm

suggested by Gallager, Humblet, and Spira for general undirected

graphs has had a strong impact on the design of distributed
algorithms in general, and won the Dijkstra Prize for an influential
paper in distributed computing.

Many other algorithms were suggested for different kind of

network graphs, such as undirected rings, unidirectional rings,
complete graphs, grids, directed Euler graphs, and others. A
general method that decouples the issue of the graph family from
the design of the leader election algorithm was suggested by
Korach, Kutten, and Moran .

Election algorithms are based on the following assumptions –

-Each process in the system has a unique priority number.

-Whenever an election is held, the process having the

highest priority number among the currently active
processes is elected as the co-coordinator.

-On recovery, a failed process can take appropriate actions

to rejoin the set of active processes.

Qu.4. Explain Atomic transaction with example.

An atomic transaction is a computation consisting of a collection

of operations that take place indivisibly in the presence of failures
and concurrent computations. That is, either all of the operations
are performed successfully or none of their effect prevail, and
other processes executing concurrently cannot modify or observe
intermediate states of the computation. Atomic transactions help
to preserve the consistency of a set of shared data objects in the
face of failures and concurrent access. They make crash recovery
much easier, because a transaction can only end in two states
transaction failed completely or transaction carried out

Transactions have the following essential properties –

• Serializability – This property ensures

that concurrently executing transaction
do not interfere with each other. That
is, the concurrent execution of a set of
two or more transactions is serially
equivalent in the sense that the
ultimate result of performing them
concurrently is always the same as if
they had been executed one at a time
in some order.

• Atomicity – This property ensures that

to the outside world all the operations

of a transaction appear to have been

performed indivisibly. Two essential
requirements for atomicity are
atomicity with respect to failures and
atomicity with respect to concurrent
access. Failure atomicity ensures that
if a transaction’s work is interrupted by
a failure any partially completed result
will be undone. This atomicity is also
known as the All-or-nothing property
the other hand concurrency atomicity
ensures that while a transaction is in
progress, other processes executing
concurrently with the transaction
cannot modify or observe intermediate
state of the transaction.

• Permanence – This property ensures

that once a transaction completes
successfully, the result of its operations
become permanent and cannot be lost
even if the corresponding process or
the processor on which it is running

• Durable – This property ensures that

transactions are durable. It refers to

the fact that once a transaction

commits, no matter what happens, the
transaction goes forward and the
results become permanent. No failure
after the commit can undo the results
or cause them to be lost.

Qu.5. What are the different models are used for building
distributed computing system? Explain each of them in
brief .

System Model – Processes run on processors, in a traditional

system, there is only one processor, so the question of how the
processor should be user does not come up. In a distributed
system, with multiple processor it is a major design issue. The
processors in a distributed system can be organized in several
ways. Various models are used for building distributed system.
The models can be broadly classified into five categories –





And hybrid.

1. Minicomputer Model – The minicomputer model is

a simple extension of the centralized time-sharing
system. A distributed system based on this model
consists of a few minicomputers interconnected by a
communication network. Each minicomputer usually
has multiple users simultaneously logged on to it. For
this, several interconnective terminals are connected
to each minicomputer. Each user is logged on to one

specific minicomputer with remote resources that are

available on some machine other than the one onto
which the user is currently logged.


Mini- Communicatio Mini-

comput n network comput
er er

Minicomputer Model

Workstation-server Model – A
distributed system based on the workstation
model consists of several workstations
interconnected by a communication network.


Workstation Workstation

Workstation Communication Workstation


Mini Computer Mini Computer

Used as File Used as Print
Server Server
Mini Computer
Used as Data-
base sever

Workstations-server Model

2. Workstation Model – A workstation model is a

network of personal workstation, each with its own
disk and local file system. When the workstations
have private disks, these disks can be used in one of
at least four ways –

-Paging and temporary files

-Paging, temporary files, and system binaries

-paging, temporary files, system binaries and file


-Complete local file system.

The first design is based on the observation that while

it may be convenient to keep all the user files on the
central file servers disks are also needed for paging
and temporary file.

The second model is a variant of the first one in which

the local disks also hold the binary programs, such as
the compilers text editors and electronic mail

The third design to using local disks is to use them as

explicit caches. In this mode of operation, users can
download files from the file servers to their own disks,
read and write them

3. Processor-pool Model – This model is based on the

observation that most of the time a user does not
need any computing power but once in a while he or
she may need a very large amount of computing
power for a short time. Therefore, unlike the
workstation-server model in which a processor is
allocated to each user, in the processor-pool model
the processors are pooled together to be shared by
the users as needed. The pool of processors consists
of a large number of microcomputer and
minicomputer attached to the network. Each
processor in the pool has its own memory to load and
run a system program or an application program of
the distributed computing system.

ion Network

Run File
Serve Serve
r r

Pool of

However, the processor-pool model is usually considered to be

unsuitable for high performance interactive application, especially
those using graphics or windows system. This is mainly because
of the slow speed of communication between the computer on
which the application program of a user is being executed and the
terminal via which the user is interacting with the system. The
workstation-server model is generally considered to be more
suitable for such applications.

4. Hybrid Model – The workstation-server model is the

most widely used for building distributed operating
system, out of above four models. This is because a
large number of computer users only perform simple
interactive task such as editing jobs, sending e-mails,
and executing small programs. The workstation-
server model is ideal for electronic mails and
executing small programs. The workstation-server
model is ideal for such simple usage. However, in a
working environment that has groups of users who
often perform jobs needing massive computation, the
processor-pool model is more attractive and suitable.

Qu.6. What is the role of fault tolerance in distributed


A characteristic feature of distributed systems that distinguishes

them form single machine systems is the notion of power failure.

A partial failure may happen when one component in a distributed

system fails. This failure may affect the proper operation of other
components, while at the same time leaving yet other
components totally in the sense that it affects all components and
may easily bring down the entire application.

Dependability is a term that covers a number of useful

requirements for distributed systems including the following –

1. Availability
2. Reliability
3. Safety
4. Maintainability.
1. Availability – It is defined as the property that a system is
ready to used immediately. In general, it refers to probability
that the system is operating correctly at any given moment
and is available to perform its functions on behalf of its

2. Reliability – This refers to the property that a system can

run continuously without failure. Reliability is defined in
terms of a time interval instead of an instant in time. A
highly reliable system is one that will most likely continue to
work without interruption during a relatively long period of

3. Safety – This refers to the situation that when a system

temporarily fails to operate correctly, nothing catastrophic

4. Maintainability – Finally, maintainability refers to how easy

a failed system can be repaired. A highly maintainable
system may also show a high degree of availability.

The cause of an error is called a fault. Thus, finding out what

caused an error is important. Building dependable systems closely
relates to controlling faults.

Faults are generally classified as transient, intermittent or


Transient Faults – These faults occur once and then

disappear. If the operation is repeated, the fault goes away.

Intermittent Fault – An intermittent fault occurs, then

vanishes of its own accord, then reappears and so on. A loose
contact on a connector will often cause an intermittent fault.

Permanent Fault – It is one that continues to exist until the

faulty component is repaired. Burnt-out chips, software bugs, and
disk head crashes are example of permanent faults.

Qu.7. Write short note on Distributed File System.

Software that keeps track of files stored across multiple servers or

networks. When data are requested, a distributed file system
(DFS) converts the file names into the physical location of the files
so they can be accessed. See DFS.

 Domain-based DFS roots exist within Active Directory and

can have their information distributed to other domain
controllers within the domain — this provides fault tolerance to
DFS. DFS roots that exist on a domain must be hosted on a
domain controller. This is to ensure that links with the same
target get all their information replicated over the network.

Qu.8. What is Distributed Shared Memory (DSM)?

Distributed Shared Memory (DSM), also known as

a distributed global address space (DGAS), is a term
in computer science that refers to a wide class of software and
hardware implementations, in which each node of a cluster has
access to shared memory in addition to each node's non-shared
private memory.

Software DSM systems

Shared memory architecture may involve separating memory into

shared parts distributed amongst nodes and main memory; or
distributing all memory between nodes. A coherence protocol,
chosen in accordance with a consistency model,
maintains memory coherence.

Qu.9. Write a short note on virtual memory management

in MACH.

In Mach, the memory is modeled as linear virtual address space

supported by paging. Each process has its own virtual address
space within which its threads execute. The virtual address space
of a process is generally sparse, consisting of holes of unallocated
space between sections of the virtual address space in use. This is
because Mach makes to attempt to compress the address space
to remove the hole of unallocated memory that appear in the
address space as new items are mapped or removed from the
address space.

Qu.10. Write short note on DCE thread.

The C thread package developed for Mach OS and the Light

weight processes package developed for sun OS are available
threaded package. To avoid incompatibilities between threads
designs, IEEE has drafted a standard are the DCE threads
developed by the OSF for OSF/1 operating system.

If a system supporting DCE has operating system kernel support

for threads, the DCE is set up to use this facility. In this case the
API serve as an interface to the kernel supported threads facility.

Thread Management – The DCE thread package contains many

procedures for managing threads. Some of them are discussed
bellow –

1. pthread_create is used to create a new thread in the same

address space as a calling thread.

2. pthread_exist is used to terminate the calling thread.

3. pthread_join is used to cause the calling thread to block

itself until the thread specified in the routine’s argument


4. pthread_detach is used by a patent thread to disown a

child thread.

5. pthread_cancel is used by thread to kill another thread.

6. pthread_setcancel is used by a thread to enable or disable

ability of other thread to kill it.