0% found this document useful (0 votes)
32 views17 pages

Unit 1 Part 3

This document discusses distributed computing concepts. A distributed program is composed of asynchronous processes that communicate solely through message passing over a network without shared memory. Each process has a local state defined by its memory and context. Channels have a state defined by messages in transit. Global states transition as processes send and receive messages, changing their own and channels' states. For a global state to be meaningful, it must be causally consistent by recording sent messages as received without violating message ordering.

Uploaded by

thesujee47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views17 pages

Unit 1 Part 3

This document discusses distributed computing concepts. A distributed program is composed of asynchronous processes that communicate solely through message passing over a network without shared memory. Each process has a local state defined by its memory and context. Channels have a state defined by messages in transit. Global states transition as processes send and receive messages, changing their own and channels' states. For a global state to be meaningful, it must be causally consistent by recording sent messages as received without violating message ordering.

Uploaded by

thesujee47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

CS 3551 DISTRIBUTED

COMPUTING
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.
● 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.
● Cij - Channel from pi to process pj
● mij- a message sent by pi to pj.
● Don’t share a global clock.
● Process execution and message transfer are asynchronous
● 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
Model for Distributed Execution
A B
Model for Distributed Execution
1. Execution of a process consists of a sequential execution of its actions.
2. The actions are atomic and the actions of a process are modeled as three
types of events, internal events, message send events(send (m)), and
message receive events(rec(m)).
3. The occurrence of events changes the states of respective processes and
channels, thus causing transitions in the global system state.
4. An internal event changes the state of the process at which it occurs.
5. 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)
Causal Precedence Relation
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.
Models of Communication Networks (FIFO, Non-FIFO, Causal
Ordering)
1. FIFO - each channel acts as a first-in first-out message queue and thus, message ordering is
preserved by a channel.
2. non-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.
3. Causal Ordering (built-in synch)- based on Lamport’s “happens before” relation. A system that
supports the causal ordering model satisfies the following property:
Global State of Distributed System

1. 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.
2. The state of a channel is given by the set of messages in transit in the channel.
3. The occurrence of events changes the states of respective processes and channels, thus causing
transitions in global system state.
a. For example, 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).
State of Process

State of Channel
How to find global state?
❖ For a global snapshot to be meaningful, the states of all the components of the
distributed system must be recorded at the same instant.
❖ This will be possible if the local clocks at processes were perfectly synchronized or
there was a global system clock that could be instantaneously read by the
processes. However, both are impossible.
❖ Solution:
❖ Recording at different time will be meaningful provided every message that is
recorded as received is also recorded as sent.
❖ Basic idea is that an effect should not be present without its cause.
❖ States that don’t violate causality are called consistent global states and are
meaningful global states
Inconsistent state
Consistent state
Strongly Consistent

You might also like