Department of Artificial Intelligence & Data Science
Department of Artificial Intelligence & Data Science
UNIT I INTRODUCTION 8
OUTCOMES:
Upon the completion of this course, the student will be able to
CO1: Explain the foundations of distributed systems (K2)
CO2: Solve synchronization and state consistency problems (K3)
CO3 Use resource sharing techniques in distributed systems (K3)
CO4: Apply working model of consensus and reliability of distributed systems (K3)
CO5: Explain the fundamentals of cloud computing (K2)
PRIMITIVES FOR DISTRIBUTED COMMUNICATION
A Send primitive has at least two parameters – the destination, and the
buffer in the user space, containing the data to be sent.
There are two ways of sending data when the Send primitive is invoked
– the buffered option and the unbuffered option.
PRIMITIVES FOR DISTRIBUTED COMMUNICATION
The buffered option which is the standard option copies the data from
the user buffer to the kernel buffer.
The data later gets copied from the kernel buffer onto the network.
In the unbuffered option, the data gets copied directly from the user
buffer onto the network.
Blocking primitives
The primitive commands wait for the message to be delivered. The execution of the
processes is blocked.
The sending process must wait after a send until an acknowledgement is made by the
receiver.
The receiving process must wait for the expected message from the sending process
A primitive is blocking if control returns to the invoking process after the processing for
the primitive completes.
PRIMITIVES FOR DISTRIBUTED COMMUNICATION
The advantage of this scheme is that the sending process can continue computing in
parallel with the message transmission, instead of having the CPU go idle.
A primitive is non-blocking if control returns back to the invoking process immediately after
invocation, even though the operation has not completed.
Non-blocking Send, control returns to the process even before the data is copied out of
the user buffer.
Non-blocking Receive, control returns to the process even before the data may have
arrived from the sender.
PRIMITIVES FOR DISTRIBUTED COMMUNICATION
Synchronous
The processing for the Send primitive completes only ,after the invoking
processor learns that the other corresponding Receive primitive has also
been invoked and that the receive operation has been completed.
The processing for the Receive primitive completes when the data to be
received is copied into the receiver’s user buffer.
PRIMITIVES FOR DISTRIBUTED COMMUNICATION
PRIMITIVES FOR DISTRIBUTED COMMUNICATION
Asynchronous
2. PROCESSOR SYNCHRONY
Similar to synchronous and asynchronous communication primitives there is
also the classification of synchronous versus asynchronous processors.
Remote Procedure Call (RPC): In RPC, the procedure need not exist in
the same address space as the calling procedure. The two processes
may be on the same system, or they may be on different systems with a
network connecting them.
PRIMITIVES FOR DISTRIBUTED COMMUNICATION
Asynchronous Execution:
Here, Every communicating process can have a
different observation of the order of the messages
being exchanged.
In an asynchronous execution:
• there is no processor synchrony and there is
no bound on the drift rate of processor clocks
Synchronous Process
In an synchronous execution:
•Processors are synchronized and the clock drift rate between
any two processors is bounded
•Message delivery times are such that they occur in one logical
step or round
•Upper bound on the time taken by a process to execute a
step.
SYNCHRONOUS VERSUS ASYNCHRONOUS EXECUTIONS
Emulating an asynchronous system by a synchronous system (A → S):
• An asynchronous program can be emulated on a synchronous system.
• The synchronous system is a special case of an asynchronous system
• All communication finishes within the same round in which it is initiated.
Emulating a synchronous system by an asynchronous system (S → A):
• A synchronous program can be emulated on an asynchronous system using a tool called
synchronizer.
Emulation for a fault free system:
• If system A can be emulated by system B, denoted A/B, and
• if a problem is not solvable in B, then it is also not solvable in A.
• If a problem is solvable in A, it is also solvable in B. Hence, in a sense, all four classes are equivalent
in terms of computability in failure-free systems.