Rep eated Computation of a Global F unction 1 Goals of the - - PowerPoint PPT Presentation

rep eated computation of a global f unction 1 goals of
SMART_READER_LITE
LIVE PREVIEW

Rep eated Computation of a Global F unction 1 Goals of the - - PowerPoint PPT Presentation

Rep eated Computation of a Global F unction 1 Goals of the lecture Rep eated Computation of a Global F unction Deadlo ck Detection Clo ck Synchronization Distributed Branch and Bound Sea rch


slide-1
SLIDE 1 Rep eated Computation
  • f
a Global F unction 1 Goals
  • f
the lecture Rep eated Computation
  • f
a Global F unction
  • Deadlo
ck Detection
  • Clo
ck Synchronization
  • Distributed
Branch and Bound Sea rch
  • Distributed
Debugging c Vija y K. Ga rg Distributed Systems F all 94
slide-2
SLIDE 2 Rep eated Computation
  • f
a Global F unction 2 Desirable Cha racteristics
  • Light
Load
  • not
mo re than k messages/time step
  • High
Concurrency
  • log
k N time steps
  • Symmetry
(Equitable W
  • rkload)
  • load
balancin g
  • fairness
c Vija y K. Ga rg Distributed Systems F all 94
slide-3
SLIDE 3 Rep eated Computation
  • f
a Global F unction 3 Some P
  • ssible
App roaches
  • Centralized
f f f f f f f f f
  • ?
@ @ @ R
  • 6
@ @ @ I
  • Ring-based
f f f f f f f f
  • :
  • X
X X z C C C W
  • 9
X X X y C C C O
  • Hiera
rchical h h h h h h h A A K
  • @
@ I A A K
  • @
@ @
  • A
A A
  • A
A A All links a re logical connections c Vija y K. Ga rg Distributed Systems F all 94
slide-4
SLIDE 4 Rep eated Computation
  • f
a Global F unction 4 Message Flo w T able Static Hiera rchy
  • Numb
er
  • f
no des (p ro cesse) = 7 time step Messages 1 1; 3 ! 2 5; 7 ! 6 2 1; 3 ! 2 5; 7 ! 6 2; 6 ! 4 3 1; 3 ! 2 5; 7 ! 6 2; 6 ! 4
  • A
A A K
  • @
@ @ I A A A K
  • @
@ @ @ @
  • A
A A A A A
  • A
A A A A A 4 2 6 3 1 7 5 c Vija y K. Ga rg Distributed Systems F all 94
slide-5
SLIDE 5 Rep eated Computation
  • f
a Global F unction 5 Overlapping T ress
  • @
@ @ @ @ @ @ @ @ @ @ @
  • @
@ @ @ @ @ @ @ @ @ @ @
  • @
@ @ @ @ @ @ @ @ @
  • @
@ @ @
  • 7
@ @ @ @ @ @
  • @
@ @ @ 6 3 2 7 1 4 5 4 5 2 6 2 6 1 3 1 3 5 c Vija y K. Ga rg Distributed Systems F all 94
slide-6
SLIDE 6 Rep eated Computation
  • f
a Global F unction 6 Message Flo w T able
  • Revolving
Hiera rchy
  • numb
er
  • f
no des = 7 time step Messages idle 1 2 1; 3 6 5; 7 4 2 4 2; 6 5 1; 3 7 3 7 4; 5 1 2; 6 3 4 3 7; 1 2 4; 5 6
  • Reo
rganization
  • f
Hiera rchy
  • Reuse
  • f
messages B B @ 1 2 3 4 5 6 7 5 1 7 2 6 3 4 1 C C A c Vija y K. Ga rg Distributed Systems F all 94
slide-7
SLIDE 7 Rep eated Computation
  • f
a Global F unction 7 Requirements fo r Desired P ermutation
  • Gather
tree constraints
  • interio
r no des
  • f
T i = subtree
  • f
T i+1
  • F
airness constraints
  • No
cycle
  • f
size less than N .
  • 4
2 6 1 3 5 7 c Vija y K. Ga rg Distributed Systems F all 94
slide-8
SLIDE 8 Rep eated Computation
  • f
a Global F unction 8 Interesting but ..
  • Do
es there alw a ys exist such a p ermutation ?
  • Is
there a systematic metho d to nd it ?
  • Is
there an ecient implementation fo r it ? c Vija y K. Ga rg Distributed Systems F all 94
slide-9
SLIDE 9 Rep eated Computation
  • f
a Global F unction 9 Metho d to Generate the P ermutation 3 2 5 7 6 4 9 11 10 13 15 14 12 8 1
  • @
@ @ @ @ @
  • @
@ @ @ @ @ @ @ H H H H H H H H next(x) : [ ev en(x) ! x := x=2; (* gather tree constraint *) 2
  • dd(x)
^ (x < 2 n1 ) ! x := x + 2 n1 ; (*fairness constraint *) 2
  • dd(x)
^ (x > 2 n1 ) ! [ x = N ! x := (N
  • 1)=2;
2 x 6= N ! y := x
  • 2
n1 + 2 x := y
  • 2
dlog 2 n y 1e ] ] c Vija y K. Ga rg Distributed Systems F all 94
slide-10
SLIDE 10 Rep eated Computation
  • f
a Global F unction 10 Implem entati
  • n
