Professional Documents
Culture Documents
distributed program
A distributed program is composed of a set of asynchronous processes
that communicate by message passing over the communication
network. Each process may run on different processor.
The processes do not share a global memory and communicate by
passing messages. These processes do not share a global clock that is
instantaneously accessible to these processes.
Process execution and message transfer are asynchronous – a process
may execute an action spontaneously and a process sending a message
does not wait for the delivery of the message to be complete.
Examples:
3. distributed system
Characteristics of Distributed System:
FIFO,
Non-FIFO
causal ordering.
In the FIFO (first-in, first-out) model, each channel acts as a first-in first-out message
queue and thus, message ordering is preserved by a channel.
In the non-FIFO (N-FIFO)model, a channel acts like a set in which the
sender process adds messages and the receiver process removes
messages from it in a random order.
Features of NTP :
Some features of NTP are –
NTP servers have access to highly precise atomic clocks and GPU clocks
It uses Coordinated Universal Time (UTC) to synchronize CPU clock time.
Avoids even having a fraction of vulnerabilities in information exchange
communication.
Provides consistent timekeeping for file servers
Advantages of NTP :
It provides internet synchronization between the devices.
It provides enhanced security within the premises.
It is used in the authentication systems like Kerberos.
It provides network acceleration which helps in troubleshooting problems.
Used in file systems that are difficult in network synchronization.
Disadvantages of NTP :
When the servers are down the sync time is affected across a running
communication.
Servers are prone to error due to various time zones and conflict may occur.
Minimal reduction of time accuracy.
When NTP packets are increased synchronization is conflicted.
Manipulation can be done in synchronization.
The state of a process at any time is defined by the contents of processor registers, stacks,
local memory, etc. and depends on the local context of the distributed application.
Distributed Garbage Collection
Objects are identified as garbage when there are no longer any references to them
in the system.
Garbage collection reclaims memory used by those objects.
In figure a, process p2 has two objects that do not have any references to other
objects, but one object does have a reference to a message in transit. It is not
garbage, but the other p2 object is.
Thus we must consider communication channels as well as object references to
determine unreferenced objects.
Deadlock Detection
A distributed deadlock occurs when each of a collection of processes waits for
another process to send it a message, and there is a cycle in the graph of the waits-
for relationship.
In figure b, both p1 and p2 wait for a message from the other, so both are blocked
and the system cannot continue
Termination Detection
It is difficult to tell whether a distributed algorithm has terminated. It is not
enough to detect whether each process has halted.
In figure c, both processes are in passive mode, but there is an activation request
in the network.
Termination detection examines multiple states like deadlock detection, except
that a deadlock may affect only a portion of the processes involved,
while termination detection must ensure that all of the processes have completed.
Distributed Debugging
Distributed processes are complex to debug. One of many possible problems is
that consistency restraints must be evaluated for simultaneous attribute values in
multiple processes at different instants of time.
9. Causal ordering in distributed system