Distributed Execution William Cook and Jayadev Misra f cook,misra g - - PowerPoint PPT Presentation

distributed execution
SMART_READER_LITE
LIVE PREVIEW

Distributed Execution William Cook and Jayadev Misra f cook,misra g - - PowerPoint PPT Presentation

D EPARTMENT OF C OMPUTER S CIENCES Distributed Execution William Cook and Jayadev Misra f cook,misra g @cs.utexas.edu Department of Computer Science University of Texas at Austin Email: web: http://www.cs.utexas.edu/users/psp U NIVERSITY OF T


slide-1
SLIDE 1

DEPARTMENT OF COMPUTER SCIENCES

Distributed Execution

William Cook and Jayadev Misra Department of Computer Science University of Texas at Austin Email:

fcook,misrag@cs.utexas.edu

web: http://www.cs.utexas.edu/users/psp

UNIVERSITY OF TEXAS AT AUSTIN

slide-2
SLIDE 2

DEPARTMENT OF COMPUTER SCIENCES

Centralized Execution Model

semantics (and execution) described for one machine. Then,

– immediate sites respond instantaneously. – Rtimer is exact.

We develop a theory to permit distributed execution.

UNIVERSITY OF TEXAS AT AUSTIN 1

slide-3
SLIDE 3

DEPARTMENT OF COMPUTER SCIENCES

Distributed Execution Model

Assign subexpressions to different machines. Execution starts on a goal machine. A machine requests another machine to start evaluation. The calling machine supplies the context and values of variables as

they become defined.

The calling machine orders all tokens to be killed, and asks for ack. All messages among these machines are delivered after arbitrary but

finite delay.

UNIVERSITY OF TEXAS AT AUSTIN 2

slide-4
SLIDE 4

DEPARTMENT OF COMPUTER SCIENCES

When can we distribute?

  • R
timer (1)
  • l
et(0) j R timer (2)
  • l
et(1)

Neither branch can be executed on another machine.

  • P
( ; e)
  • :g
et > x > Compute (x) > y > e:put(y )
  • P
( ; e) N
  • P
( ; e) j P (d; e) :g et and e:put are on different machines. P ( ; e) and P (d; e) can be evaluated on different machines.
  • R
timer (1)
  • M
j R timer (2)
  • N

The two branches can be executed on different machines. The theory identifies subexpressions which can be distributed.

UNIVERSITY OF TEXAS AT AUSTIN 3

slide-5
SLIDE 5

DEPARTMENT OF COMPUTER SCIENCES

Distributed Execution has to be faithful

A distributed execution is valid if it mimics a centralized execution. The sites can not distinguish between the two execution styles.

UNIVERSITY OF TEXAS AT AUSTIN 4

slide-6
SLIDE 6

DEPARTMENT OF COMPUTER SCIENCES

An example

Site k ey boar d responds at arbitrary times, or never.

Its response is received immediately.

Site s r een responds immediately and displays a message.
  • k
ey boar d
  • s r
een
  • can not be distributed.

Video-game: A human responds sometime on the keyboard. Expects to see an echo immediately.

UNIVERSITY OF TEXAS AT AUSTIN 5

slide-7
SLIDE 7

DEPARTMENT OF COMPUTER SCIENCES

Punctual Site

A site is punctual if communication delay with it is zero. A site is unpunctual if communication delay with it is arbitrary. Simplification: Assume all sites are either punctual or unpunctual. A punctual site has to be implemented on the caller’s machine. An unpunctual site may be implemented on a remote machine.

Punctual:

R timer, l et, if ,
  • , all immediate sites,
  • ,
k ey boar d, s r een

Unpunctual:

0, CNN , PostWeb ,
  • Generic symbol
M

UNIVERSITY OF TEXAS AT AUSTIN 6

slide-8
SLIDE 8

DEPARTMENT OF COMPUTER SCIENCES

Punctual Expression

Any delay in starting it or processing its response can be detected. Some timing information for site calls or publications is known. A punctual expression has to be implemented on the caller’s machine. An unpunctual expression may be implemented on another machine. A punctual expression may have unpunctual subexpressions.

The subexpression may be implemented on another machine.

UNIVERSITY OF TEXAS AT AUSTIN 7

slide-9
SLIDE 9

DEPARTMENT OF COMPUTER SCIENCES

Definition of Punctual Expression

A punctual expression is of the form

  • S
(x): S is punctual,
  • f
j g: either f or g is punctual,
  • f
> x > g: both f and g are punctual,
  • f
where x:2 g: both f and g are punctual, or f nx is punctual.

Obtain

f nx from f :

Replace all site calls which have parameter

x by 0.

UNIVERSITY OF TEXAS AT AUSTIN 8

slide-10
SLIDE 10

DEPARTMENT OF COMPUTER SCIENCES

Examples: Punctual Expressions