1 Q: Who should I send message to at time t ? msg (x; t) = next t (par ent(next t (x))); if next t (x) is
  • dd
= nil ;
  • therwise
x is in-o rder lab el next is the new p
  • sition
function par ent is the pa rent function fo r in-o rder lab elin g pa rent
  • f
x = x with last t w
  • bits
changed to 10 c Vija y K. Ga rg Distributed Systems F all 94
slide-11
SLIDE 11 Rep eated Computation
  • f
a Global F unction 11 Implem etati
  • n
2 3 2 5 7 6 4 9 11 10 13 15 14 12 8 1
  • @
@ @ @ @ @
  • @
@ @ @ @ @ @ @ H H H H H H H H 12 13 2 14 3 6 9 4 7 10 1 5 8 11 msg (x; t) = new par ent(x + t)
  • t;
if (x + t) is a leaf-no de = nil ;
  • therwise
  • Just
need to sto re new par ent a rra y c Vija y K. Ga rg Distributed Systems F all 94
slide-12
SLIDE 12 Rep eated Computation
  • f
a Global F unction 12 Comm unicatio n Required
  • Communication
distance set (CDS) = fnew par ent(j )
  • j
j j a leaf no de g
  • p
ro cess x will send a message to p ro cess y i y
  • x
2 C D S .
  • fo
r N = 15 C D S = f1; 5; 8; 10; 13; 14g:
  • CDS
dep ends
  • n
the next function. c Vija y K. Ga rg Distributed Systems F all 94
slide-13
SLIDE 13 Rep eated Computation
  • f
a Global F unction 13 Data Gathering and Broadcasting
  • a
p ro cess can send/receive
  • nly
  • ne
message p er time step
  • require
that the same set
  • f
messages is used fo r data gath- ering and b roadcasting.
  • Constraints
: 1. fairness contraints
  • equal
load 2. gather tree constraints.
  • G(t)
available at t + log N time step at
  • ne
no de. 3. b roadcast constraints.
  • G(t)
available at t + 2 log N time step at all no des. c Vija y K. Ga rg Distributed Systems F all 94
slide-14
SLIDE 14 Rep eated Computation
  • f
a Global F unction 14 Message Flo w T able time step Messages ! 7 4 ! 6 1 ! 3 2 ! 5 1 7 ! 6 3 ! 5 ! 2 1 ! 4 2 6 ! 5 2 ! 4 7 ! 1 ! 3 3 5 ! 4 1 ! 3 6 ! 7 ! 2 4 4 ! 3 ! 2 5 ! 7 6 ! 1
  • fairness
in w
  • rkload
  • four
times less messages than static hiera rchy c Vija y K. Ga rg Distributed Systems F all 94
slide-15
SLIDE 15 Rep eated Computation
  • f
a Global F unction 15 Metho d to Generate the P ermutation bcnext(x) :: [ b = 1 ! x := R S (x) (* gather tree *) 2 (b = 0) ^ (b 1 = 0) ! x := R S 1 (x) (* b roadcast *) 2 (b = 0) ^ (b 1 = 1) ! x := LS a 1
  • LS
b (x) + 2
  • mo
d 2 n1
  • ;
(* fairness *) ] b n1
  • b
= x R S p = Right shift with p as m.s.b LS p = Left shift with p as l.s.b. a = numb er
  • f
leading zeros b = numb er
  • f
leading
  • nes
c Vija y K. Ga rg Distributed Systems F all 94
slide-16
SLIDE 16 Rep eated Computation
  • f
a Global F unction 16 Algo rithm to nd Current Minimum in the Net w
  • rk
  • Distributed
b ranch and b
  • und
  • Distributed
simulation
  • p
ro cess x : step = [ dest msg (x; step) 6= nil ! send msg (dest msg (x; step); my min) step := step + 1 sr c msg (x; step) 6= nil ! r ecv msg (sr c msg (x; step); hismin) recompute my min step := step + 1 ] c Vija y K. Ga rg Distributed Systems F all 94
slide-17
SLIDE 17 Rep eated Computation
  • f
a Global F unction 17 P erfo rmance
  • f
the Algo rithm
  • at
most k messages handled b y a no de/time step
  • the
global function G(t) is available at t + dlog N e time steps.
  • a
throughput
  • f
  • ne
global function p er times step.
  • numb
er
  • f
messages required
  • half
  • f
that fo r static hiera rcy .
  • equal
w
  • rkload
distribution c Vija y K. Ga rg Distributed Systems F all 94
slide-18
SLIDE 18 Rep eated Computation
  • f
a Global F unction 18 Extensions
  • General
N
  • use
virtual no des
  • General
k
  • metho
ds to generate p ermutation s fo r bina ry trees generaliz e to k
  • a
ry trees.
  • asynchronous
messages
  • can
b e used instead
  • d
synchronous messages. No des synchronize d due to \receives". c Vija y K. Ga rg Distributed Systems F all 94
slide-19
SLIDE 19 Rep eated Computation
  • f
a Global F unction 19 Conclusions
  • Useful
fo r algo rithms that
  • use
hiera rchi ca l control
  • run
fo r long time
  • main
advantages
  • equal
w
  • rkload
distribution .
  • reduction
in numb er
  • f
messages due to their reuse
  • main
disadvantages
  • requires
that the communicat ion net w
  • rk
has mo re edges than static hiera rchy . c Vija y K. Ga rg Distributed Systems F all 94