DOS Lectures
DOS Lectures
DOS Lectures
COMPUTING
INTRODUCTION
• Advancements in microelectronic technology have
resulted in the availability of fast, inexpensive
processors, and advancements in communication
technology have resulted in the availability of cost-
effective and highly efficient computer networks.
• Any communication
between the
processors usually
takes place through
the shared memory.
Loosely Coupled Systems
(distributed computing systems )
• The processors do
not share memory,
and each processor
has its own local
memory.
• All physical
communication
between the
processors is done
by passing messages
across the network
that interconnects
the processors.
• Processors of loosely coupled systems can be located far
from each other to cover a wider geographical area.
……….contd
Centralized Time-Sharing Systems
• Most of the processing of a user's job could be done at
the user's own computer, allowing the main computer
to be simultaneously shared by a larger number of
users.
• Major stumbling block was the availability of adequate software for making
these systems easy to use and for fully exploiting their power.
MODELS OF DISTRIBUTED COMPUTING SYSTEM
1. Minicomputer
2. Workstation
3. Workstation-server
4. Processor-pool
5. Hybrid
Minicomputer Model
• Is an extension of the centralized time-sharing system, which
consists of a few minicomputers interconnected by a
communication network.
• This model may be used when resource sharing with remote users
is desired.
• When the system finds that the user's workstation does not have sufficient
processing power for executing the processes of the submitted jobs efficiently,
it transfers one or more of the processes from the user's workstation to some
other workstation that is currently idle and gets the process executed there,
and finally the result of execution is returned to the user's workstation.
• The Sprite system and an experimental system developed at Xerox PARC are
the distributed computing systems based on the workstation model.
Distributed computing system based
on the workstation model
Limitations of Workstation Model
• This model is not so simple to implement due to issues
like: -
• Minicomputers are used for implementing the file system and other
for providing other types of services, such as database service and
print service. Therefore, each minicomputer is used as a server
machine to provide one or more types of services.
• For higher reliability and better scalability, multiple servers are used
for managing the resources of a particular type in a distributed
computing system.
• All files are managed by the file servers, so users have the flexibility to use any
workstation and access the files in the same manner irrespective of which
workstation the user is currently logged on.
• The request-response protocol is mainly used to access the services of the server
machines.
• A user has guaranteed response time because workstations are not used for
executing remote processes.
• LIMITATION: the model does not utilize the processing capability of idle
workstations.
REQUEST-RESPONSE PROTOCOL
• Also known as the client-server model of communication.
• A client process sends a request to a server process for getting some service
such as reading a block of a file. The server executes the request and sends
back a reply to the client that contains the result of request processing.
• It is even possible for both the client and server processes to be run on the
same computer.
• Some processes are both client and server processes. That is, a server
process may use the services of another server, appearing as a client to the
latter.
Processor-Pool Model
• It is based on the observation that most of the time a user does not need
any computing power but once in a while user may need a very large
amount of computing power for a short time (e.g., when recompiling a
program consisting of a large number of files after changing a basic shared
declaration).
• 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.
• Limitation: This model is usually not suitable for high performance interactive
applications, especially those using graphics or window systems. This is due to
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.
Hybrid Model
• The workstation-server model, is the most widely used model for building distributed
computing systems as a large number of computer users only perform simple
interactive tasks such as editing jobs, sending electronic mails, and executing small
programs.
• In a working environment that has groups of users who often perform jobs needing
massive computation, the processor-pool model is more suitable.
• To combine the advantages of both the workstation-server and processor-pool
models, a hybrid model came into existence.
• The hybrid model is based on the workstation-server model with the addition of a
pool of processors. The processors in the pool can be allocated dynamically for
computations that are too large for workstations or that require several computers
concurrently for efficient execution.
………….contd
Inherently Distributed Applications
• Several applications are inherently distributed in nature
and require a distributed computing system for their
realization.
• For achieving better overall performance the DC distribute the load more
evenly among the multiple processors by moving jobs from currently
overloaded processors to lightly loaded ones.
…………contd
• Availability, refers to the fraction of lime for which a system is available
for use. In comparison to a centralized system, a distributed computing
system also enjoys the advantage of increased availability.
• In this case, none of the users is affected and the users cannot even know
that some of the processors are down.
Extensibility and Incremental Growth
• Distributed computing systems are capable of incremental growth.
It is possible to gradually extend the power and functionality of a
distributed computing system by simply adding additional
resources (both hardware and software) to the system as and when
the need arises.
• Example - computers with ordinary power are suitable for ordinary data
processing jobs, whereas high-performance computers are more suitable
for complex mathematical computations.
In NOS each computer of the DCS has its own local operating system and
there is essentially no coordination at all among the computers except for
the rule that when two processes of different computers communicate
with each other they must use a mutually agreed on communication
protocol. While with a DOS there is a single system wide operating system
and each computer of the DCS runs a part of this global operating system.
• What should be done if the receiver is not ready to accept the message:
Will the message be discarded or stored in a buffer? In the case of
buffering, what should be done if the buffer is full?
• If there are several outstanding messages for a receiver, can it choose the
order in which to service the outstanding messages?
SYNCHRONIZATION
• The semantics used are blocking and nonblocking types.
• Depends on one of the two types of semantics used for the send and receive
primitives.
• In blocking send primitive, after execution of the send statement, the sending
process is blocked until it receives an acknowledgment from the receiver that the
message has been received.
• For nonblocking send primitive, after execution of the send statement, the
sending process is allowed to proceed with its execution as soon as the message
has been copied to a buffer.
• For a nonblocking receive primitive, the receiving process proceeds with its
execution after execution of the receive statement, which returns control almost
immediately just after telling the kernel where the message buffer is.
How receiving process knows that message has
arrived in the message buffer in a
nonblocking receive primitive?
LIMITATIONS
• Main drawback of synchronous communication is that it limits
concurrency and is subject to communication deadlocks.
• Is less flexible than asynchronous communication because the
sending process always has to wait for an acknowledgment from
the receiving process even when this is not necessary.
FAILURE HANDLING
• Distributed system offer potential for parallelism, but is also prone
to partial failures such as a node crash or a communication link
failure.
• Loss of request message. This may happen either due to the failure
of communication link between the sender and receiver or because
the receiver's node is down at the time the request message
reaches there.
• The kernel of the sending machine frees the sending process only
when the acknowledgment is received.
• The time duration for which the sender waits before retransmitting
the request is slightly more than the approximate round-trip time
between the sender and the receiver nodes plus the average time
required for executing the request.
Four-message IPC protocol
for client-server communication
• The client sends a request message to the server.
• When the request message is received at the server's machine, the kernel
of that machine starts a timer. If the server finishes processing the client's
request and returns the reply message to the client before the timer
expires, the reply serves as the acknowledgment of the request message.
• When the reply message is received at the client's machine, the kernel of
that machine returns an acknowledgment message to the kernel of the
server machine. If the acknowledgment message is not received within
the timeout period, the kernel of the server machine retransmits the reply
message.
Three-message IPC protocol for
client-server communication
• The client sends a request message to the server.
• The client remains blocked until the reply is received. If the reply is
not received within the timeout period, the kernel of the client
machine retransmits the request message.
• Header part of each packet consists of two extra fields, one specifies the total
number of packets in the multidatagram message and the other is the bitmap
field that specifies the position of this packet in the complete message.
• All packets have information about the total number of packets in the
message, so even in the case of out-of-sequence receipt of the packets, a
buffer area can be set by the receiver for the entire message and the received
packet can be placed in its proper position inside the buffer area.
• After timeout. if all packets have not yet been received, a bitmap indicating
the unreceived packets is sent to the sender. The sender retransmits only
those packets that have not been received by the receiver. This technique is
called selective repeat.
GROUP COMMUNICATION
• Depending on single or multiple senders and
receivers three types of group communication
are possible:
• Limitations
1. Suffers from the problems of poor reliability and poor
scalability common to all centralized techniques.
2. Replication of the group server may be done to solve
these problems but replication leads to the extra
overhead involved in keeping the group information of
all group servers consistent.
Buffered and Unbuffered Multicast
• Multicast send cannot be synchronous due to: -
• When the process comes up after failure, it must join the group
afresh.
• Applications for which the degree of reliability requirement is O-reliable, I-
reliable, or m-out-of-n-reliable do not need atomic multicast facility.
• After a timeout period, the kernel retransmits the message to all those
members from whom an acknowledgment message has not yet been
received.
• This method works fine only as long as the machines of the sender
process and the receiver processes do not fail during an atomic multicast
operation.
• A fault-tolerant atomic multicast protocol
must ensure that a multicast will be delivered
to all members of the multicast group even in
the event of failure of the sender's machine or
a receiver's machine.
• Programs that make use of remote procedure calls must have the
capability of handling even those errors that cannot occur in local
procedure calls.
• The need for the ability to take care of the possibility of processor
crashes and communication problems of a network makes it more
difficult to obtain the same semantics for remote procedure calls as
for local procedure calls.
• Applications using RPCs must also have the capability to handle the
long delays that may possibly occur due to network congestion.
IMPLEMENTING RPC MECHANISM
• RPC involves a client process and a server process. Therefore, to
conceal the interface of the RPC system from both the client and
server processes, a separate stub procedure is associated with each
of the two processes.
• Client Stub
The client stub is responsible for carrying out the
following two tasks:
1. On receipt of a call request from the client, it packs a
specification of the target procedure and the
arguments into a message and then asks the local
RPCRuntime to send it to the server stub.
2. On receipt of the result of procedure execution, it
unpacks the result and passes it to the client.
• RPCRuntime
The RPCRuntime handles transmission of messages across the network
between client and server machines.
The RPCRuntime on the client machine receives the call request message
from the client stub and sends it to the server machine.
It also receives the call request message from the client machine and
passes it to the server stub.
• Server
2. Automatically
This method uses Interface Definition Language (IDL) that
is used to define the interface between a client and a
server. An interface definition is a list of procedure names
supported by the interface, together with the types of their
arguments and results. This is sufficient information for the
client and server to independently perform compile-time
type checking and to generate appropriate calling
sequences.
RPC MESSAGES
• Call messages that are sent by the client to
the server for requesting execution of a
particular remote procedure.
• A message type field that is used to distinguish call messages from reply
messages. For example, in an RPC system, this field may be set to 0 for all
call messages and set to 1 for all reply messages.
• A client identification field that may be used for two purposes-to allow
the server of the RPC to identify the client to whom the reply message has
to be returned and to allow the server to check the authentication of the
client process for executing the concerned procedure
RPC call message format
Server receives a call message it could face conditions like
• Call message is not intelligible to server. This may happen when a call
message violates the RPC protocol. The server will reject such calls.
• The server detects by scanning the client's identifier field that the client is
not authorized to use the service. The server will return an unsuccessful
reply without bothering to make an attempt to execute the procedure.
• The server finds that the remote program, version. or procedure number
specified in the remote procedure identifier field of the call message is
not available with it. Server will return an unsuccessful reply without
bothering to make an attempt to execute the procedure.
SUCCESSFUL REPLY
UNSUCCESSFUL REPLY