l et(x) l et is punctual (immediate) l et(x) > x > R timer (x)

both sites are punctual

R timer (1) where x:2 g f nx = R timer (1) is punctual l et(x) where x:2 R timer (1) l et(x) and R timer (1) are both punctual R timer (1) j h where x:2 g f nx = R timer (1) j hnx is punctual l et(x) > x > R timer (1) l et(x) > x > R timer (1) and R timer (1) where x:2 R timer (1)

are both punctual

UNIVERSITY OF TEXAS AT AUSTIN 9

slide-11
SLIDE 11

DEPARTMENT OF COMPUTER SCIENCES

Examples: Unpunctual Expressions

M
  • R
timer (1) R timer (1)
  • M
N (x) > x > R timer (x) R timer (x) where x:2 M N (x) where x:2 R timer (1) l et(x) where x:2 M

UNIVERSITY OF TEXAS AT AUSTIN 10

slide-12
SLIDE 12

DEPARTMENT OF COMPUTER SCIENCES

punctual within unpunctual, and vice versa

k ey boar d
  • s r
een j JoySti k
  • (M
j N ), where k ey boar d, s r een, JoySti k are punctual M and N are unpunctual. k ey boar d
  • s r
een | {z } pun tual j JoySti k | {z } pun tual
  • (M
j N ) | {z } unpun tual | {z } unpun tual | {z } pun tual

UNIVERSITY OF TEXAS AT AUSTIN 11

slide-13
SLIDE 13

DEPARTMENT OF COMPUTER SCIENCES

Example: Distributed Execution

k ey boar d
  • s r
een | {z } pun tual j JoySti k
  • (M
j N ) | {z } unpun tual
  • k
ey boar d
  • s r
een j f f
  • JoySti k
  • (M
j N ) | {z } unpun tual
  • k
ey boar d
  • s r
een j f f
  • JoySti k
  • g
g
  • M
j N

UNIVERSITY OF TEXAS AT AUSTIN 12

slide-14
SLIDE 14

DEPARTMENT OF COMPUTER SCIENCES

Some properties

If all sites in an expression are punctual, the expression is punctual. If all sites in an expression are unpunctual, the expression is

unpunctual.

Monotonicity: An unpunctual expression remains unpunctual if you

replace any site by an unpunctual site.

M punctual, f (M ) unpunctual, N unpunctual ) f (N ) unpunctual. M v N ) f (M ) v f (N ),

where punctual

< unpunctual

Proofs by structural induction.

UNIVERSITY OF TEXAS AT AUSTIN 13

slide-15
SLIDE 15

DEPARTMENT OF COMPUTER SCIENCES

Punctuality is conservative

  • l
et(true ) > b > ( if (b)
  • g
  • g
j if (:b)
  • R
timer (1) )

Though the execution can be distributed, the expression is punctual.

  • R
andom > x > R timer (x) R andom publishes a random natural number within some bounds.

The expression is punctual, and it can not be distributed.

  • Nat
> x > R timer (x) N at publishes any natural number.

Though the execution can be distributed, the expression is punctual.

UNIVERSITY OF TEXAS AT AUSTIN 14

slide-16
SLIDE 16

DEPARTMENT OF COMPUTER SCIENCES

Recursively defined Expressions

M etr
  • nome
  • S
ig nal j R timer (1)
  • M
etr
  • nome, i.e.
Metr
  • nome
  • if
(true ) j R timer (1)
  • Metr
  • nome
S ig nal is punctual, so the rhs is punctual. Metr
  • nome is punctual.
Met
  • S
ig nal j M
  • Met
| {z } unpun tual Met is punctual. Its subexpression M
  • Met may be distributed.
S ig nal j M
  • Met
  • S
ig nal j f f
  • M
  • Met

UNIVERSITY OF TEXAS AT AUSTIN 15

slide-17
SLIDE 17

DEPARTMENT OF COMPUTER SCIENCES

Least fixed point

f
  • M
j R timer (1)
  • f

Assume

f punctual. f
  • M
|{z} unpun tual j R timer (1) | {z } pun tual
  • f
|{z} pun tual | {z } pun tual | {z } pun tual

Assume

f unpunctual. f
  • M
|{z} unpun tual j R timer (1) | {z } pun tual
  • f
|{z} pun tual | {z } unpun tual | {z } unpun tual

The least fixed point is

f is punctual. punctual < unpunctual.

UNIVERSITY OF TEXAS AT AUSTIN 16

slide-18
SLIDE 18

DEPARTMENT OF COMPUTER SCIENCES

Existence of least fixed point

Least fixed point exists for any defined expression

f .

Assume

f is punctual. definition of f is punctual: f is punctual. definition of f is unpunctual: f is unpunctual.

Monotonicity: assuming

f unpunctual, definition of f is unpunctual.

UNIVERSITY OF TEXAS AT AUSTIN 17