Beruflich Dokumente
Kultur Dokumente
D SYSTEM
• Single Coherent system
• Hardware Aspect
• Software Aspect
INTRODUCTION
Distributed computing
is a method of
computer processing
in which different parts
of a program are run
simultaneously on two or
more computers that are
communicating with each
other over a network.
• An example of distributed
computing is BOINC, a framework
in which large problems can be
divided into many small problems
which are distributed to many
computers. Later, the small
results are reassembled into a
larger solution.
CHARACTERISTICS
• do not have share memory or clock.
6
• Global Knowledge
7
• Naming
• Names are used to refer the objects. A name
service map a logical name to the physical
address by making use of lookup table
8
• Scalability
• Grow with time
9
• Compatibility
10
• Resource Management
• Resource management concern with both local
and remote resources available to user in an
effective manner
11
• Security
• Authentication and authorization
12
AUTOMATIC BANKING (TELLER MACHINE) SYSTEM
13
INHERENT LIMITATIONS OF DS
14
INHERENT LIMITATIONS OF DS
15
INHERENT LIMITATIONS OF DS
16
THEORETICAL ASPECTS
• Logical Clocks
• Causal Ordering
• Global State Recording
• Termination Detection
17
HAPPENED BEFORE RELATION ()
• Ab, if a and b are the event in the same process and a occurred before b
• Ab, if a is the event of sending a message m in a process and b is the
event of receipt of the same message m by another process
• Ab and bc then ac , relation is -------
CAUSALLY RELATED EVENTS
21
SPACE-TIME DIAGRAM
Space e11 e12 e13 e14
P1
Internal
Events
Messages
P2
e21 e22 e23 e24
Time
22
LOGICAL CLOCKS
• Conditions satisfied:
– Ci is clock in Process Pi.
– If a -> b in process Pi, Ci(a) < Ci(b)
– Let a: sending message m in Pi; b : receiving message m
in Pj; then, Ci(a) < Cj(b).
• Implementation Rules:
– R1: Ci = Ci + d (d > 0); clock is updated between two
successive events.
– R2: Cj = max(Cj, tm + d); (d > 0); When Pj receives a
message m with a time stamp tm (tm assigned by Pi, the
sender; tm = Ci(a), a being the event of sending message
m).
• A reasonable value for d is 1
23
SPACE-TIME DIAGRAM
Space e11 e12e13e14e15 e16 e17
P1
(1) (2) (3) (4) (5) (6) (7)
25
B. Prabhakaran 26
Limitation
a →→b implies C(a) < C(b)
BUT
C(a) < C(b) doesn’t imply a →→b
B. Prabhakaran 27
LIMITATION OF LAMPORT’S CLOCK
Space e11 e12 e13
P1
(1) (2) (3)
(1) (2)
Time
C(e11) < C(e32) but not causally related.
This inter-dependency not reflected in Lamport’s Clock.
28
VECTOR CLOCKS
• Keep track of transitive dependencies among
processes for recovery purposes.
• Ci[1..n]: is a “vector” clock at process Pi whose
entries are the “assumed”/”best guess” clock
values of different processes.
• Ci[j] (j != i) is the best guess of Pi for Pj’s clock.
• Vector clock rules:
– Ci[i] = Ci[i] + d, (d > 0); for successive events in Pi
– For all k, Cj[k] = max (Cj[k],tm[k]), when a message m
with time stamp tm is received by Pj from Pi.
: For all
29
VECTOR CLOCKS COMPARISON
1. Equal: ta = tb iff i, ta[i] = tb[i]
2. Not Equal: ta != tb iff ta[i] != tb[i], for at least one i
3. Less than or equal: ta <= tb iff ta[i] <= tb[i], for all i
4. Less than : ta < tb iff ta[i] <= tb[i] and ta[i] != tb[i], for all i
5. Concurrent: ta || tb iff ta !< tb and tb !< ta
6. Not less than or equal ...
7. Not less than ..
30
VECTOR CLOCK …
Space e11 e12 e13
P1
(1,0,0) (2,0,0) (3,4,1)
P3 e31 e32
(0,0,1) (0,0,2)
Time
31
CAUSAL ORDERING OF MESSAGES
Space Send(M1)
P1
Send(M2)
P2
P3 (1)
(2)
Time
33
GLOBAL STATE
Communication Channel C1
and C2 are assumed to be in
Global State 1 FIFO.
A recorded global state may
C1: Empty be inconsistent in n<n’ where
$500 $200 n is msg sent by A
A C2: Empty B
Global State 2
C1: Tx $50
$450 $200
A C2: Empty B
Global State 3
C1: Empty
$450 $250
A C2: Empty B
34
GLOBAL STATE
• A global state, GS of a system is the collection of the local states of its sites
• i.e. GS=(LS1,Ls2,LS3,----LSn) where n is the number of sites in the system
B. Prabhakaran 35
NEED
B. Prabhakaran 36
• Consistent global state- if no inconsistent
• Transitless global state
– No message in transit
B. Prabhakaran 37
RECORDING GLOBAL STATE...
• (e.g.,) Global state of A is recorded in (1) and not in (2).
– State of B, C1, and C2 are recorded in (2)
– Extra amount of $50 will appear in global state
– Reason: A’s state recorded before sending message and C1’s
state after sending message.
• Inconsistent global state if n < n’, where
– n is number of messages sent by A along channel before A’s
state was recorded
– n’ is number of messages sent by A along the channel before
channel’s state was recorded.
• Consistent global state: n = n’
38
• Transit State
• Transit(Lsi,LSj)=(mij|Send mijЄLSi л Rec (mij) Є LSj)
• Inconsistent state
• Inconsistent (Lsi,LSj)=(mij|Send mijЄLSi л Rec (mij) Є LSj)
B. Prabhakaran 39
B. Prabhakaran 40
B. Prabhakaran 41
RECORDING GLOBAL STATE...
• Strongly consistent global state: consistent and
transitless, i.e., all send and the corresponding
receive events are recorded in all LSi.
LS11 LS12
LS22 LS23
LS21
42