You are on page 1of 3

ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

A Model of Distributed Computations

1.8 A Distributed Program

A distributed program is composed of a set of n asynchronous processes p1, p2…, pi… ,pn
that communicate by message passing over the communication network. Without loss of
generality, we assume that each process is running on a different processor. The processes do not
share a global memory and communicate solely by passing messages.

Let Cij denote the channel from process pi to process pj and let mij denote a message sent
by pi to pj . The communication delay is finite and unpredictable. Also, 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.

The global state of a distributed computation is composed of the states of the processes and
the communication channels. The state of a process is characterized by the state of its local memory
and depends upon the context. The state of a channel is characterized by the set of messages in
transit in the channel.

1.9 A model of distributed executions

The execution of a process consists of a sequential execution of its actions. The actions are
atomic and the actions of a process are modeled as three types of events, namely, internal events,
message send events, and message receive events. Let exi denote the xth event at process pi.
Subscripts and/or superscripts will be dropped when they are irrelevant or are clear from the
context. For a message m, let send(m) and rec(m) denote its send and receive events, respectively.

The occurrence of events changes the states of respective processes and channels, thus
causing transitions in the global system state. An internal event changes the state of the process at
which it occurs. A send event (or a receive event) changes the state of the process that sends (or
receives) the message and the state of the channel on which the message is sent (or received). An
internal event only affects the process at which it occurs.

CS3551 – DISTRIBUTED COMPUTING


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

The events at a process are linearly ordered by their order of occurrence. The execution of
process pi produces a sequence of events ei1 , ei2 ,.....eix ,....eix +1 ,... and it is denoted by Hi,

where hi is the set of events produced by pi and binary relation →i defines a linear order on these
events. Relation → i expresses causal dependencies among the events of pi.

The send and the receive events signify the flow of information between processes and
establish causal dependency from the sender process to the receiver process. A relation →msg that
captures the causal dependency due to message exchange, is defined as follows. For every message
m that is exchanged between two processes, we have

send(m) →msg rec(m)

Figure: The space–time diagram of a distributed execution.

Relation →msg defines causal dependencies between the pairs of corresponding send and
receive events. The evolution of a distributed execution is depicted by a space–time diagram.
Figure shows the space–time diagram of a distributed execution involving three processes. A
horizontal line represents the progress of the process; a dot indicates an event; a slant arrow
indicates a message transfer.

Generally, the execution of an event takes a finite amount of time; however, since we
assume that an event execution is atomic (hence, indivisible and instantaneous), it is justified to

CS3551 – DISTRIBUTED COMPUTING


ROHINI COLLEGE OF ENGINEERING AND TECHNOLOGY

denote it as a dot on a process line. In this figure, for process p1, the second event is a message
send event, the third event is an internal event, and the fourth event is a message receive event.

Causal precedence relation

The execution of a distributed application results in a set of distributed events produced by


the processes. Let H =⋃ihi denote the set of events executed in a distributed computation. Next,
we define a binary relation on the set H, denoted as →, that expresses causal dependencies between
events in the distributed execution.

The causal precedence relation induces an irreflexive partial order on the events of a
distributed computation that is denoted as H=(H, →).

For any two events ei and ej , ei ej denotes the fact that event ej does not directly or
transitively dependent on event ei. That is, event ei does not causally affect event ej . Event ej is
not aware of the execution of ei or any event executed after ei on the same process.

Logical vs. physical concurrency

In a distributed computation, two events are logically concurrent if and only if they do not
causally affect each other. Physical concurrency, on the other hand, has a connotation that the
events occur at the same instant in physical time. Note that two or more events may be logically
concurrent even though they do not occur at the same instant in physical time.

Whether a set of logically concurrent events coincide in the physical time or in what order
in the physical time they occur does not change the outcome of the computation. Therefore, even
though a set of logically concurrent events may not have occurred at the same instant in physical
time, for all practical and theoretical purposes, we can assume that these events occured at the
same instant in physical time.

CS3551 – DISTRIBUTED COMPUTING

You might also like